What happens to the bluetooth module on reset?

Posted on
  • Hi All,

    I have connected a HM-10 to the espruino and it works well if I unplug the USB cable, replug, connect to WEBIDE and use code that was saved to flash. It also keeps working after resetting the espruino with the reset switch.

    If I use the reset() function however, the HM-10 does not listen to my commands anymore. Is there a way to check if the UART connection is still working? The control LED of the HM-10 keeps flashing like it's waiting for orders, so the module itself seems to be running. The only thing I can think of is that the UART communication is not working anymore.

    Regards,

    Alex

    EDIT: I also tried connecting pin 11 of the HM-10 to ground, to reset it. After reset, its still not listening.. UART handshake or something?

  • Hi Alex,

    This could actually be a bug related to Espruino resetting pin states (even though Serial1 should have stayed as a UART) - try just explicitly setting Serial1 up:

    Serial1.setup(9600,{rx:A10,tx:A9});
    

    It shouldn't even need to be called from onInit, but if it doesn't work as-is, try sticking it in just in case.

  • Ok, this will be fixed for the 1v67 release.

  • Hi Gordon,

    Thanks for the reply, it works with the setup now. Happy to have presented a new bug for the great slaughterhouse :).

    Regards

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

What happens to the bluetooth module on reset?

Posted by Avatar for Alex @Alex

Actions