@@ -145,32 +145,6 @@ def _wait_for_provisioning_completion_and_cloud_connection(
145145 logger .info ("Device provisioned and connected to nRF Cloud." )
146146
147147
148- def _verify_device_location_data (
149- dut_cloud ,
150- expected_lat : float = 61.5 ,
151- expected_lon : float = 10.5 ,
152- lat_tolerance : float = 2.0 ,
153- lon_tolerance : float = 1.0 ,
154- timeout : int = 300 ,
155- ):
156- logger .info ("Verifying device location data..." )
157-
158- values = dut_cloud .uart .wait_for_str_re (
159- r"Got location: lat: ([\d.-]+), lon: ([\d.-]+), acc: ([\d.-]+), method:" ,
160- timeout = timeout
161- )
162- assert values , "Failed to get location data from device."
163-
164- lat_str , lon_str , acc_str = values
165- lat , lon = float (lat_str ), float (lon_str )
166- logger .info (f"Received location: Lat={ lat } , Lon={ lon } , Accuracy={ acc_str } " )
167-
168- assert abs (lat - expected_lat ) < lat_tolerance , f"Latitude { lat } out of range."
169- assert abs (lon - expected_lon ) < lon_tolerance , f"Longitude { lon } out of range."
170-
171- logger .info ("Device location data verified." )
172-
173-
174148def _trigger_device_reprovisioning_with_new_credentials (dut_cloud , sec_tag : int ):
175149 """
176150 Initiates the reprovisioning process on the device by:
@@ -249,7 +223,6 @@ def _run_initial_provisioning(dut_cloud, hex_file):
249223 _connect_to_network_and_wait_for_claiming_prompt (dut_cloud )
250224 _claim_device_on_nrf_cloud (dut_cloud , attestation_token )
251225 _wait_for_provisioning_completion_and_cloud_connection (dut_cloud )
252- _verify_device_location_data (dut_cloud )
253226
254227 logger .info ("--- Phase 1: Initial Device Provisioning Completed Successfully ---" )
255228
@@ -262,7 +235,6 @@ def _run_reprovisioning(dut_cloud):
262235 _trigger_device_reprovisioning_with_new_credentials (dut_cloud , SEC_TAG )
263236 # Wait for the device to process the command, reprovision, and reconnect
264237 _wait_for_provisioning_completion_and_cloud_connection (dut_cloud , timeout = 300 )
265- _verify_device_location_data (dut_cloud )
266238
267239 logger .info (
268240 "--- Phase 2: Reprovisioning with New Credentials Completed Successfully ---"
0 commit comments