Receiving simple data from phone

Posted on
  • Hello everyone,

    for my future Bangle.js project I need to send data from my Android device to the watch. Since I'm experienced in the Android development part, I only struggle with the watch side.
    I would assume there should be a simple way of receiving data via Bluetooth (LE) that just reacts to incoming "streams" from the phone.

    Could anyone point me in the right direction?

    I found that one
    http://forum.espruino.com/conversations/­364065/#comment16008718
    but it doesn't seem to be exactly what I need. Especially since it's pretty much code where as I would simply be happy with a minimal example like sending a String to the watch and printing it.

    Thanks for any assistance.

  • Have you checked the tutorials? You might find something there...
    https://www.espruino.com/Bangle.js2#tuto­rials

  • Hardware reference also has some small examples under BluetoothDevice and BluetoothRemoteGATT* types

  • Maybe your best port of call is https://github.com/NordicPlayground/Andr­oid-nRF-UART

    You can use the 'Nordic UART' Bluetooth LE service provided by Bangle.js out of the box. Then you're communicating direct with Bangle.js's REPL - so basically you send JS commands followed by a newline and they're executed.

    https://www.espruino.com/Interfacing#blu­etooth-le probably gives you a good idea of what sort of thing you can do.

    You can of course create custom Bluetooth characteristics but I think for most things that's overkill

  • Thanks a lot, I had a look at the tutorials but did not find something very usefull. But thanks for all the suggestions. I will give it a try!

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

Receiving simple data from phone

Posted by Avatar for Tobias @Tobias

Actions