Setting Up Wi-Fi Simple Configuration with NFC on Raspberry Pi

This post shows steps to setup Wi-Fi Simple Configuration with NFC adapter on Raspberry Pi using nfcpy[1]. The goal is to enable “tap-to-connect” a NFC enabled phone with a Wi-Fi access point [2].

 

Prerequisites (parentheses indicate my environment)

 

Steps
1. Installation
1-1. Install nfcpy.

1-2. Verify installation by running the module.

The output should be like this:

1-3. As the output suggests, copy line 11 above and execute it.

1-4. Reboot the system.

1-5. After reboot, run the module again.

This time, the output should be like this:

 

2. Setting up Wi-Fi Simple Configuration
2-1. Download example code [3].

2-2. Create NDEF data [4] for Configuration token [5].

Note: Replace “NETWORK_NAME” and “PASSWORD” based on your environment.

2-3. Write NDEF data to NFC adapter [6].

 

3. Test
3-1. Enable NFC on the phone.

3-2. Move the phone close to the NFC adapter.

3-3. Allow to connect if the phone asks for permission.

 

 

References
[1] Python module for near field communication – nfcpy
[2] WPS adds NFC “tap-to-connect” for simple set up – Wi-Fi Alliance
[3] nfcpy – GitHub
[4] NFC Data Exchange Format – nfcpy
[5] make wificfg – nfcpy
[6] emulate – nfcpy

 

 

Sponsor Link

Leave a Reply

Your email address will not be published. Required fields are marked *