This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

mesh serial example and thingy52-mesh-provisioning-demo

Hi Nordic experts:

I use a device with thingy52-provision-demo firmware(from git-playground), and another device with serial-example to provision the thingy-provision-demo device.

But I get wrong message at "application keys" step in the infocenter page:

http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.meshsdk.v2.0.1%2Fmd_scripts_interactive_pyaci_doc_demo_configuration.html&cp=4_1_0_2_0_2

See the wrong message as following:

My serial-example and PyACI is from mesh-sdk2.0.1+sdk15, I know the infocenter page is for light-switch-simpleOnOff model, not for genericOnOff model of thingy-provision-demo, 

But is PyACI+serial-device also able to provision the thingy-provision-demo-device?

How to use "cc.model_app_bind" command?

Thanks a lot!

Parents
  • Hello Joseph,

    In our light switch example, we use SimpleOnOFF model which is "vendor specific" model, not a Bluetooth SIG defined model.

    So we need to add a "company ID" to indicate that we are using "Nordic specific model".

    That's why we call:

    In  [12]: cc.model_app_bind(db.nodes[0].unicast_address, 0, mt.ModelId(0, 0x59))
    2018-03-09 14:53:13,714 - INFO - COM1: Success
    2018-03-09 14:53:13,733 - INFO - COM1.ConfigurationClient: Model app bind status: AccessStatus.SUCCESS
    2018-03-09 14:53:13,751 - INFO - COM1.ConfigurationClient: Appkey bind 0 to model 00590000 at 0010

    Which "0x59" is the company ID of NordicSemi, and "0" is the model ID for the SimpleOnOff model

    But for "GenericOnOff" model, it is a Bluetooth SIG defined model, so we don't need to mention its company ID.

    Let us back to the serial interface API "mt.ModelId()"

    In [14]: mt.ModelId?
    Init signature: mt.ModelId(model_id, company_id=None) 
    Docstring:      <no docstring> 
    File:           c:\nrf_workspace\mesh_workspace\nrf5_sdk_for_mesh_v2.0.0_src\scripts\interactive_pyaci\mesh\types.py 
    Type:           type 

    The default setting for the company_id in mt.ModelId is "None". 

    So to bind an AppKey for a "GenericOnOff" server model, we don't need to fill anything in "company_id".

    The following command will work:

    cc.model_app_bind(db.nodes[0].unicast_address, 0, mt.ModelId(0x1000))

    Hope the upon information can do help :)

  • Hi Rick:

    Using "mt.ModelID(0x1000)"  instead of "mt.ModelID(0x1000, 0x51)" works!

    PyACI looks like a good tool, I will keep on trying other steps, thanks.

Reply Children
No Data
Related