Puck.js Bluetooth 5 Support?

Posted on
  • Hi Gordon,

    Does the Puck support Bluetooth 5 currently? I saw that the nRF52832 microcontroller supports Bluetooth 5 on the Nordic site (Aside from no long range capability), but I am not sure if the current firmware provides the Bluetooth 5 functions yet.

    Many thanks for all your responses.

  • Hi,

    It doesn't yet. My understanding is that Bluetooth 5 support is added in Nordic's SoftDevice version 5.0.0, which isn't properly released yet (it still seems to be alpha).

    When it is properly released, I'll move over to using Nordic's new SDK and we should get a lot of the BT 5.0 functionality.

    The one frustrating gotcha is that Nordic have dropped support for their nRF51 series chips in the new SDKs, so in order to keep support for the BBC micro:bit I'll have to have some huge hacks in there to allow me to support both SDK versions concurrently :(

  • Hi @Gordon,

    Range is a crucial for the project I work on. My tests with PUCK in open space reached up to 30 meters visibility, but in practice I am able to scan the adverstised data if the PUCK is up to 12 meters. As Bluetooth5 provides "LE Long Range", do you plan to revisit this option a year later?

  • Puck.js firmware can be built for SDK14 which does support Bluetooth 5, but it hasn't been tested enough so far, and in this case I don't think it will help you.

    The longer range is achieved just by slowing down the transmission speed, not by boosting the power in any way - but then I believe the slower transmission is only readable by bluetooth 5 devices, and not any older ones.

    What device are you using to read the advertising data? It may be that something with a better aerial will give you significantly better range.

    Also, have you tried NRF.setTxPower(4) - which will increase the transmission power.

  • Hi @Gordon,

    All my tests are done with NRF.setTxPower(4).
    Currently my server is Raspberry Pi 3 Model B with Bluetooth 4.2, but in future plan to use mobile phones or devices with Bluetooth5, because the range is an issue.

    As nRF52832 has Bluetooth5/ANT/2.4GHz, maybe I have to wait till the default build of Puck.js firmware is done with SDK14 and tested enough ?

    Do you think in this direction ?

  • Yes, I think you would have to wait I'm afraid. Looking at https://devzone.nordicsemi.com/f/nordic-­q-a/26047/s132-v5-advertising-extensions­ it seems that not even the most up to date software from Nordic actually supports Bluetooth 5 long range advertising.

    In the mean time, if you need that range I would try and find a USB Bluetooth LE adaptor with an external antenna (however I'm afraid I don't have experience with those). On the Pi, if you were using WiFi then disabling it would probably increase the range for you significantly as well.

  • Hi @Gordon,

    On Pi I gather the data via the built-in bluetooth and once per hour switch on the 3G modem to send data into the cloud and then switch it off.

    Do you think that 3G modem could impact the bluetooth range ?
    Do you think an additional BLE dongle could improve gathering the data ?

  • If the 3G modem is off then it wouldn't hurt the range, but if it is trying to establish a connection while you're scanning then I wouldn't be surprised if it had some effect.

    How long are you scanning for? The longer you scan the more likely you are to pick up the beacons.

    Just adding another BLE adapter is unlikely to increase the range, but having one with an aerial as near the outside of the box as possible and away from other electrical/metal parts would really help.

    If you can find a Bluetooth LE adapter with an external aerial (they do exist, but they seem quite rare) that's likely to make a huge difference.

  • Hi @Gordon,

    Do you think of using https://www.seeedstudio.com/MDBT50Q-1M-n­RF52840-Based-BLE-Module-p-3147.html in the Puck ? Is it too hard to implement it on the hardware and software level ? Should this add support for Bluetooth 5 finally ?

  • I'm looking into it - probably not for a new Puck, but for some other USB-connected board in the future.

    The issue is retargeting Espruino to work with a new Nordic SDK version as I'd said, since Nordic randomly change things and it's a nightmare trying to move SDKs. In the few months since your last question, Nordic released SDK15 with even more changes in it, so it's a moving target!

    One other thing that stops me is wireless firmware updates are painful since the Softdevice gets changed as well. It'll be a support nightmare as people update the softdevice and then find it hard to move back to the old one if they want to try out an earlier version.

    You can build Espruino for SDK15 now, and that should allow the use of Bluetooth 5 features even in the Puck (although flashing is tricky as the bootloader doesn't build yet), but it's not magic.

    You won't suddenly get increased range unless you explicitly enable Bluetooth 5 advertising though, and then your device will probably be undetectable by Bluetooth 4.2 radios.

    Did you try any of the other things I suggested in the post above? just having a Bluetooth receiver with a decent aerial will massively increase range.

  • Hi @Gordon,

    Does the Nordic SDK is a moving target in general or it becomes a moving target as you are trying to support multiple devices with single firmware ? As there is no backward compatibility in technologies as is bluetooth, added with the complexity of supporting multiple devices, are is your case, don't you think that forking the firmware for each, or required, device is the only solution to adopt most up-to-date technologies for the concrete device ?

    I haven't tested your last proposal but hopefully will get back with some results soon.

  • There's a huge amount of overlap between different nRF52 boards - so that's really not a big issue. However I do still have to support older SDKs for nRF51 and also other customers that use older SDKs on their devices. Forking really wouldn't help - it'd just give me even more to maintain.

    As I mentioned above it's not some magic fix for issues with transmission range. If you put SDK15 on a Puck it'll behave exactly like the current SDK12 version as far as I know... So the change in SDK is kind of useless on its own - there's even more work to do to add APIs to change advertising style/etc.

    There are still BLE 4.2 features like increased MTU size that would be more use to everyone and which IMO should probably take priority.

    There's actually been low demand for it too. I mean, there's basically only you that commented on this thread in 2 years, and as far as I understand it you're not even using Puck.js but have your own hardware that you run the Espruino firmware on?

    If you do have your own hardware, I can do consultancy work for you to get SDK15 working though.

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

Puck.js Bluetooth 5 Support?

Posted by Avatar for intern @intern

Actions