Avatar for user132484

user132484

Member since Jul 2021 • Last active Sep 2021
  • 1 conversations
  • 8 comments

Most recent activity

  • in Bangle.js
    Avatar for user132484

    My only issue with the bangle 2 is the fact that the buttons disappeared.
    Idea is to use the watch possibly with gloves, I didn't find watches with a resistive touchscreen (precision of pointing with gloves on a such small screen may be ridiculous).
    So the three buttons to navigate in a menu and change parameters values is a really simple and effective way...

  • in Bangle.js
    Avatar for user132484

    Hi,
    Glad to hear that a "simple" modification as the antenna length can make a difference !
    (found this article on this topic : http://gaidi.ca/weblog/designing-a-bluet­ooth-antenna-how-to-go-about-it).

    My peripheral is using a ceramic chip antenna, bangle js too ?(from opening video, no long antenna visible...). I don't know how easy this type of antenna can be replaced.
    from https://www.digi.com/support/forum/6926/­is-it-possible-to-replace-a-chip-antenna­-with-a-wire-one , it looks possible.

    I read some old post on the forum talking about BLe efficiency, where you talked about the +4dbm max that offers the nrf chip and the fact that it is the default value.
    I did same with my peripheral (the nRF52840 chip can go up to +8dbm), the modification of the tx power only affects one Ble role . https://devzone.nordicsemi.com/f/nordic-­q-a/36531/how-do-you-set-tx-power-for-al­l-power-roles.
    Do you know if the call to the function affects everywhere ? (Anyways a change of +4dbm is not sensible, so it won't solve the issue).

  • in Bangle.js
    Avatar for user132484

    Hi, it's been a while I didn't use the watch for my project, and today I experienced a lot of troubles regarding Ble. I set my peripheral in pairing no bonding mode (I first tried in pairing/bonding but no password).
    My phone has succeded in connecting all the time, but not the bangle. I should say the success of the pairing is around 40%. This success rate is not bothering to conduct the tests I want.
    For the rest, i am facing a "Not connected" error (caught after get primaryService method), or a Ble error 0x11 (Busy ).

    Unfortunately, even during the data exchange of values, I faced weird behavior.
    The communication stopped without having the 'gattserverdisconnected' callback triggered.
    Even the Bluetooth communication used for debug to my computer stopped !
    The peripheral, the computer and the bangle always stay close (never farer than 3m).

    I started looking at my RSSI values for the different devices (values for devices 0 to 1m away):
    Phone detecting my peripheral (-50 to -75 using nrf connect ).
    Bangle detecting my peripheral (-85 to -95 using the value from BleScanner app ).
    Phone detecting bangle (-70 to -100 using nrf connect).

    I also used the setRSSIHandler to log the RSSI values of the signal during connection, It disconnect when values are around -85 and above (I can see the rate of the logs decreasing with the RSSI value).

    So the problem for my disconnection seems to be that the signal strengh of the Bangle is too low.
    Is there any way I can improve the signal strengh ? My issue is that the peripheral is behind the user (on his back), the body seems to affect the signal too strongly.

    You can find attached my function I use to pair, but we already exchange about it, I don't think I am doing wrong.

    Sincerely

    Edit :
    I've been able to modify the peripheral strengh of the signal through software (nothing very crazy though) using the sd_ble_gap_tx_power_set function of the nrf SDK library. I also did the same with the bangle library.
    The change on the bangle did not have visible effect. Maybe the disconnection issue is related to the min and max intervals set at the beginning of the connection ?

  • in Bangle.js
    Avatar for user132484

    Hi,
    now I have a "on value change" characteristic listener and depending on the user's action, a writeValue function call to another characteristic (from the same service).
    Sometimes I have an error : "BLE task X is already in progress" (X being 3 or 8 from my tests).
    What I understand from this error is that the "Ble manager" is already busy doing something (what may not matter).
    Could you explain me how to avoid this issue ?

  • in Bangle.js
    Avatar for user132484

    Hi,
    I modified my peripheral code to change the pairing process, I still have some issues but no more related to the bangle ! thanks for your help :)

  • in Bangle.js
    Avatar for user132484

    Hi,
    Using the debugger, I was able to see differences between the evt displayed for an android binding and the espruino binding. As a newbie in the nrf library it's quite obscure. Something that I didn't mind till now is that on my android I have to press pair two times before connection happens, first time the pop-up has no password, pressing pair throw a pop-up with a password to enter in order to bind.

    I told you the passkey request listener wasn't called, I can see the peripheral (NRF 5SDK) is handling a "BLE_GAP_EVT_LESC_DHKEY_REQUEST" event in the case of the android, but not for the espuino.
    I can also see the BLE_GAP_EVT_TIMEOUT happening for the espruino, ending in a no bond status. What is weird is that the security status from espruino side is "bonded : true", that i can notify, read and write without throwing errors (read returns empty array).

    If you already dealt with nrf event ids, at some point the android-peripheral connection has an event with ID = 0x3A and for the espruino-peripheral it's 0x55 (GAP or GATT event).
    Sometimes I can't connect to my peripheral with both devices and the peripheral is not even throwing a peer manager event. In that case the espruino is throwing BLE error 0x11 (BUSY). But that seems not to be a related issue.

    I know most of my issues are not related to your API, I mentioned them just in case someone went through the same.
    I will now try to configure my peripheral for biding without password, this nrf...
    Best regards,

  • in Bangle.js
    Avatar for user132484

    I am using the espruino_2V09 firmware, I downloaded it this morning.
    I just tried your suggestion, it's not working. I tried different timeouts, in any case I was able to enter the callback for the passKey request.

    I have access to the peripheral so I will check with debugger what is happening from his point of view (don't expect too much I am far from expert aha), and will also try to remove the password in order to move on with the communication between devices.
    I hope it is possible to not request a password from specific devices (my goal is to prevent phones to pair but not potential other bangles).
    I will update this thread after getting infos from the peripheral.

  • in Bangle.js
    Avatar for user132484

    Hello,
    I am trying to communicate with a Ble peripheral that need a password to be bounded.
    I used the BleScanner code to find the device without a single problem. Now I am trying to access to the device's characteristics.
    I tried to do the following :
    -NRF.scan -> returns BluetoothDevice.
    -NRF.connect(device.id) -> returns BluetoothRemoteGattServer (let's call it g as in examples).
    -g.startBonding() -> returns a resolved promise.
    -g.getPrimaryService("UUID")->generates an uncaught error : BLE error 0x11 (BUSY).
    I also tried without the bonding part, with the same result.

    I tried to add the 'passKeyRequest' handler in order to use sendPasskey function (after I scanned and after I used NRF.connect(device.id) ), but it didn't work : 'the callback function is never called (I put a console.log inside it).

    you can find attached a simplier version of the code I made.
    Best regards,
    Nicolas

Actions