HM-10 Arduino Bluetooth Module Not Working - android

I am currently trying to set up my HM-10 Bluetooth module with my Arduino and when I do this I am faced with two problems. When I connect the Bluetooth module I cannot upload any code to the Arduino as it just gets stuck on "uploading" forever until it crashes. When I disconnect the module I can upload code perfectly fine. The other problem which is probably connected to the other one I cannot connect to the Bluetooth module with my phone. I have used the passwords 1234,0000 and 123456 and they all just say couldn't connect? The AT commands don't do anything as I cannot upload anything to it.
bluetooth setup
bluetooth 1
bluetooth 2

When I connect the Bluetooth module I cannot upload any code to the Arduino as it just gets stuck on "uploading" forever until it crashes.
The Arduino IDE uses the main serial port on the Arduino UNO to upload new sketches (programs). Your pictures indicate, however, that you are using that serial port to communicate with the Bluetooth module.
Instead, use the SoftwareSerial library to communicate with the bluetooth module - and leave the RX/TX pins free. The SoftwareSerial library will allow you to select different pins: see example here.
The other problem which is probably connected to the other one I cannot connect to the Bluetooth module with my phone.
Well ... Have you even uploaded the required program to the board yet? If not it's premature to examine this issue. Verify that you can upload the program first.

Related

Hc-06 can't connect to a pc, but it can pair to a phone.(keep flashing)

I have a Problem with my HC-06s.
edit:
after some more testing on a different pc(where it works) it seams to be system related.
I am trying to connect one to my Laptop so that I can receive data. I have 2 HC-06 and a additional Bluetooth dongle to my built-in Bluetooth.
One of the Modules has worked in the past with the same laptop( it is a lenovo t420) but I had to reinstall windows and now I run Win7 while it was Win10 before. therefore it is possible that it is a partially a driver problem. But they seam to be up to date.
So far I can "connect" both HC-06 to my laptop but they don't stop flashing the led.
When I then try to use TeraTerm( or arduino Serial port) to connect to the com ports I can only connect to the Inbound com with the other it gives a error("acces denied" or " port busy") But I don't recieve anything, even though the arduino should be sending non-stop.(code below). And the modules keeps flashing. I also connected the RX fo the module to the Serial tx to try to get the date from there just in case the Softwareserial wasn't working.
If I use the Bluetooth dongle, a generic chinese csr4.0 dongle, I "connect" as well but the modules don't have there own com ports. and I can't connect to the ports of the dongle.
I also tried to connect it to my phone. I used the "bluetooth Serial Terminal" (by Kai morich) and it could successfully connect to one of them and I was even able to receive some data but it was only a unidentified character but at least it works.
but If I sent some data from my phone I don't recieve any on the arduino.(yes I checked the wires and changed it over several time just in case)
void setup()
{
Serial.begin(9600);
Serial.println("Enter AT commands:");
// HC-06 default serial speed is 9600
BTserial.begin(9600);
}
void loop()
{
if (BTserial.available())
{
Serial.write(BTserial.read());
}
BTserial.print("1001");// used also .write or .write(Serial.read) with no effect
Serial.print("1001");
delay(500);
}
I hope someone has some Ideas what could be wrong here.
regards
Walter
ps:
I also have a work-around option: I also have a AT-09 Bluetooth 4.2LE module which works succesfully with the same wirering with my phone. So if I could send the data live from the phone to the pc (preferable via USB) so that I can use it in Processing that would work aswell. but I have no experience with android programms therefore it would have to be a finished app.

Connect multiple devices via Bluetooth on Android (Multiple BLE connections)

I am trying to create Client-Server connection network over android devices via blue-tooth(as the connection platform).One device acting as Server and other 4 or five devices as Clients.I have tried many examples from git-hub repository but there is no multi-connectivity implementation.Here is the link I tried for multi connection via blue-tooth
https://github.com/arissa34/Android-Multi-Bluetooth-Library
First of all, you have to notice this library is for socket communication using RFCOMM protocol which is not Low Bluetooth
https://en.wikipedia.org/wiki/List_of_Bluetooth_protocols
If you want help, I need more informations, as your android version, a piece of your code and your logs as well.
Moreover, you can see this library in work on this game https://play.google.com/store/apps/details?id=com.drgames.domino Using one server and 3 clients in bluetooth.

Can multiple phones be connected to same Arduino via Bluetooth using MIT App Inventor?

