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

Mesh App Provisioner + Client

Hello everyone, 

I want to develop an android app, which is able to control multiple LED Lamps in a Mesh Network. 

There is an app for provisioning provided by Nordic. Is it possible, to also set this app up both as a client and a provisioner, so I can at first provision my devices and afterwards send messages to the servers from the app, to control the lighting? 

Best regards 

Julian Demicoli

IDE: Segger Embedded Studio for ARM V3.4

SDK: 15.0 + SDK for Mesh,

Softdevice: 6.0.0

Computer Platform: Windows 10 64 Bit

Hardware revisions: NRF52 Development Board

Parents
  • Hi,

    The nRF Mesh supports controlling GenericOnOff models. So you should be able to turn on/off a LED on the DK. 

    Have a look at this, it is for iOS but I think it should be the same with the Android app.

  • Hi! I am trying to provision the dev boards but the light switch uses simple_on_off model and the app uses generic... The example that comes with the provisioning app is for thingy, so thats not so useful... can I ask if you know where I could find the firmware for the dev boards that use generic on off? or how to modify the sample from the sdk for mesh?

    I think I manage to modify the client but I am stuck with the server... :(

  • Hello technical, sorry for my late answer. 

    - In the simple_on_off_common.h you have to change the opcodes to: 

    typedef enum
    {
        SIMPLE_ON_OFF_OPCODE_SET = 0x8202,            /**< Simple OnOff Acknowledged Set. */
        SIMPLE_ON_OFF_OPCODE_GET = 0x8201,            /**< Simple OnOff Get. */
        SIMPLE_ON_OFF_OPCODE_SET_UNRELIABLE = 0x8203, /**< Simple OnOff Set Unreliable. */
        SIMPLE_ON_OFF_OPCODE_STATUS = 0x8204          /**< Simple OnOff Status. */
    } simple_on_off_opcode_t;

    - I also changed the ACCESS_COMPANY_ID_NORDIC in access.h 

    #define ACCESS_COMPANY_ID_NORDIC (0xFFFF)

    (It was just for testing purposes, you shouldn't change the nordic ID to the generic ID) 

    --> you could also change the #define SIMPLE_ON_OFF_COMPANY_ID   0xFFFF 

    - Last but not least you have to change the simple_on_off_server_model_id in simple_on_off_server.h

    #define SIMPLE_ON_OFF_SERVER_MODEL_ID (0x1000)

Reply
  • Hello technical, sorry for my late answer. 

    - In the simple_on_off_common.h you have to change the opcodes to: 

    typedef enum
    {
        SIMPLE_ON_OFF_OPCODE_SET = 0x8202,            /**< Simple OnOff Acknowledged Set. */
        SIMPLE_ON_OFF_OPCODE_GET = 0x8201,            /**< Simple OnOff Get. */
        SIMPLE_ON_OFF_OPCODE_SET_UNRELIABLE = 0x8203, /**< Simple OnOff Set Unreliable. */
        SIMPLE_ON_OFF_OPCODE_STATUS = 0x8204          /**< Simple OnOff Status. */
    } simple_on_off_opcode_t;

    - I also changed the ACCESS_COMPANY_ID_NORDIC in access.h 

    #define ACCESS_COMPANY_ID_NORDIC (0xFFFF)

    (It was just for testing purposes, you shouldn't change the nordic ID to the generic ID) 

    --> you could also change the #define SIMPLE_ON_OFF_COMPANY_ID   0xFFFF 

    - Last but not least you have to change the simple_on_off_server_model_id in simple_on_off_server.h

    #define SIMPLE_ON_OFF_SERVER_MODEL_ID (0x1000)

Children
No Data
Related