• Thanks @Gordon and @Sebastian for your answers ! I did some progress !

    Do you have an Android phone you could use for the App Uploads?

    Unfortunatly, i have a smartphone with a custom ROM instead of a stock Android one and the web browser i'm using does not work with the WedIDE.

    EspruinoTools is really if you're planning to do app development.

    Well, i'm a software engineer and i do plan to develop some of my own applications, especially tools for sailing ! =)

    You could also take a look at this example code for Noble. If you can get that working, everything else should work: https://www.espruino.com/Interfacing#nod­e-js-javascript

    That's what i've done : i managed to get the poweredOn event fired without any kind of trouble. Then, i wrote a small snippet of code to scan and discover nearby devices (more likely a glorified copy/paste of this example).

    But no devices where found and the script juste hang there, doing nothing. I dived into the noble code and into the bluetooth-hci-socket library and with some trial and error i managed to understand two things :

    1. The value of the bluetooth controller was undefined
    2. The Noble library tried to bind the socket using a raw mode

    So i used the global environnement variables to manually set the bind mode to user and the controller to 0 (hci0) and managed to get the snippet of code to list nearby devices, included my watch :

    $ HCI_CHANNEL_USER=1 NOBLE_HCI_DEVICE_ID=0 node bt_test.js
    powered on
    ...
    aa:bb:cc:dd:ee:ff Bangle.js xxxx
    ...
    

    Finally, i tried to do the same with EspruinoTools :

    $ HCI_CHANNEL_USER=1 NOBLE_HCI_DEVICE_ID=0 espruino --list
    Espruino Command-line Tool 0.1.37
    ...
    
    PORTS:
        aa:bb:cc:dd:ee:ff (Bangle.js xxxx) RSSI -82
    

    However, if i run the command without the --list, i get an error :

    ...
    RangeError [ERR_OUT_OF_RANGE]: The value of "offset" is out of range. It must be >= 0 and <= 3. Received 5
    ...
    

    It's another kind of problem and for now i'm quite satisfied with the progress so far, i'm gonna sleep a little bit and continue later. I will mark the thread as solved as soon as i've successfully uploaded an application to the watch.

    I'll keep you informed !

About

Avatar for Gouwi @Gouwi started