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

Bluetooth Mesh Provisioning available via NFC?

Hi, guys!

Since the nRF52 DK's support NFC,

I was wondering whether it is possible to provision an nRF Mesh client/server using NFC and a Google Android phone.

I just want to use my Android Phone (like Nexus 5) as a Mesh Provisioner and I want the nRF devices to be provisioned by tagging it.

0) Are there any Android / iOS NFC app example (with Codes - Java / Go / Swift, etc) from Nordic that acts as a Mesh Provisioner, regardless of the NFC feature?

1) What about an Android / iOS NFC app example that can use NFC to provision an nRF mesh device?

I know the iOS has Core NFC now so I was curious about this.

-Thanks!

Parents
  • Hi Matthew, 

    Could you clarify, you want to use the NFC to send all provisioning data or you just want to use the NFC for authentication. 

    In our implementation now it's not too hard to use NFC as an Out Of Band authentication when doing provisioning. Meaning the provisioning is still via BLE, but the authentication is OOB. You can add a feature to the phone app to get the Bluetooth address of the node being provisioned via NFC so end user doesn't have to scan and click connect, but it should connect automatically. Similar with BLE bonding with NFC we have. 

    If you want to do everything via NFC, meaning all the provisioning data being exchanged via NFC. This we don't have and you would need to implement on your own. But I don't see any reason this wouldn't work. 

  • you want to use the NFC to send all provisioning data or you just want to use the NFC for authentication. 

    Hello! I was thinking about using NFC for authentication; saying I wanted the nRF Mesh clients/servers to join the mesh network by simply tagging with the smartphone.

    If you want to do everything via NFC, meaning all the provisioning data being exchanged via NFC.

    About the "provisioning data" - can you elaborate this, please? I didn't understand what you've meant.

    I wish to listen to your explanation before answering.

    For instance, from the Mesh blinking example, does the "provisioning data" corresponds to the "state data"?

    - Light switch server: A minimalistic server that implements a Generic OnOff server model, which is used to receive the state data and control the state of LED 1 on the board.

    Or does this means something more? I'm getting used to Mesh so I welcome your feedback.

    Meaning the provisioning is still via BLE, but the authentication is OOB.

    Can I ask for more detail about the authentication, please?

    I was hoping to provision the tagged nRF Mesh devices only. Is this what you've meant?

    In our implementation now it's not too hard to use NFC as an Out Of Band authentication when doing provisioning.

    Awesome! Is there any example codes to test this, please?

    -Thanks!

  • Hi Matthew, 

    Please read more about provisioning process at chapter 5 in the Mesh Profile v1.0 

    You can have a look at this blog here as well.

    The provisioning data here (also configuration data) are the network key, the node address, the application key, configuration on the publication address, subscription address. It's not related to the state data you quoted. The state data is more on turn on/off the LED. 

    You can have a look at the thingy mesh demo here. In the example we use the LED to blink as an OOB of authentication. In your case you can use the NFC to send the authentication data instead of the number of blink. 

    An extra thing you may want to do is to use NFC to tell the phone to connect to the device instead of having to scan and choose the device. This is similar to our NFC bonding example we have. 

  • Please read more about provisioning process at chapter 5 in the Mesh Profile v1.0 

    You can have a look at this blog here as well.

    Thanks for the link!

    An extra thing you may want to do is to use NFC to tell the phone to connect to the device instead of having to scan and choose the device. This is similar to our NFC bonding example we have. 

    Cool, I think that is just what I needed, nothing more for now.

    Since you've mentioned about the "bonding example", are you mentioning the NFC HRS bonding example from SDK 15?

    Or is there an example that uses NFC for provisioning?

    -Thanks!

  • Yes, you can have a look at the ble_nfc_pairing_reference and the other nfc pairing in \examples\ble_peripheral\experimental. It's for waking up the chip, start advertising and start BLE pairing. Documentation here

    However, in your case it's a little bit different that you don't need bluetooth pairing but just to receive the address of the Bluetooth device (the mesh node). 

    I'm not sure there is a library on the phone to do that. But anyway you can simply put the address on the NFC tag and in your app you access NFC directly on the phone and read that NFC tag value. I mean you don't need a standard library to do what you want, you can implement your own code to read NFC and start the connection to do provisioning. 

Reply
  • Yes, you can have a look at the ble_nfc_pairing_reference and the other nfc pairing in \examples\ble_peripheral\experimental. It's for waking up the chip, start advertising and start BLE pairing. Documentation here

    However, in your case it's a little bit different that you don't need bluetooth pairing but just to receive the address of the Bluetooth device (the mesh node). 

    I'm not sure there is a library on the phone to do that. But anyway you can simply put the address on the NFC tag and in your app you access NFC directly on the phone and read that NFC tag value. I mean you don't need a standard library to do what you want, you can implement your own code to read NFC and start the connection to do provisioning. 

Children
  • However, in your case it's a little bit different that you don't need bluetooth pairing but just to receive the address of the Bluetooth device (the mesh node). 

    Thanks for pointing that out!

    I'm not sure there is a library on the phone to do that.

    Really? I thought the Nordic's Github page that has both iOS Mesh and Android Mesh had the library to do this job.

    you can implement your own code to read NFC and start the connection to do provisioning. 

    If those Github code doesn't have this feature, you are saying I have to

    0. Wake up the nRF52 via NFC (like remove 'nfc_ble_pair_on_pm_params_req` in `pm_evt_handler`, add `nfc_callback`, etc)

    1. Send the Mesh device's MAC address (read it using `sd_ble_gap_address_get(&ble_addr);`) to the smartphone via NFC

    by adding text records to NDEF text message (like `nfc_ndef_msg_record_add`)

    2. The smartphone starts to provision the device using the received address

    This is what you've meant, right?

    -Thanks for your help!

  • Correct, the library for iOS and Android is more about Mesh and has nothing to with NFC. 

    What you described is correct. The point is to shorten the process of scanning the device, select it and connect to it. All should be done automatically by a touch on the NFC tag. 

Related