Frustration Free Networking#
For Sidewalk, the Frustration Free Networking feature allows a device to register to the network without user action. This process is called Touchless Registration. It is an automatic process that occurs between the unregistered Sidewalk endpoint and the Sidewalk gateway over BLE or FSK. This method does not require associating the endpoint with the user's AWS account. To ensure your device registers using Touchless Registration, complete the following:
Ensure your gateway is Sidewalk-enabled and in range (the closer, the better).
Ensure your endpoint is up and running and open JLinkRTT Viewer for logs.
Registration should begin automatically. You should see some log output.
Successful registration will be indicated with the log below:
<info> app: Registration Status = 0, Time Sync Status = 0 and Link Status = 0
Diagram Flow#
The following shows the Automatic Touchless Registration simplified flowchart:
If registration is attempted several times in a row and fails each time, the Gateway will block the device for a period of time. If that happens, rebooting the Gateway should reset the list of blocked devices. The following shows a full flowchart including device blocking.
Manual Registration Flow#
Manual registration over BLE is an alternative registration mechanism to Automatic Touchless registration. Amazon Sidewalk also supports registration using the Amazon Sidewalk mobile SDK.
Note that this step requires a Mac, Windows or an Ubuntu PC with Bluetooth capability in order to execute the Sidewalk endpoint registration. As an alternative, a Bluetooth USB dongle can be used. Also note that it is good practice to disconnect all your other BLE devices connected to your computer (wireless headset, mouse, keyboard...) during registration.
Create a New Security Profile#
Go to the Login with Amazon page.
Click Create a New Security Profile.
Complete the required information: Security Profile Name, Security Profile Description, and Consent Privacy Notice URL. These values can be anything, for example:
Security Profile Name: SidewalkSecurityProfile
Security Profile Description: SidewalkSecurityProfile
Consent Privacy Notice URL: https://www.silabs.com/
Click Save. You should see your new Security profile.
Click Show Client ID and Client Secret, and note down the Client ID and Client Secret (or save them as environment variables).
Click the gear to the right of your security profile’s row.
Click Web Settings.
Click Edit, add http://localhost:8000/ to Allowed Origins, and click Save.
Obtain an LWA Token#
An LWA (Login with Amazon) token is one of the ways to register your Sidewalk endpoint.
In your Amazon Sidewalk repository clone, go to /tools/scripts/public/sid_pc_link/apps/device_registration, and install the module requirements:
pip3 install --user -r requirements.txt
Execute the following commands in a terminal:
python3 main.py -l --client-id <Client ID>
A browser window appears and opens a pop-up if allowed. Allow pop-ups on the page if not. The pop-up asks you for Amazon developer credentials. When logged in, the initial window displays an LWA token. The Python script automatically edits the app_config.json file with the LWA token. The standard LWA token is only valid for an hour.
Sidewalk Endpoint Registration#
Open the app_config.json file in your Amazon Sidewalk repository folder /tools/scripts/public/sid_pc_link/apps/device_registration and edit it as follows.
Set the ENDPOINT_ID attribute equal to the “smsn” value found in the certificate_[SIDEWALK_ID].json file.
If you are on Linux, the BLUETOOTH_ADAPTER attribute must be set to the Bluetooth dongle that you purchased as part of the setup. The
hcitool
command will read out your Bluetooth interfaces, and will likely be in the formhciX
(most likelyhci0
, like the default setting in app_config.json). If you are on macOS, you do not need to touch this field.You can leave the rest of the attributes to their default values.
Save and close the app_config.json file.
Run the following command:
python3 main.py -r
You then see the logs of a series of exchanges on your terminal and on your EFR32 logging interface. After a minute or so, you should see "INFO Device registration succeeded". You have successfully registered your EFR32 device onto the Sidewalk network!
If your device is not detected by the script, it may be because your device connected automatically with the touchless registration using Sidewalk FFN.
If you are using the Amazon Sidewalk - SoC Bluetooth Hello Neighbor application, a main board button press is required to connect with the gateway. No button press is needed with the Amazon Sidewalk - SoC Bluetooth Sub-GHz Hello Neighbor application.
With the logging console connected, press main board button PB0. You should see the following status message.
[I] App - set connection request
[I] BLE State: CONNECTED
[I] App - sidewalk internal event
...
[I] App - sidewalk status changed: 0
[I] App - registration status: 0, time sync status: 0, link status: 1
[I] Delete rx_buffer :: Gateway [f1 76] :: Stream [7] :: Transaction [11]
Deregistration#
You may want to de-register your endpoint for debug purposes.
⚠ WARNING ⚠: Successful de-registration requires a two-way message exchange between the endpoint, gateway, and cloud. Make sure your device is registered and time-synced with your gateway. You can check with the log output below:
<info> app: Registration Status = 0, Time Sync Status = 0 and Link Status = 0
To de-register your device run the command below by replacing YOUR-WIRELESS-DEVICE-ID
with the device ID of the device you want to de-register.
aws iotwireless deregister-wireless-device --identifier "YOUR-WIRELESS-DEVICE-ID" --wireless-device-type "Sidewalk"
Successful de-registration of the device is indicated by the following log output:
<info> app: Registration Status = 1, Time Sync Status = 1 and Link Status = 1
Wait a few seconds after the de-registration of your device to see Automatic Touchless registration taking place to register your device.
INFO: When the endpoint is registered but not time-synced and the de-registration API is called, the device is de-registered on the cloud side. The device does not receive the information because it is not time-synced. However, on its request message for time sync, the cloud will issue a message to notify the device it is not registered anymore. Upon receiving this new message, the device will remove its credentials and move to the deregistered state.