@@ -8,7 +8,7 @@ This sample demonstrates how to use Sidewalk Device Under Test for the testing a
88Configuration options
99*********************
1010
11- Before building the Device under test application variant of the Sidewalk end device, ensure you have enabled the ``OVERLAY_CONFIG="overlay-dut.conf" `` configuration.
11+ Before building the Device Under Test application variant of the Sidewalk end device, ensure you have enabled the ``OVERLAY_CONFIG="overlay-dut.conf" `` configuration.
1212
1313.. include :: ../../includes/include_kconfig_common.txt
1414
@@ -20,92 +20,93 @@ Building and running
2020Testing
2121=======
2222
23- #. After successfully building and flashing the sample is ready to use.
23+ #. After successfully building and flashing, the sample is ready to use.
2424 You should see the command-line prompt ``uart:~$ ``.
25- Type ``sid help `` and press enter to get the list of supported Sidewalk commands.
25+ Type ``sid help `` and press Enter to get the list of supported Sidewalk commands.
2626
2727 .. code-block :: console
2828
2929 uart:~$ sid help
3030
3131 #. Initialize Sidewalk
3232
33- # . In BLE only mode:
33+ A . In BLE only mode:
3434
35- .. code-block :: console
35+ .. code-block :: console
3636
37- uart:~$ sid init 1
37+ uart:~$ sid init 1
3838
39- # . With sub-GHz radio:
39+ B . With sub-GHz radio:
4040
41- .. note ::
41+ .. note ::
4242
43- To use sub-GHz radio, you need to connect radio over SPI, and build sidewalk application with lora/fsk library variant.
43+ To use sub-GHz radio, you need to connect radio over SPI, and build sidewalk application with lora/fsk library variant.
4444
45- Use `2 ` for FSK, `3 ` for LoRa.
46- To use more than one transport " add" transport numbers for init e.g.: ` 4 = 1 + 3 = BLE + LoRa `
45+ Use `` 2 `` for FSK, `` 3 ` ` for LoRa.
46+ To use more than one transport, add transport numbers for init, for example: `` 4 = 1 + 3 = BLE + LoRa ` `
4747
48- .. code-block :: console
48+ .. code-block :: console
4949
50- uart:~$ sid init 7
50+ uart:~$ sid init 7
5151
5252 #. Start Sidewalk
5353
5454 .. code-block :: console
5555
5656 uart:~$ sid start
5757
58- #. Wait for Sidewalk ready
58+ #. Wait for Sidewalk to be ready
5959
6060 .. code-block :: console
6161
6262 <inf> app: Status changed: ready
6363
6464 #. Send message to cloud
6565
66- You can use `AWS IoT MQTT client `_ to view the received and republished messages from the device.
66+ You can use `AWS IoT MQTT client `_ to view the received and republished messages from the device.
6767
68- #. Enter ``# `` and click :guilabel: `Subscribe to topic `.
69- You are now subscribed to the republished device messages.
68+ #. Enter ``# `` and click :guilabel: `Subscribe to topic `.
69+ You are now subscribed to the republished device messages.
7070
71- #. To see the data republished into the subscribed MQTT topic, use `send ` command:
71+ #. To see the data republished into the subscribed MQTT topic, use `` send ` ` command:
7272
73- .. code-block :: console
74- uart:~$ sid send test_message
75- <inf> app: Message send success
73+ .. code-block :: console
7674
75+ uart:~$ sid send test_message
76+ <inf> app: Message send success
7777
7878 You should see the message data in the base64 format:
7979
80- .. code-block :: JSON
80+ .. code-block :: json
81+
8182 {
82- "MessageId" : " 4c5dadb3-2762-40fa-9763-8a432c023eb5" ,
83- "WirelessDeviceId" : " 5153dd3a-c78f-4e9e-9d8c-3d84fabb8911" ,
84- "PayloadData" : " MDA=" ,
85- "WirelessMetadata" : {
86- "Sidewalk" : {
87- "CmdExStatus" : " COMMAND_EXEC_STATUS_UNSPECIFIED" ,
88- "MessageType" : " CUSTOM_COMMAND_ID_NOTIFY" ,
89- "NackExStatus" : [],
90- "Seq" : 2 ,
91- "SidewalkId" : " BFFFFFFFFF"
83+ "MessageId" : " 4c5dadb3-2762-40fa-9763-8a432c023eb5" ,
84+ "WirelessDeviceId" : " 5153dd3a-c78f-4e9e-9d8c-3d84fabb8911" ,
85+ "PayloadData" : " MDA=" ,
86+ "WirelessMetadata" : {
87+ "Sidewalk" : {
88+ "CmdExStatus" : " COMMAND_EXEC_STATUS_UNSPECIFIED" ,
89+ "MessageType" : " CUSTOM_COMMAND_ID_NOTIFY" ,
90+ "NackExStatus" : [],
91+ "Seq" : 2 ,
92+ "SidewalkId" : " BFFFFFFFFF"
93+ }
9294 }
9395 }
9496
95-
96- You can use `last_status` to check if your device is connected to cloud.
97- At least one `Link status` must me `Up`
97+ You can use ``last_status `` to check if your device is connected to the cloud.
98+ At least one ``Link status `` must be ``Up ``.
9899
99100 .. code-block :: console
100101
101- uart:~$ sid last_status
102- <inf> sid_cli: Device Is registered, Time Sync Success, Link status: {BLE: Up, FSK: Down, LoRa:
103- Down }
104- <inf> sid_cli: Link mode on BLE = {Cloud: True, Mobile: False}
102+ uart:~$ sid last_status
103+ <inf> sid_cli: Device Is registered, Time Sync Success, Link status: {BLE: Up, FSK: Down, LoRa: Down}
104+ <inf> sid_cli: Link mode on BLE = {Cloud: True, Mobile: False}
105+
106+ .. _variant_sidewalk_dut_testing_conn_req :
105107
106- .. _variant_sidewalk_dut_testing_conn_req :
107108 #. In BLE mode:
108- Send connection request each time you need to send message, if Sidewalk is not ready
109+ Send a connection request each time you need to send a message if Sidewalk is not ready.
109110
110111 .. code-block :: console
111112
@@ -119,7 +120,7 @@ Testing
119120 uart:~$ sid send test_message
120121 <inf> app: Message send success
121122
122- #. Receive message form cloud
123+ #. Receive message from cloud
123124
124125.. include :: ../../includes/include_testing_receiving_message.txt
125126
@@ -130,127 +131,126 @@ Testing Location Services
130131
131132#. Initialize and start a Sidewalk stack (e.g. for BLE+LoRa support)
132133
133- .. code-block :: console
134+ .. code-block :: console
134135
135- uart:~$ sid init 4
136- uart:~$ sid start
136+ uart:~$ sid init 4
137+ uart:~$ sid start
137138
138139 #. Initialize Location services
139140
140- .. code-block :: console
141+ .. code-block :: console
141142
142- uart:~$ location init
143- <inf> location_shell_events: location_event_init returned 0
143+ uart:~$ location init
144+ <inf> location_shell_events: location_event_init returned 0
144145
145- You should see log message with success status.
146+ You should see a log message with success status.
146147
147148#. Send location
148149
149- # . For BLE location
150+ A . For BLE location
150151
151- Check BLE `Link status `, send `conn_req ` if BLE link is not `Up `
152+ Check BLE `` Link status `` , send `` conn_req `` if BLE link is not `` Up ``.
152153
153- .. code-block :: console
154+ .. code-block :: console
154155
155- uart:~$ sid last_status
156- <inf> sid_cli: Device Is registered, Time Sync Success, Link status: {BLE: Down, FSK: Down, LoRa:
157- Down}
158- uart:~$ sid conn_req 1
159- <inf> sid_cli: sid_conn_request returned 0 (SID_ERROR_NONE)
160- <inf> sid_ble_conn: BT Connected
161- <inf> app: Status changed: ready
162- <inf> app: Device Is registered, Time Sync Success, Link status: {BLE: Up, FSK: Down, LoRa: Down}
156+ uart:~$ sid last_status
157+ <inf> sid_cli: Device Is registered, Time Sync Success, Link status: {BLE: Down, FSK: Down, LoRa: Down}
158+ uart:~$ sid conn_req 1
159+ <inf> sid_cli: sid_conn_request returned 0 (SID_ERROR_NONE)
160+ <inf> sid_ble_conn: BT Connected
161+ <inf> app: Status changed: ready
162+ <inf> app: Device Is registered, Time Sync Success, Link status: {BLE: Up, FSK: Down, LoRa: Down}
163163
164- Send location to cloud based on current Bluetooth LE connection
164+ Send location to cloud based on current Bluetooth LE connection.
165165
166- .. code-block :: console
166+ .. code-block :: console
167167
168- uart:~$ location send 1
169- <inf> location_shell_events: loc send result: 0
170- <inf> location_shell_events: loc effort mode: 1
171- <inf> location_shell_events: loc link type: 1
172- <inf> location_shell_events: location_event_send mode: 1, returned 0
168+ uart:~$ location send 1
169+ <inf> location_shell_events: loc send result: 0
170+ <inf> location_shell_events: loc effort mode: 1
171+ <inf> location_shell_events: loc link type: 1
172+ <inf> location_shell_events: location_event_send mode: 1, returned 0
173173
174- # . For WiFi/GNSS
174+ B . For WiFi/GNSS
175175
176- .. note ::
176+ .. note ::
177177
178- For WiFi and GNSS location LR1110 radio hardware is required.
178+ For WiFi and GNSS location, LR1110 radio hardware is required.
179179
180- .. note ::
180+ .. note ::
181181
182- To perform WiFi or WiFi scan more time is required.
183- It make takes up to a few minutes to send location data depending on available signals strange .
182+ To perform a WiFi or GNSS scan, more time is required.
183+ It may take up to a few minutes to send location data depending on available signal strength .
184184
185- Use `3 ` for WiFi, `4 ` for GNSS.
185+ Use `` 3 `` for WiFi, `` 4 ` ` for GNSS.
186186
187- .. code-block :: console
187+ .. code-block :: console
188188
189- uart:~$ location send 3
190- <inf> sidewalk: mw_wifi_scan_add_task: add task in supervisor at 2393 + 0 s
191- <inf> sidewalk: mw_wifi_scan_service_on_launch
192- <inf> sidewalk: RP: Task #3 enqueue with #11 priority
193- <inf> sidewalk: Enqueued RP task for Wi-Fi scan (hook_id #3)
194- <inf> sidewalk: mw_wifi_scan_service_on_update
195- <inf> location_shell_events: location_event_send mode: 3, returned 0
196- <inf> sidewalk: sid_pal_hold
197- <inf> sidewalk: INFO: Wi-Fi task launch at 2394270
198- <inf> sidewalk:
199- <inf> sidewalk: INFO: wifi_rp_task_done at 2396937 (duration:2667 ms)
200- <inf> sidewalk:
201- <inf> sidewalk: Filter and Sort Wi-Fi results:
202- <inf> sidewalk: Raw data:
203- <inf> sidewalk:
204- <inf> sidewalk: filtered data:
205- <inf> sidewalk:
206- <inf> sidewalk: Sorted data:
207- <inf> sidewalk:
208- <inf> sidewalk: Event Received: SMTC_MODEM_EVENT_WIFI_SCAN_DONE
209- <inf> sidewalk: SCAN_DONE info:
210- <inf> sidewalk: -- number of results: 5
211- <inf> sidewalk: -- power consumption: 8353 nah
212- <inf> sidewalk: -- scan duration: 2667 ms
213- <inf> sidewalk:
214- <inf> sidewalk: mw_wifi_send_add_task: add task in supervisor
215- <inf> sidewalk: mw_wifi_send_add_task: no scan to be sent
216- <inf> sidewalk: Event Received: SMTC_MODEM_EVENT_WIFI_TERMINATED
217- <inf> sidewalk: Calling _app_event_lbm_wifi
218- <inf> location_shell_events: loc send result: 0
219- <inf> location_shell_events: loc effort mode: 3
220- <inf> location_shell_events: loc link type: 1
221- <inf> location_shell_events: loc payload:
222- <inf> location_shell_events: loc payload
223- da be 0f f3 2d 8e 28 be 38 88 1e 77 3e a8 af 94 |....-.(. 8..w>...
224- 0b 19 49 e2 d0 a5 c4 ad 34 42 65 63 a5 14 eb 08 |..I..... 4Bec....
225- 1b 6e a0 |.n.
226- <inf> sidewalk: _app_event_lbm_wifi completed
227- <inf> sidewalk: rp_hook_callback task WIFI state RP_TASK_STATE_FINISHED
228- <inf> sidewalk: sid_pal_release
229-
230- If you just need a scan (no need to send location to cloud) you can test your location using `scan ` command:
231- .. code-block :: console
189+ uart:~$ location send 3
190+ <inf> sidewalk: mw_wifi_scan_add_task: add task in supervisor at 2393 + 0 s
191+ <inf> sidewalk: mw_wifi_scan_service_on_launch
192+ <inf> sidewalk: RP: Task #3 enqueue with #11 priority
193+ <inf> sidewalk: Enqueued RP task for Wi-Fi scan (hook_id #3)
194+ <inf> sidewalk: mw_wifi_scan_service_on_update
195+ <inf> location_shell_events: location_event_send mode: 3, returned 0
196+ <inf> sidewalk: sid_pal_hold
197+ <inf> sidewalk: INFO: Wi-Fi task launch at 2394270
198+ <inf> sidewalk:
199+ <inf> sidewalk: INFO: wifi_rp_task_done at 2396937 (duration:2667 ms)
200+ <inf> sidewalk:
201+ <inf> sidewalk: Filter and Sort Wi-Fi results:
202+ <inf> sidewalk: Raw data:
203+ <inf> sidewalk:
204+ <inf> sidewalk: filtered data:
205+ <inf> sidewalk:
206+ <inf> sidewalk: Sorted data:
207+ <inf> sidewalk:
208+ <inf> sidewalk: Event Received: SMTC_MODEM_EVENT_WIFI_SCAN_DONE
209+ <inf> sidewalk: SCAN_DONE info:
210+ <inf> sidewalk: -- number of results: 5
211+ <inf> sidewalk: -- power consumption: 8353 nah
212+ <inf> sidewalk: -- scan duration: 2667 ms
213+ <inf> sidewalk:
214+ <inf> sidewalk: mw_wifi_send_add_task: add task in supervisor
215+ <inf> sidewalk: mw_wifi_send_add_task: no scan to be sent
216+ <inf> sidewalk: Event Received: SMTC_MODEM_EVENT_WIFI_TERMINATED
217+ <inf> sidewalk: Calling _app_event_lbm_wifi
218+ <inf> location_shell_events: loc send result: 0
219+ <inf> location_shell_events: loc effort mode: 3
220+ <inf> location_shell_events: loc link type: 1
221+ <inf> location_shell_events: loc payload:
222+ <inf> location_shell_events: loc payload
223+ da be 0f f3 2d 8e 28 be 38 88 1e 77 3e a8 af 94 |....-.(. 8..w>...
224+ 0b 19 49 e2 d0 a5 c4 ad 34 42 65 63 a5 14 eb 08 |..I..... 4Bec....
225+ 1b 6e a0 |.n.
226+ <inf> sidewalk: _app_event_lbm_wifi completed
227+ <inf> sidewalk: rp_hook_callback task WIFI state RP_TASK_STATE_FINISHED
228+ <inf> sidewalk: sid_pal_release
229+
230+ If you just need a scan (no need to send location to cloud), you can test your location using the ``scan `` command:
232231
233- uart:~$ location scan 3
232+ .. code-block :: console
234233
234+ uart:~$ location scan 3
235235
236- Check MQTT topic used as Location Destination in `AWS IoT MQTT client `_.
237- You should see the location data in the following format:
236+ Check the MQTT topic used as Location Destination in `AWS IoT MQTT client `_.
237+ You should see the location data in the following format:
238238
239- .. code-block :: JSON
239+ .. code-block :: json
240240
241- {
242- "coordinates" : [
243- XX.XXXXXX,
244- YY.YYYYYY,
245- 0
246- ],
247- "WirelessDeviceId" : " xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" ,
248- "type" : " Point" ,
249- "properties" : {
250- "verticalAccuracy" : 0 ,
251- "horizontalAccuracy" : ZZ,
252- "timestamp" : " YYYY-MM-DDTHH:MM:SS.ZZZ"
241+ {
242+ "coordinates" : [
243+ 13.37607669 ,
244+ 52.51823043 ,
245+ 0
246+ ],
247+ "WirelessDeviceId" : " xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" ,
248+ "type" : " Point" ,
249+ "properties" : {
250+ "verticalAccuracy" : 0 ,
251+ "horizontalAccuracy" : 100 ,
252+ "timestamp" : " YYYY-MM-DDTHH:MM:SS.ZZZ"
253+ }
253254 }
254- }
255255
256- If you cannot see the coordinates message, refer to :ref: `location_services_troubleshooting `.
256+ If you cannot see the coordinates message, refer to :ref: `location_services_troubleshooting `.
0 commit comments