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

Mesh GATT PDU TYPE question

Hello everyone

I have a small question about Mesh_gatt_pdu_type_t in light_switch_example. 

When my NRF52 connect with smartphone over BLE mesh proxy, my smartphone will send data to nrf using GATT characteristics. So what pdu type of this message transmit ?

typedef enum
{
MESH_GATT_PDU_TYPE_NETWORK_PDU,
MESH_GATT_PDU_TYPE_MESH_BEACON,
MESH_GATT_PDU_TYPE_PROXY_CONFIG,
MESH_GATT_PDU_TYPE_PROV_PDU,
MESH_GATT_PDU_TYPE_PROHIBITED,
MESH_GATT_PDU_TYPE_INVALID = 0xFF
} mesh_gatt_pdu_type_t;

Thank you Stuck out tongue

  • Hi Nhi, 

    It depends on which packet you are sending from the the phone. There are a few generic types: Configuration packet (MESH_GATT_PDU_TYPE_PROXY_CONFIG) , Provisioning packet (MESH_GATT_PDU_TYPE_PROV_PDU) or beacon packet (advertising) and normal mesh packet (MESH_GATT_PDU_TYPE_NETWORK_PDU). 
    If you have a light switch model on the phone and switch on and  off the light on the device , it should be MESH_GATT_PDU_TYPE_NETWORK_PDU.

    Please refer to the Mesh spec to find definition of each type. 

  • Chào Hung

    I mean that when my phone establish GATT connection with nrf52 using Mesh Proxy Service (Data In and Data Out).

    It is hard to find answer by myself because NRF connect app do not support full stack BLe mesh. The connection will automatically disconnect every time I tried to send data over Mesh Proxy Data In.

    I guess that will be normal mesh packet (MESH_GATT_PDU_TYPE_NETWORK_PDU). is it right ?

  • Hi Nhi, 

     

    No, don't use nRFConnect it not a proper app to do Mesh. Please use nRFMesh app. We have the mesh stack implemented on that app. I would suggest to have a look at the source code of the app. 

  • Hi Hung

    I had already attempted to use NRF mesh app, it can search and provision device but can not connect to.

    My app nrf mesh version 1.0 and nrf52 with proxy_server example nrf5 mesh 2.1.1

  • What do you mean "connect to ",  you configured it meaning you was connected to it. If you have generic on off model on it, you can control the light directly from the app. 

1 2