So I was able to pair my phone to the HM-10, after changing some of the settings using serial through the Arduino.
But trying to connect to the bluetooth module doesn't work, when using various apps from the Play Store. The only type of apps that do work are the ones that I can access the serial (example) and send commands to the bluetooth module, similarly to using the Arduino.
I'm not really sure which of the settings to change/set. There are various commands, but the ones that led to me pairing with it, were AT+MODE, AT+ROLE and AT+TYPE commands.
Do I maybe need to update the firmware, or change some of the settings to certain values, in order to connect to the device through the other apps?
Here's the datasheet of the bluetooth module:
PDF Datasheet
The commands start on page 19.
My HM-10 version is (AT+VERR?): HMSoft V545
Gam3rlink:
So I was able to pair my phone to the HM-10, after changing some of the settings using serial through the Arduino.
Probably not. Pairing is between phone and Bluetooth and, other than providing power, Arduino is not involved.
I have heard rumour that the only Android apps that work with BLE are those that are specifically made for BLE. I don't understand why this is, or even if it is true, but it explains a bit if it is. I don't think any upgrading is required and, so long as you haven't previously configured it to work as a beacon or something, no other configuring is needed. You might check this by restoring the default settings.
So after some messing around, I restored to factory default settings (AT+RENEW) and unpaired with my phone.
When in default settings, it does not pair with my device.
(Page 39 on datasheet) With AT+TYPE set to 0 (default), it does not pair. However, if it is set to 1, 2 or 3, it pairs.
(Page 31) With AT+MODE set to 0 (default), I can't send serial commands/text using the MSMBle app , but if the mode is set to 1 or 2, then I can send text/commands through serial in the app, and see it in the serial monitor.
However I'm not sure what to do in order to get the other apps like the Arduino Bluetooth Controller app to connect. I just get this error, when I try to connect.
There is comment on p17 about MODE=0. I guess this means it cannot receive. Don't ask why you would want a bluetooth that cannot receive, but it might have something to do with power saving.
I have never succeeded in getting my HM-10 to work with my phone. It appears that you have explained why. I originally understood that the HM-10 is a drop-in replacement for the HC-05. It is now pretty clear that it isn't. There is still a chance that it can be pursuaded to do the same job, but I'm afraid I don't have the motivation, as the HC-05 does all I need.
Karma.
Gam3rlink:
However I'm not sure what to do in order to get the other apps like the Arduino Bluetooth Controller app to connect. I just get this error, when I try to connect.
The HM-10 is BLE, the Arduino Bluetooth Controller app is Bluetooth Classic/2. They are different and cannot be used together. For BLE you need a BLE compatible app.
Have a look at HM-10 Bluetooth 4 BLE Modules. This is an ongoing guide but there should be enough there to get you started.
Thanks Martyn, that guide was PERFECT. It really is a great resource for dealing with the HM-10 module. One last question is: I did not convert the Arduino's 5v TX to 3.3, and connected it directly to the module, which worked fine. Are you sure the breakout board, does not account for this, or is it a safety precaution?
(My Work-in-progress project: Smartphone controlled Strandbeest - YouTube)
I always reduce the voltage, usually with a voltage divider, but other people don't and don't seem to have any problems. The spec sheet for the CC254x says they 3.3v devices so this is what I go with.
A while ago I did some basic experiments with the HC-06s and HC-05s (different chip so probably not relevant). I ran a simply loop that sent data to the HC-0x every 250ms. On one module the RX pin died after about 8,000 iterations, another lasted for about 20,000 and the third was still working after a couple of days (about 700000 times). This showed me there was a lot of variation and that it was better to play safe.