Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Export/Import Bluetooth mesh settings for a Bluetooth mesh gateway with Serial example and PyACI

I have an issue with creating a Bluetooth mesh gateway. It would be better to use nRF Connect SDK for me, but nRF5 for Mesh is also fine. As I've found among answers, not so long ago you recommended in another thread How to create gateway beetwen internet and Bluetooth mesh using nRF52840 to look at the combination of your Serial example and Interactive PyACI script. Also I set PERSISTENT_STORAGE to 1 in the Serial example to keep sequence number after power resets of a board. I've managed to use this approach to provision and control a Bluetooth mesh network, as you encourage to use in your documentation and guide Provisioning and running Nordic's BLE Mesh with Python Application Controller Interface (PyACI). Everything seems fine until I want to change the board or if I want to provision the Bluetooth mesh network using another App, for instance, your nRF Mesh for Android/iOS, and to control from the board, using Serial example and Interactive PyACI script with imported settings from a provisioner (mobile app).

Thus, I have a couple of questions to you:

  1. If to talk about two different boards, is it possible to provision and configure a Bluetooth mesh network from one board with Serial example and control it from another board with Serial example, exporting and importing settings, using kinda JSON file? And is it possible without making a hex dump file of flash memory?
  2. Probably, the answer for the second question will derive from the first one. If I provision the Bluetooth mesh network using your mobile app nRF Mesh for Android/iOS, next I export settings from there through JSON file, then is it possible to import those settings from JSON file to the Serial example and Interactive PyACI script to control the Bluetooth mesh network from the board?

If it's technically possible, then, please, point me how to implement such importing Bluetooth mesh settings to control a network.

I suppose, my questions are SDK version agnostic, but anyway, I use nRF5 SDK v17.0.2, nRF5 SDK for Mesh v5.0.0, SoftDevice S140 nRF52 v7.2.0, and my boards are nRF52840 DK.

Parents
  • Hi,

    The database file used by the interactive pyaci python script is found at <mesh sdk root>/scripts/interactive_pyaci/database/example_database.json. The format is the same as that used by the nRF Mesh for iOS and Android apps.

    Regards,
    Terje

  • Thanks for your response,Terje! However, I had quite other questions.

    If to talk about formats, they're not absolutely the same, unfortunately, but it's not the essence of my issue. If you try to import an exported database from nRF Mesh for Android, then you will face many various errors. Just as an example, netKeys.timestamp, provisioners.provisionerName, rovisioners.allocatedSceneRange in the exported JSON file are unexpected keyword arguments, when you try to import it, using a command kinda like db = MeshDB("database/example_database.json"). And there're other incompatibilities. But it doesn't matter for me right now.

    The point of my issue was about the ability to export such kind of database json file from a mobile app nRF Mesh, which was a provisioner of Bluetooth mesh network, or a nRF52840 board with the Serial example, which provisioned a Bluetooth mesh network, and import it to another completely clean nRF52840 board with the same Serial example firmware, and control the Bluetooth mesh network using PyACI without reprovisioning.

  • Hi,

    I am struggling a bit in following the setup (very long sentence with a lot of devices mentioned), but I think this will answer most of it:

    • When using the PyACI, the database is stored in that json file on the PC. There is nothing about the database on the nRF itself, so the board is interchangeable as long as you connect from a PyACI instance using the same database.
    • I was under the impression PyACI and the mobile apps used the same format (which I confirmed through manual comparison.) However, it looks like there might be version inconsistencies and/or some fields required in one implementation that is not present in the other, or vice versa. I wish DB export/import formats would become part of the Bluetooth mesh specification. It currently is not.
    • When using the nRF device itself for provisioning (e.g. through use of the provisioning example), there is no import or export, no.

    Regards,
    Terje

  • Hi RAlexeev,

    Had you found the solution to this project, we also want to provsioning a device by phone, then, use a nRF52840 board with the Serial example control the provisioned device.

    Looking forward to reply from you. Thanks.

  • Hi oplinux! I also wanted the same, but a Nordic example hadn't satisfied the requirements, unfortunately. And nowadays I doubt a bit in Bluetooth mesh popularity because of absence of gateway part in a specification and its realization, awful compatibility, since even present Chinese gateways support provisioning only theirs devices, and not others, and their devices have also limitations with provisioning, although all of them are Bluetooth SIG certified. That's why I decided to try Thread instead of Bluetooth mesh.

Reply
  • Hi oplinux! I also wanted the same, but a Nordic example hadn't satisfied the requirements, unfortunately. And nowadays I doubt a bit in Bluetooth mesh popularity because of absence of gateway part in a specification and its realization, awful compatibility, since even present Chinese gateways support provisioning only theirs devices, and not others, and their devices have also limitations with provisioning, although all of them are Bluetooth SIG certified. That's why I decided to try Thread instead of Bluetooth mesh.

Children
No Data
Related