Pairing MDBT42Q to Bluetooth SPP device with Pin

Posted on
  • I have a Bluetooth heater controller that I would like to connect to with my Espruino MDBT42Q. The controller uses an HC-05 Bluetooth module and sends/receives JSON strings using SPP. I am able to communicate with the controller via PC when paired to it (using a pin), but don’t know if this is possible using Espruino.

    Can someone let me know if this is possible and if so, point me in the right direction on how to pair with the controller using a pin? Thanks!

  • HC-05 cannot do BLE and MDBT42Q cannot do classic bluetooth, either you replace HC05 with HM-10 or 11, JDY-08 or similar BLE to serial module and then use MDBT42Q directly to talk over BLE to it or you get another HC-05 that you connect to serial pins of Espruino device without using BLE and pair both HC-05 together

    some info about HM-10 also here

  • Ok that now makes sense. I am already using the MDBT42Q to get data from some BLE sensors, so may replace the HC-05 for an HM-10 or similar as you have suggested.

    Thanks for the help

  • I have just opened the heater controller and despite the manual saying it has an HC-05 module, it actually has a DX-BT18 module which I believe does have BLE. Do you know whether I would be able to connect to this using the MDBT42Q?

  • BLE is quite easy to use, tx/rx is just writing to characteristic and reading=getting notifications, the manual is here­216091 near the end there are default service and characteristics IDs.

    Not sure there is better ready to use module but you could simply use the ble_uart module and replace nordic uuids in the source­t.js by those from the manual (or reconfigure the module to use nordic ones but that is probably harder)

    also if you have android phone the "Serial Bluetooth Terminal" app is good to try with the module - you should be able to connect over BLE and test how it works. It also has custom mode where you can scan ble device and pick rx/tx characteristic by id from the list

  • I managed to get it working by modifying the ble_uart module as suggested, thanks. There does seem to be a lot of serial data being missed, but presume that this is due to me running the console via Bluetooth at the same time. I will connect via Serial1 to see if this improves the data.

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview

Pairing MDBT42Q to Bluetooth SPP device with Pin

Posted by Avatar for user157904 @user157904