You are reading a single comment by @fanoush and its replies. Click here to read the full conversation.
  • I am testing now the example and it doesnt work very well. Longer output is incomplete.
    @Gordon can I call NRF.updateServices like that in a busy loop? without interpreter being idle
    https://gist.github.com/fanoush/04d0777f­99bb4d153aa1a40aa218db55#file-desay-jsev­al-js-L39
    Could some update overwrite/cancel previous update without the data being sent?

    Even with maxlen 20 to rule out MTU issues I get something like this

    Connecting to Bangle.js 09cf.
    Found 4 services:
    #00: 0x1800 (GenericAccess)
    #01: 0x1801 (GenericAttribute)
    #02: 6e400001-b5a3-f393-e0a9-e50e24dcca9e
    #03: 0x190A (6410)
    BLE: set #03
    Selected service 0x190A (6410).
    #00: 0x2 (2)      N
    #01: 0x1 (1)     W
    BLE: subs #00
    BLE: write #01 process.env\n
    Value changed for 00000002-0000-1000-8000-00805f9b34fb: {"VERSION":"2v16.21"
    BLE: Value changed for 00000002-0000-1000-8000-00805f9b34fb: ,"GIT_COMMIT":"77922
    BLE: Value changed for 00000002-0000-1000-8000-00805f9b34fb: SION":2,"STORAGE":83
    BLE: Value changed for 00000002-0000-1000-8000-00805f9b34fb: e,heatshrink,crypto,
    BLE: BLE: write #01 process.env\n
    Value changed for 00000002-0000-1000-8000-00805f9b34fb: {"VERSION":"2v16.21"
    BLE: Value changed for 00000002-0000-1000-8000-00805f9b34fb: ,"GIT_COMMIT":"77922
    BLE: Value changed for 00000002-0000-1000-8000-00805f9b34fb: FLASH":1048576,"SPIF
    BLE: Value changed for 00000002-0000-1000-8000-00805f9b34fb: OLE":"Bluetooth","MO
    BLE: Value changed for 00000002-0000-1000-8000-00805f9b34fb: AM_BASE":536882880}
    BLE: BLE: write #01 process.env\n
    Value changed for 00000002-0000-1000-8000-00805f9b34fb: {"VERSION":"2v16.21"
    BLE: Value changed for 00000002-0000-1000-8000-00805f9b34fb: ,"GIT_COMMIT":"77922
    BLE: Value changed for 00000002-0000-1000-8000-00805f9b34fb: FLASH":1048576,"SPIF
    BLE: Value changed for 00000002-0000-1000-8000-00805f9b34fb: 88608,"SERIAL":"d3c2
    BLE: Value changed for 00000002-0000-1000-8000-00805f9b34fb: OLE":"Bluetooth","MO
    BLE: Value changed for 00000002-0000-1000-8000-00805f9b34fb: tensorflow,locale","
    BLE: Value changed for 00000002-0000-1000-8000-00805f9b34fb: AM_BASE":536882880}
    BLE: BLE: write #01 process.env\n
    Value changed for 00000002-0000-1000-8000-00805f9b34fb: {"VERSION":"2v16.21"
    BLE: Value changed for 00000002-0000-1000-8000-00805f9b34fb: ,"GIT_COMMIT":"77922
    BLE: Value changed for 00000002-0000-1000-8000-00805f9b34fb: FLASH":1048576,"SPIF
    BLE: Value changed for 00000002-0000-1000-8000-00805f9b34fb: 88608,"SERIAL":"d3c2
    BLE: Value changed for 00000002-0000-1000-8000-00805f9b34fb: OLE":"Bluetooth","MO
    BLE: Value changed for 00000002-0000-1000-8000-00805f9b34fb: tensorflow,locale","
    BLE: Value changed for 00000002-0000-1000-8000-00805f9b34fb: AM_BASE":536882880}
    BLE: BLE: write #01 process.env\n
    Value changed for 00000002-0000-1000-8000-00805f9b34fb: {"VERSION":"2v16.21"
    BLE: Value changed for 00000002-0000-1000-8000-00805f9b34fb: ,"GIT_COMMIT":"77922
    BLE: Value changed for 00000002-0000-1000-8000-00805f9b34fb: SION":2,"STORAGE":83
    BLE: Value changed for 00000002-0000-1000-8000-00805f9b34fb: e,heatshrink,crypto,
    BLE:
    

    This is bleconsole on Windows 10 which can be buggy but I get same thing in nrfconnect on Android phone. I receive only some random subset of splitted array. What is also strange is that sometimes I don't get last part of the output so later calls do not overwrite previous ones. Also at least first two or mostly three are OK, it breaks later.

    Will retest with some other device without lot of stuff running on the background

About

Avatar for fanoush @fanoush started