How to Send messages from nrf mesh app to nrf52840?

Hi All:

Now we are delveloping BLE Mesh using nrf52840 sdk( v5.0.0) and use light_switch example.

It is important for us to send 10 bytes of  message from nrf mesh app to nrf52840 device.

https://github.com/NordicSemiconductor/Android-nRF-Mesh-Library

In the Android-nRF-Mesh library, it has a feature to send messages to vendor models.

After successful provision and set the publications and subscriptions,the Mesh APP can control the light state (on/off) of nrf52840. 

We also can transmit 10 bytes of data from light_switch client to server by using the command of "access_model_publish(access.c)" as below.
      status = access_model_publish(p_client->model_handle, &p_client->access_message.message);

We hope the mesh APP can send segmented messages to the nrf52840 device.

How to set vendor models in nrf52840 and send n(n=10) bytes of segmented messages from nrf mesh app to nrf52840 device? 

Below is the android sdk for nRF Mesh.  

Is there a sample code for reference? How can do step by step?

Best Regards,

Sheng-Hua

Parents
  • Hello,

    I have only tested the iOS versions, but can you please try the following:

    Go to Node -> Element -> Model -> Custom UI to send messages on that node. E.g. for Vendor messages. Note that for Vendor Messages, you need to specify the Raw value.

    Best regards,

    Edvin

  • Dear Edvin:

    Thanks your help.

    I only have a android cell phone and can't find the path: "Node -> Element -> Model -> Custom UI " in addroid mesh app.

    Could you help test android version?

    Best Regards,

    Sheng-Hua

  • Hello,

    Open the Network tab at the bottom, then select the node containing the model that you want to use, expand the "elements" element, and click the model that you want to use. If you scroll a bit down, there should be a field that says "Controls", where you can enter an Opcode and parameters. I believe this is what you need to use. This is not a very elegant way of sending strings, and they have to be in hexadecimal values, but it is possible for testing. If you intend to have an app that you can send custom strings to the network, I think you need to implement this in a custom mobile application.

    Best regards,

    Edvin

Reply
  • Hello,

    Open the Network tab at the bottom, then select the node containing the model that you want to use, expand the "elements" element, and click the model that you want to use. If you scroll a bit down, there should be a field that says "Controls", where you can enter an Opcode and parameters. I believe this is what you need to use. This is not a very elegant way of sending strings, and they have to be in hexadecimal values, but it is possible for testing. If you intend to have an app that you can send custom strings to the network, I think you need to implement this in a custom mobile application.

    Best regards,

    Edvin

Children
Related