I've tried to send AT commands to my Ble 4.0 HM-10 module by connecting it to an Arduino Board and sending command through Arduino IDE's Serial Monitor but I don't get any response.
Can someone tell me how to do this?
Also when I'm near the Bluetooth module my Android phone can connect and send data to the module. But when I'm close and there is a small obstacle between my phone and the module, the module doesn't receive the data but remains connected.
Can someone tell me the reason?
Thank You
set your line ending to no line ending
Related
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.
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.
First, I'm new to Arduino and Android programming. I had a college project, an automatic crash detection and notification. I used this link.
I have made all the connections correctly. The first problem I faced was that I couldn't connect my phone to the HC-05. It wasn't even discoverable and the LED didn't work. I thought my HC-05 was faulty and bought a new one. This one flashed the LED when connected. Then without going into AT command mode to change the baud rate I directly paired the HC-05 with my Android phone and tried the app.
The data from my Arduino wasn't being sent to the phone. I tried getting my HC-05 into AT command mode later on, but it wouldn't go into that mode. I tried all the tips from here. Still it wouldn't go into AT command mode. Can anyone help me with this problem please?
Need to do initialization
- the BT pins:
5v to 5v arduino
GND to GND arduino
TX to RX arduino
RX to TX arduino
solder pin 34 of BT with wire and connected to any digital pin of arduino
then, in void setup set digital pin to low, and after delay, 1 sec, set pin to high
this way will let you get in AT command.
I am making an Android Bluetooth app which will send and receive data from 2 Arduino devices simultaneously.
I am able to connect either one of the devices (sender or receiver), but I cannot connect to both of them and send and receive data at the same time.
Any link, any reference app, any documentation would be highly appreciated.
Thank you.
NOT SURE you can connect with 2 devices at the same time. you might
connect to one and disconnect and do the same with the second.
i'm trying to do the same things with 2 arduino. but at this time i can connect
to one arduino, but i don't know how to disconnect .
i'm using " Androidapi.JNI.BluetoothAdapter.hpp"?
how do you disconnect your sock??
There are a number of threads regarding this topic, but I haven't been able to troubleshoot my issue yet and haven't seen much talk of using XBee-4 Nano. I am working on a Arduino/Android project where I need to have a remote XBee monitoring a button, once the button is pressed an notification is sent to my Android phone and I receive a message in the task bar saying the button was pressed.
I've been working on this for weeks... I've read many home automation book, walked through the XBee Lab manual, searched many forums, and installed the tools for Amarino. and the issue I'm having is not understanding how to get the XBee and Arduino to work enough to be discovered by . The Android portion I will be able to take care of.
The tools I have are
http://www.makershed.com/Xbee_Series_1_Starter_Kit_p/mkpx19.htm
(2) XBee 802.15.4 (Series 1) embedded-antenna modules.
(1) XBee USB Adapter for easy PC connection.
(1) XBee 5V/3.3V Adapter for microcontroller connection.
http://www.gravitech.us/xbadforarna.html
(2) XBee-4 Nano (shield for XBee and Arduino Nano)
(3) Arduino Nano
(1) Arduino Uno
X-CTU
Putty
Arduino IDE with Amarino
Android Phone
My ideal setup is connect configure XBee and Arduino Nano on the XBee-4 Nano shield to monitor a button, connect XBee/Arduino to Android phone, then on button press, phone receives a notification.
I am able to monitor the button and turn on LED on button press using the Adruino Nano. How do I sent this data from the Arduino to the XBee using XBee-4 Nano? Are the TX->RX and RX->TX already connected and the XBee will just broadcast the data, or do I need to manually set up jumpers to do this?
Next question is how do I discover the XBee module from my Android phone? I have successfully completed the Bluetooth chat project between my 2 XBee's. I have installed the Amarino on my phone, but when I have the XBee hooked up to either of the adaptors or XBee-4 Nano, I am unable to discover the xbee. Why is this? Is there something with the baud rate or other setting I need to update to be able to do the discovery? Is the issue with the adaptor I am using? There is power to the XBee since I can light up an LED using D05 = 1 and ground.
If you can point me in the right direction on how to use the XBee-4 Nano and how to discover the XBee from an Android phone (using Amarino), it would be much appreciated.
Thanks
Are the TX->RX and RX->TX already connected
yes, just look at the schematics: http://site.gravitech.us/Arduino/XBEE-4NANO/Schematic.pdf
how do I discover the XBee module from my Android phone?
What do you mean for "discover"?
if you mean when the xbee is plugged, you cant easily. xbee is transparent, they are like connecting cable directly. but they respond to come AT command, if i'm right, so you can try to use them (but probabily the BLUETOOTH card will respond), unless the request is done on the mini side, and only a specific signal is sent back to amarino.