Unable to run spresense SDK example "bluetooth_le_central" with bluetooth module HM-10
I am new to Microcontroller. Hope I explain my problem clearly enough.
I connected the RXD and TXD on my HM-10 to UART2_RX and UART2_TX on spresense. Then I try to build and fresh the "bluetooth_le_central" example on the spresense SDK Github repo.
The code is successfully fresh into spresense but when I run it. The nuttx give me this ERROR:
[BT][Common] Initialization failed(HAL initialize failed)
After checking the documentation and debugging. I found out that the Bluetooth module initialize is failed
I have an error on this function
I am looking for a solution or some clues.
I used the same setup on Arduino IDE and could enter the AT mode of the Bluetooth. I think that means I got the pin right.
Just checking.. Did you make sure that the connection was like below:
RX from HM-10 connected to TX from Spresense.
TX from HM-10 connected to RX from Spresense
Just because the way you wrote the connections made me think you did RX to RX and TX to TX.
Yes, I connect the RX from HM-10 to TX on the spresense. I didn't realize I am mistyping. Thank you for correcting me.
And I saw the spresense SDK just updated for supporting "Only BLE Device". The HM-10 I think is considered as "Only BLE Device" And I am testing out the new SDK.
Did you have any success with the new SDK release?
I doubt it will work because the new driver integrates the Nordic nRF SDK. It serializes host - controller communication where the controller runs the Nordic Softdevice on it.
The HM-10 is from TI. I found that it uses AT commands to control Bluetooth. It sound like a very different protocol.
If you want "real" BLE, not just some Serial over BLE, then I suggest that you either get the new BLE add on board or any nRF5x board where you flash the required firmware.
Other option would be to use the BLE HCI protocol. I did it this way. Have a look at https://github.com/jens6151/spresense-BLE-with-XIAO-BLE