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

MESH Proxy client

Hi,

I need to develop a proxy client using the Nordic SDK, running a central device role using the nRF52840. The central device will connect to already provisioned nodes using GATT (node code is derived from your light switch examples). Optionally will also act as a provisioner for these nodes, either PB-ADV or PB-GATT.

A requirement is to have several simultaneous connections with separate peripheral nodes running the proxy server service.

Is there any example of how to configure the proxy client on the central device. Or some guidelines or documentation?

NOTE: I can't just go for Mesh communication since the same peripheral nodes need to be communicating with a Smartphone (not at the same time though).

Parents Reply Children
  • Hi,

    I know this may sound illogical to a degree, but the fact is we have no control over the mesh nodes and this is the design we have to adapt to. Moreover, the phone(s) and our device just act as gateways for sending data to the cloud, and the customer wants to have control which device is the one connected with a node and transferring data. Provisioning is there just to take advantage of adding/removing nodes to the network and securing/encrypting the data.

  • Hi Ales, 

    Please clarify do you have full control over the gateway node ? 
    My suggestion is to have this type of topology: 

    Normal Mesh Nodes <---ADV bearer---> Your Gateway node <---- BLE ----> Phone <--- Wifi/4G ---> Cloud 

    Is there any reason this wouldn't work ? 

  • Yes we have full control over the gateway node.

    However the topology is more like this:

  • I see, I still don't know why you want to have GATT connection to the DEVICE. I assume to unify the way you get to the cloud. 

    If it's what you want to do I afraid that we don't have a ready to use solution. GATT Proxy client has only be implemented on the phone. 

    But it should be feasible to implement that on the current mesh stack. It's just require some work. On the nRF52 we already have a mesh stack (unlike on the phone) what you need to implement is to follow what we have in the Gatt proxy server and implement a similar proxy but on reserved role. You may need to follow what described in the mesh stack to do so. 

    We can try to help if you find an issue, but for now we unfortunately don't have a plan to make an example for that role yet. 

  • Hi,

    thank you for the info so far.

    I'm trying to implement the client proxy deriving from the server-proxy example, and what I did so far is:

    (device is provisioned beforehand)

    1. connect to the device

    2. do a db discovery of services for the service 0x1828

    3. subscribe to notifications on the TX characteristic

    I'm able to get the data sent by the proxy server node in the on_hvx event handler.

    NOTE the node sends the data using the mesh_gatt_packet_alloc and mesh_gatt_packet_send functions, and for sending the data a new  mesh_gatt_pdu_type_t enum is defined and inserted before the MESH_GATT_PDU_TYPE_PROHIBITED value. This is the approach the node uses to send the data (I have no control over that).

    I'm however not sure how to implement the sending from the client (central) to the server (node). Any suggestions on this? Is the overall procedure correct, for what I want to accomplish, or you suggest a different approach?

Related