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

How to make a smartphone become a ble mesh node?

Hi,

For smartphone, I mean those support ble specification 4.0 and have GATT interface.

Is it possible to provision it ( by nRF mesh running on another smartphone, for example) and make it become a ble mesh node?

  • Hello,

    Smart phones doesn't support the Bluetooth Mesh protocol (yet, at least), so at this point in time, I don't think this is possible.

    I guess it would be possible to implement some sort of library that can use the BLE scanner to listen for packets, and the advertiser to send BLE messages, but as of today, you wouldn't have this kind of control of the radio in your smartphone to scan for Mesh messages 100% of the time, like Mesh Nodes do, so in reality it will be quite tricky to accomplish. 

    A common approach is to use BLE (not Mesh) to communicate between a Mesh node and a phone, and hence use this as a gateway node / bridge, to communicate between phones and a Mesh network.

    BR,

    Edvin

  • Hi, Edvin,

    Thanks for the reply.

    I thought proxy node can be the relay between mesh and smartphone, so, with the help of a proxy node, is it possible to provision smartphone to be a mesh node?

  • Hello,

    That will not be exactly how it works. 

    You will not be able to provision the phone with Mesh, simply because phones does not support Bluetooth Mesh protocol. 

    You must write a custom application for the gateway node. You need to decide what information that is relevant for the phone, and forward this data to the phone over BLE. How to do this is not part of the Mesh specification, so this is something you need to figure out. We have a couple of examples found in the sdk_coexist folder in the mesh SDK that has BLE + Mesh, and one of them uses the Nordic UART service, which is a service that can send message strings over BLE (at the same time as it runs mesh).  See if you can use this to pass data back and forth between the Mesh network and a phone.

    BR,

    Edvin

  • Hi, Edvin,

    What's proxy protocol for? only for supporting smartphone as provisioner?

    Look what mesh profile says: "The proxy protocol enables nodes to send and receive Network PDUs, mesh beacons, proxy configuration messages and Provisioning PDUs over a connection-oriented bearer.
    For example, a node could support GATT but not be able to advertise the Mesh Message AD Type. This node will establish a GATT connection with another node that supports the GATT bearer and the advertising bearer, using the Proxy protocol to forward messages between these bearers."

    That sounds funny, looks like they do want to support smartphone as a mesh node, but provide no way to get it provisioned?

    About Nordic's sdk, that sounds good, I'll check it, thank you.

  • Hi,

    The proxy is a BLE service used for provisioning. You would need to add another service to do custom stuff. 

    The proxy service is used to provision nodes. E.g. the provisioner can be a phone (using e.g. the nRF Mesh app). In this case, the mobile phone is the device that generates the network keys, and tells the nodes through  the proxy service what channels to subscribe to and what channels to publish on. This will set up the network for the nodes, but the nodes are still not able to send mesh messages to the phone.

    If you want to send messages to a phone, this has to be done through the application. E.g. you have a Mesh model (Mesh "model" is the same as a BLE "Service") that some or all of the nodes subscribe to. Whenever you receive a message on this model, the nodes can check:

    "Ok, I have a message for the phone. Am I connected to the phone via BLE? If yes, forward the information in this message, if not, either store the message payload until I get a connection to the phone, or discard it and hope that someone else who also received this message is connected to the phone."

    Best regards,

    Edvin

Related