nRF52840 dongle serial hex for interaction with interactive pyaci

Hello developers,

Few months ago I started developing serial hex document for nRF52840 dongle which will be able to communicate with interactive pyaci so our company can provision and set the correct configurations in the mesh network of bluetooth lights sensors. After a long research I found out that I will have to update communication protocol between UART to USBD because many people on the forum were writing that dongle doesn't have an Segger chip that could understand the UART. That's why I found this documentation about USBD and I created the virtual port on the dongle and have sucessfully created so I recieve RX and TX from both devices. I had to update serial example and interactive pyaci script as well. Even if I have sucessfully created the virtual port and so both devices send the data to each other I can't create so the devices can understand each other for some reason I believe. I saw in the interactive pyaci that there is some kind of max bytes transmission on the UART but I don't know if this also should be applied on the different protocol such as USBD? In the interactive pyaci now I can sucessfully connect to dongle, get UUIDs and RSSI of the lights but when I try to provision then nothing happens. I will apply all the source code and the hex files so someone can deeply research my project because I can't find out what is wrong so the provisioning doesn't go through in the interactive pyaci.

I uploaded the hex of the dongle which I use and program it with programmer program and select the S140 softdevice once asked. After the upload of the hex was sucessfully flashed I run the interactive pyaci in the command prompt. Firsty change the directory to interactive-pyaci.py location and run the command "python interactive-pyaci.py -d COMx" or "python interactive-pyaci.py -d COMx -b 115200" where x is the port number which computer assigned you can check which port is used inside device manager. Once you are sucessfully inside interactive pyaci you can follow default commands such as in the pdf file I attached from one person who wrote it on the form, credits do not go to me for the pdf provided. On the provision thing the process get stuck because RX is being sent from the dongle but it seems like there is some kind of miss understanding between communication. Also please on the povision command use p.provision(uuid="HERE COMES THE UUID"). 

 

I have to stand out that our LED lights sensors use nR52832 chips but I don't believe this is the problem here.

Please let me know if you can open the files I uploaded or if not so I can assist you better. If the files that I uploaded can't be open please let me know the step-by-step tutorial on how to correctly send the zip file of all containing files and folders. If I missed anythng during the research please let me know.

I would really appriciate any help in advance.

Thanks,

zanluka

6445.interactive-pyaci.zip

2804.serial_nrf52840_xxAA_s140_7_2_0_archive.zip

7674.serial_nrf52840_xxAA_s140_7.2.0_hex.zip

0741.Mesh Demo - Generic DK.pdf

  • Hello zanluka,

    I will begin by setting some expectations. Us Nordic support engineers will most likely not be able to deeply research your project, but we are able to help you with specific issues.

    Since your support ticket is public to the rest of the DevZone community anyone with insights on this are encouraged to help out.

    I will have a closer look on your ticket contents and a quick look through your project within the next couple of days.

    Best regards,

    Maria

  • Hi zanluka,

    Our apologies for the late follow up.

    As Maria said, it would be hard for us to deep dive into your project to find what is wrong. A big part of the reason is that the PyACI script is a part of the nRF5 SDK solution, which is in maintenance mode. See the note in the first page of the SDK documentation: https://infocenter.nordicsemi.com/topic/struct_sdk/struct/sdk_mesh_latest.html.

    I personally haven't touched the PyACI script for many months. Our current solution for a BT Mesh - PC kind of bridge is Mesh Shell on the nRF Connect SDK. It provides a human-operable shell interface, which can be over UART or USB CDC ACM.

    Firstly, I would like to ask: How much effort has you put into the current project? Is it possible for you to switch to Mesh Shell now?

    Next. I see that your PDF documents describe the process for a demo. To do this demo, must you use the PyACI script? You could easily provision the mesh devices with the nRF Mesh mobile app.

    Finally, if I recall correctly, the PyACI script just provides you an interactive interface. It should connect with a COM port directly and not require any user configurations. Am I right to understand that you had to modify the script? Why is that?

    For reference, this is the log from my last time working with it, where I provisioned a few devices and bound an app key to them. I reached this point following the documentation in nrf5sdkformeshv500src\scripts\interactive_pyaci\doc and online documentation.

    db = MeshDB("database/example_database.json")
    
    p = Provisioner(device, db)
    p.scan_start()
    p.scan_stop()
    p.provision("b9ed5250206146188612adafdf9e29e7", 0, "Sensor", 0, 0)
    p.provision("f1f09dbd97e649818e0f62426819e67e", 0, "Observer", 0, 0)
    
    cc = ConfigurationClient(db)
    device.model_add(cc)
    
    cc.publish_set(8, 0)
    cc.composition_data_get()
    cc.appkey_add(0)
    
    
    cc.model_app_bind(db.nodes[0].unicast_address, 0, mt.ModelId(0x1100))
    cc.model_publication_set(db.nodes[0].unicast_address, mt.ModelId(0x1100), mt.Publish(db.nodes[1].unicast_address, index=0, ttl=2, period=3000))
    cc.model_publication_get(db.nodes[0].unicast_address, mt.ModelId(0x1100))
    
    
    cc.model_app_bind(db.nodes[0].unicast_address, 0, mt.ModelId(0x1101))
    cc.model_subscription_add(db.nodes[0].unicast_address, db.groups[0].address, mt.ModelId(0x1101))
    cc.model_subscription_get(db.nodes[0].unicast_address, mt.ModelId(0x1101))
    
    
    
    cc.publish_set(9, 1)
    cc.composition_data_get()
    cc.appkey_add(0)
    
    cc.model_app_bind(db.nodes[1].unicast_address, 0, mt.ModelId(0x1102))
    
    cc.model_subscription_add(db.nodes[1].unicast_address, db.groups[0].address, mt.ModelId(0x1102))
    cc.model_subscription_get(db.nodes[1].unicast_address, mt.ModelId(0x1102))
    cc.model_publication_set(db.nodes[1].unicast_address, mt.ModelId(0x1102), mt.Publish(db.nodes[1].unicast_address, index=0, ttl=2))
    cc.model_publication_get(db.nodes[1].unicast_address, mt.ModelId(0x1102))

    Hieu

Related