Select network between NB-IOT / LTE / egprs

Hello i just bought this cellular hat and i would like to switch between NB-IOT network to LTE network or even egprs

Thanks for your help

Hi @loic.berger,

You can use the following AT commands to configure the modem:

AUTO MODE( LTE Cat M1-> LTE Cat NB1 -> GSM):

AT+QCFG="nwscanseq",00,1
AT+QCFG="nwscanmode",0,1
AT+QCFG="iotopmode",2,1

GSM MODE:

AT+QCFG="nwscanseq",01,1
AT+QCFG="nwscanmode",1,1
AT+QCFG="iotopmode",2,1

Cat M1 MODE:

AT+QCFG="nwscanseq",02,1
AT+QCFG="nwscanmode",3,1
AT+QCFG="iotopmode",0,1

Cat NB1 MODE:

AT+QCFG="nwscanseq",03,1
AT+QCFG="nwscanmode",3,1
AT+QCFG="iotopmode",1,1

Check BG96 AT Commands Manual for more details.

Thank you for your reply ensar, do you know how can I check the connection is in nbiot/LTE/egprs ? Is it possible to have the logs of the connection ?

For this, use the AT+QNWINFO command.
“The command indicates network information such as the access technology selected, the operator, and
the band selected.”

one more =), do you know what is the appropriate time to put in order to have a successful NB-IoT connection ?

in my test i’m waiting like 10minutes, is that normal ?

You’ll need to contact the ISP(Internet service provider) for help and information and they will help you better.

Hello, When i’m switching network 2g/nbiot/lte I have this error message
I really don’t know where this coming from =/

could you help ? really appreciate

Here are my logs :

        Sixfab Raspberry Pi Cellular IoT Shield Class initialized!
        BG96 module disabled!
        Sixfab Raspberry Pi Cellular IoT Shield Class initialized!
        BG96 module enabled!
        BG96 module powered up!
        Traceback (most recent call last):
        File “/usr/lib/python3/dist-packages/serial/serialposix.py”, line 501, in read
        'device reports readiness to read but returned no data ’
        serial.serialutil.SerialException: device reports readiness to read but returned no data (device disconnected or multiple access on port?)

        During handling of the above exception, another exception occurred:

        Traceback (most recent call last):
        File “/usr/local/lib/python3.7/dist-packages/sixfab_cellulariot-1.2.0-py3.7.egg/cellulariot/cellulariot.py”, line 214, in sendATComm
        File “/usr/lib/python3/dist-packages/serial/serialposix.py”, line 509, in read
        raise SerialException(‘read failed: {}’.format(e))
        serial.serialutil.SerialException: read failed: device reports readiness to read but returned no data (device disconnected or multiple access on port?)

        During handling of the above exception, another exception occurred:

        Traceback (most recent call last):
        File “example.py”, line 406, in
        run()
        File “example.py”, line 396, in run
        Thread(target = publish_battery(client)).start()
        File “example.py”, line 288, in publish_battery
        networkoutput = node.getSignalReport()
        File “/usr/local/lib/python3.7/dist-packages/sixfab_cellulariot-1.2.0-py3.7.egg/cellulariot/cellulariot.py”, line 374, in getSignalReport
        File “/usr/local/lib/python3.7/dist-packages/sixfab_cellulariot-1.2.0-py3.7.egg/cellulariot/cellulariot.py”, line 217, in sendATComm
        AttributeError: ‘SerialException’ object has no attribute ‘Message’

and here is the function that i created in the library cellulariot.py because it wasn’t existed

def getSignalReport(self):
        return self.sendATComm("AT+QCSQ","OK\r\n")

I just remove the # to execute the code from the librairy because i’m thinking the error come from there, but i would understand what this function is currently doing ?

	# Function for sending at command to BG96_AT.
	def sendATComm(self, command, desired_response, timeout = None):
		if timeout is None:
			timeout = self.timeout
		self.sendATCommOnce(command)
		f_debug = False
		timer = millis()
		while 1:
			if( millis() - timer > timeout):
				self.sendATCommOnce(command)
				timer = millis()
				f_debug = False
			self.response =""
			while(ser.inWaiting()):
				try:
					self.response += ser.read(ser.inWaiting()).decode('utf-8', errors='ignore')
					delay(100)
				except Exception as e:
				#     debug_print(e.Message)
				#     debug_print(self.response)	
			if(self.response.find(desired_response) != -1):
				debug_print(self.response)
				return self.response # returns the response of the command as string.
				break

Please confirm the serial is enabled and the serial console is disabled.

hello @ensar,

this is my current setup

hello again, here there is more details that could help you @ensar

python3 configureGPRS.py 

/usr/local/lib/python3.7/dist-packages/sixfab_cellulariot-1.2.0-py3.7.egg/cellulariot/cellulariot.py:110: RuntimeWarning: This channel is already in use, continuing anyway.  Use GPIO.setwarnings(False) to disable warnings.
/usr/local/lib/python3.7/dist-packages/sixfab_cellulariot-1.2.0-py3.7.egg/cellulariot/cellulariot.py:111: RuntimeWarning: This channel is already in use, continuing anyway.  Use GPIO.setwarnings(False) to disable warnings.
/usr/local/lib/python3.7/dist-packages/sixfab_cellulariot-1.2.0-py3.7.egg/cellulariot/cellulariot.py:114: RuntimeWarning: This channel is already in use, continuing anyway.  Use GPIO.setwarnings(False) to disable warnings.
Wait 60 seconds for network registration
Waiting Time: 10 sec
20 sec
30 sec
40 sec
50 sec
60 sec
Checking Signal Quality
Checking Attached operator

hello guys,
I need some help I still have the message and i don’t know why.

thanks