I am currently working on a project in MIT App Inventor, where I am connecting an Android device to an Arduino via Bluetooth.
Is it possible to connect multiple Android phones to this Arduino, and is there a procedure by which an Arduino could distinguish between them?
I assume, that you are using a serial bluetooth device, such as HC-06 or HC-05. As I know, even the master module HC-05 can only connect to one client at a time (which makes sense, since the serial connection on the other side is the same)(despite the fact, that bluetooth in principle allows handling multiple clients at a time, though it's a rather complex task). This means, that you would have to use one serial bluetooth module for each phone, you want to connect at the same time.
When using more than one bluetooth module, you have to connect them to the Arduino over serial, but only one device can use the serial connection at a time. Depending on the number of phones, you want to connect, you can use either the SoftwareSerial library to emulate more than one serial connection (so every connection can be identified by its own SoftwareSerial object), or you have to multiplex your data lines between the different serial bluetooth devices (so that you control the serial connection to the devices with for example setting digital pins). For the last mentioned possibilities, I'm not sure about the property limits in the serial connection. Maybe you can multiplex just only with a few transistors.
If you want not only distinguish between the different connections but directly between different phones (for example to remember special settings for only your phone, not the others) you would have to send an identification over bluetooth to the Arduino (for example the MAC adress of the phone).
For more help, you should state you question in a better way and telling more details

Sending serial data from android to a PICAXE microcontroller with usb cable

I am working on a project that including an android phone that sends simple serial messages to a picaxe microcontroller(14m2) like '1','2','a' etc.
I searched alot on the web, and I only found a way that the android smartphone first "connecting" to the device and "discover" it, the problem is that PICAXE microcontroller is NOT a 'USB' device, and it can't be discoverd by the android, that means the android will not be able to send serial messages to the PICAXE.
if theres any way to send simple pulses from android to PICAXE, please let me know about it.
EDIT: There's any way to do that by connecting the AXE027 download cable with OTG?
I do some project with communicating over serial port. You can use chineese bluetooth adapters (see on ebay arduino bluetooth), those communicate with controllers via Usart and connect to phone by bluetooth. There is sample project Bluetooth chat from google about how to use bluetooth on android. On hardware iside, you can use arduino for receiving data by bluetooth and converting it in format of your controller. You wont have to use any wires

Connecting AUBTM-23 Bluetooth module to a 8051 microcontroller

I am doing my final year project and am facing a problem to send data through a mobile device (android) to a AUBTM-23 bluetooth module, which has a RS232 port something similar to this one, which is conected to a 8051 controller serially.
When I try connecting the module to PC and send data from mobile, the data is properly read in hyperterminal with following information:
OK
+CON1:1
data received from mobile device
+DCON:1
OK
+CON1:1-->received when mobile app tries connection with module.
Then the serial data gets transferred, then when the app disconnects I get DCON.
But when I use it with 8051, there is no data transfer.
I searched and found that module is programmed to send these tags(CON, DCON, OK) and also it is designed to be embedded in a host system (which i think 8051 is not) which requires cable replacement function.
SO, is it possible to connect the module to 8051 controller?
does a serial port really requires a host?
Can I make any arrangement for the extra tags (CON, DCON, OK)?
And to connect rs232 port serially, i am making use of only 3 pins and leaving the remaining 6 pins unconnected, could that be a problem?
You can use 8051, UART , just write code for sending AT commands check those on hyperterminal whether they woring or not .. then connect TX RX of 8051 to RX Tx of ur module. Be careful to add a voltage divider with 10kand 15k resistors between Rx line of Module,as it should receive only 3.3 v and max232 will output 5v.
It will work...
8051 can be used as a host for the AUBTM-23
There are several conditions that could be causing problems and additional information is necessary to correctly diagnose and troubleshoot them. That being said, the following information might be of some assistance.
You might need a MAX232 (or other TTL to RS232 level converter) between the 8051 UART pins and the RS232 port on the AUBTM-23 device. Otherwise, you may† be able to bypass the RS232 port and connect the appropriate 8051 UART pins directly to the UART pins on the AUBTM-23 chip. † note that this option depends on the voltages used by both chips and additional circuitry (e.g. level shifter) may be required
The AUBTM-23 datasheet says that flow control can be either RTS/CTS or None and is configured during factory calibration. When you connected the AUBTM-23 to HyperTerminal, what type of flow control was used?
If your AUBTM-23 device uses RTS/CTS (hardware) flow control, you should connect the the RTS and CTS lines to available port pins on the 8051 and add the appropriate code to handle the handshaking.
If your AUBTM-23 device does not use flow control, you should be able to use a minimal 3-wire (TX, RX, GND) RS232 connection.

Categories

Resources