Every F1 Starter Kit comes with an IoT nano SIM card pre-installed, the Ctrl client application is enabled to perform network registration and Zero Touch connection to Ctrl platform. In this tutorial, we will customize the Starter Kit for custom SIM card and localized setting.
Ctrl client shows Ctrl connection status through the RGB LED and is defined as follow:
Configure for CAT-M1 or NB-IoT
from LTE import LTE lte = LTE() lte_mode = lte.mode() # Return current mode if lte_mode == LTE.CATM1: print(‘Modem is in CAT-M1 mode!’) if lte_mode == LTE.NBIOT: print(‘Modem is in NB-IoT mode!’)
# The below will automatically reset the modem lte.mode(LTE.CATM1) # switch to CAT-M1 lte.mode(LTE.NBIOT) # switch to NB-IoT
from LTE import LTE import time lte = LTE() lte.attach(apn=’iot.1nce.net’) while not lte.isattached(): time.sleep(1) lte.connect() while not lte.isconnected(): time.sleep(1)