31 March 2023
LoRa, LoRa Developers, Wireless RF, Internet of Things, Amazon Sidewalk
Related Blogs:
Sign up for blog updates
Get innovation delivered to your inbox. Sign up for our blog and stay on top of the very latest from Semtech.
31 March 2023
LoRa, LoRa Developers, Wireless RF, Internet of Things, Amazon Sidewalk
To begin working with LoRa technology on Amazon Sidewalk, Amazon Sidewalk developers will need specific development kits, such as those provided by Silicon Labs, and Nordic Semiconductor. Both companies offer comprehensive Sidewalk development kits that can help you get started with LoRa and Amazon Sidewalk right away.
The prerequisites are the following:
Open 3 browser tabs with the following links:
Software requirements: an AWS account, and AWS CLI installed
Hardware requirements: Nordic nRF52840 DK, radio shield board SX1262MB2CAS
Ring or Echo. If you’re doing this in a populated residential area, chances are that a sidewalk gateway is already present. Take a look at https://coverage.sidewalk.amazon/
Install NRF connect for desktop, then from within NRF connect for desktop, install toolchain manager. Then from toolchain manager, install the SDK.
After the SDK has installed, open a terminal from the toolchain manager. This terminal will have the environment setup for use with Nordic SDK. A terminal opened directly from the operating system will not have the required python virtual environment. Follow the instructions for cloning the sdk-sidewalk repository, installing the python requirements, and initializing west.
Install the NRF command line tools as shown on the bottom of this page.
You already have an AWS account?
Create an access key in your AWS account
As shown here set your region in ~/.aws/config, and then put your AWS access key into ~/.aws/credentials
Set up python virtual environment as shown here
You may also look at readme at https://github.com/aws-samples/aws-iot-core-for-amazon-sidewalk-sample-app but we are not using deploy_stack.py
Run provision_sidewalk_end_device.py
Flash this new mfg.hex into board
nrfjprog --sectorerase --program EdgeDeviceProvisioning/DeviceProfile_/WirelessDevice_/Nordic_MFG.hex –reset
For all sidewalk operations on AWS console, be sure you're on the us-east-1 region (North Virginia)
Add MQTT to destination:
(the destination was created by provision_sidewalk_end_device.py)
Select on right side checkbox Publish to AWS IoT Core message broker.
Set topic name to test/template
Open the MQTT test client
Subscribe to topic # or test/template
Build the example: From the terminal opened by Nordic toolchain manager, from the directory sidewalk/samples/template_subghz
$ west build -b nrf52840dk_nrf52840
$ west flash
If you previously had a different mfg.hex programmed in, you will need to long press button1 to make the new mfg.hex to take effect.
Open serial terminal screen /dev/ttyACM0 115200, or try Tera Term if you’re in windows.
Reset the board to start it again
Button3 short press sends message from device to amazon, check the MQTT test client as described previously
To send message from amazon cloud to device:
aws iotwireless send-data-to-wireless-device --id --transmit-mode 0 --payload-data "a2FyaW5hCg==" --wireless-metadata "Sidewalk={Seq=,MessageType=CUSTOM_COMMAND_ID_NOTIFY}"
Example of a successful test
The prerequisites are the following:
A Silicon Labs wireless development kit - Amazon Sidewalk Pro Kit is recommended
An Amazon Sidewalk gateway - the list of Amazon Sidewalk gateways and their supported radio capabilities is available at the following link
Simplicity Studio 5, with the SDK extension for Amazon Sidewalk installed
Silicon Labs Development Kit with LoRa MBed Shield
Once everything is set up, the easiest way to experiment with Sidewalk and LoRa is to choose the sample application "Amazon Sidewalk - SoC Bluetooth Sub-GHz Hello Neighbor" already included in the previously installed package.
Silicon Labs Development Kit with LoRa MBed Shield
A Command Line Interface application named "Amazon Sidewalk - SoC Bluetooth Sub-GHz CLI" is also available for more flexibility.
Follow the steps described here to create, compile and flash the project on your development kit.
For any Sidewalk application (including this one) to run properly, Sidewalk resources in the cloud must be prepared.
As soon as the device is properly provisioned, the application can connect to Sidewalk if there is coverage.
As explained in the project documentation, "On boot, the sub-GHz radio layer (FSK or CSS) is not started". To enable LoRa radio layer, the user has to click on PB1/BTN1 button on the main board and then click on PB0/BTN0 to switch from FSK to LoRa. Starting from here, the user can send an uplink with an upcounting counter value by pressing PB1/BTN1 button.
Terminal log from uplink
It is possible to visualize uplinks thanks to the MQTT test client in AWS.
Downlinks can be generated using AWS CLI.
Terminal log from downlink
You can find more information on the RFICs that support Sidewalk at Semtech.com. Additionally, you can find more the LoRa Mbed shield supporting the Nordic and Silicon Labs developer kits at this link.
After evaluating Amazon Sidewalk kits, Semtech would be happy to assist your company in developing devices for the Amazon Sidewalk network, LoRa-enabled devices or LoRaWAN in general. Please feel free to reach out to the Semtech PCB Design Service for a review of your design so that we can help accelerate your time to revenue.
Semtech, the Semtech logo and LoRa® are registered trademarks or service marks.
Get innovation delivered to your inbox. Sign up for our blog and stay on top of the very latest from Semtech.