Cellular active scan method
cellular.scan(callback=None, *, deep=False)
The parameter deep is Boolean and optional.
-
deep=True: A more comprehensive search, but may take more time to run.
-
deep=False: A quick check, but may return fewer results.
Note Refer to the documentation for the AS command on your Cellular device for more details on how a “deep” scan may affect your network connectivity.
The parameter callback is optional.
If specified, this scan() call is non-blocking, and will return the results in the user-provided callback function.
The callback function must take one parameter:
-
A list of dictionaries with the following keys:
-
serving_cell: True if the current Serving Cell, False otherwise.
-
mcc: Mobile Country Code.
-
mnc: Mobile Network Code.
-
signal: Receiving level in dBm.
-
area: Location Area Code.
-
cell_id: Cell ID.
-
If the callback is not specified, the scan() call is blocking, and will return when the results are retrieved.
The results will be list of dictionaries as listed above for the callback results.