I'm a beginner at Arduino. I just started 1 month ago. I was trying the HC-05 BLE module, following a tutorial. The connections were working, the module was flashing its LED. Then I created a app in MIT App Creator which just sends the number '1' to the SoftwareSerial which then was read and then finally, if the number read was 1 then the pin 8 was set high. After that I opened the app but when I got to select the device it wasn't there. I realized that to the Bluetooth module to my app I need to pair with it first, and this is what I tried. But when I clicked on the device, it asked me for a PIN which Android recommended to use 0000 or 1234. I tried both of them but it didn't work. What should I do?
HC-05 is not a BLE device.
The first thing to do is get rid of whatever came out of App Creator and use a standard terminal for Bluetooth "Classic". I believe the one by Morisch defaults to Bluetooth classic. If the phone can see Bluetooth, which it apparently can, it should be able to pair. You have not said anything that proves it didn't.
Further, you have said nothing that proves your connections are working. Indeed, the only proof that your connections are working is when the whole thing works, which not the case here. The flashing LED simply means the power is connected and it is ready to go - not that it WILL go. Are the signal connections kosher Tx to Rx, Rx toTx?
Well I did installed Morisch's Bluetooth terminal and it worked fine but the module appeared on the BLE page. The problem with the Terminal is that is really ugly and I would like to build an interface to control the led. My phone can see the Module which is named "BT05" but when I try the "0000" or "1234" PIN, it doesn't do anything. And I didn't connect the rx pin to tx pin and tx pin to rx pin. Instead I connected tx to pin 8 and rx to pin 9. And I used the SoftwareSerial library and defined those rx-tx pins in the code.I would like to work with MIT APP INVENTOR.If there is a problem with the MIT APP INVENTOR then I will learn android studio
I would trust Morisch more than I trust you and therefore now assume that Bluetooth is not an HC-05 but indeed a BLE device.
Similarly, there is nothing to suggest that AppInventor is no good, but quite a lot to suggest you aren't using it properly, and therefore it is best left out of the game rather than be yet another source of confusion.
BLE devices are not paired in settings, hence your lack of success, they are accessed directly from the app, yet another reason to use a standard terminal.
If pin 8 is Rx then that is OK.
BLE coding is not simple in particular getting the UUIDs correct
Used MIT app inventor to create apps for Bluetoth classic 2.0 and BLE using an ESP32 which has builtin WiFi, Bluetoth 2.0 and BLE
similarly used Android Studio to create Bluetooth 2.0 and BLE apps - it is far more powerful and flexible than MIT app inventor but an order of magnitude more complex and difficult to use
have a look at MIT app Inventor Bluetooth Tutorial with the ESP32
Ok, thank you! I will try learning Android studio and once I'm done I will respond
which langauge will you use ? see develop-android-apps-languages - I use Java mainly because I have used it for years
with commercial projects I develop prototype apps then hand over to to specialist app developers for final implementation
I will use kotlin
Please, post a picture of your HC05 BT Module and the connection you have made with Arduino UNO.
Recommended Connection between UNO and BT-HC05 (Fig-1):
Figure-1:
Thank you! I will try that and I will respond
Hi @eex . Welcome to the Forum.
You´ve already got some good tips, but it would be interesting if you show us a picture of your module. As a begginer, it´s not hard to confuse HC-05, HC-06, HM-10 and HM-11 modules, and this information makes a lot of difference on the project development. My 5 cents:
- App inventor can handle BLE, but it´s necessary to install a specific tool;
- If your phone is Iphone, they do have BLE but they do not connect to Bluetooth Classic devices like HC-05.
- HC-05 module PIN can be changed via AT commands, if the problem happens to be the PIN.
Hi, I've used google lens to search the board and a apparently it is a cc2540/cc2541 even though the name of the bluetooth signal was name "BT05"
I don't have an Iphone. I have a Samsung A21s
That is a Bluetooth low energy module like an HM-10. It will not work with a classic Bluetooth device.
Yeah it is Bluetooth low energy but can bluetooth low energy pair to phones?
I don't know for sure, but I doubt that Bluetooth classic and Bluetooth LE are compatible. I have experience with Bluetooth classic, but none with BTLE.
The thing is get blocked at the PIN part. When I type 1234 or 0000 It does nothing
BT and BTLE work differently. Do some searching to see if there is a way to connect Android phone to BTLE. I have my doubts.
I think that you would be better off purchasing a compatible Bluetooth module like a HC05 (master or slave) or HC06 (slave only).
Please, show the other side of the module.
Is hm-10 good?