I wanted to know how to set the frequency bands for SIM7600G-H modem? I know the AT command to be used but i’m finding hard to understand the logic to set the bands. Here is the document in which page number 94 onwards talks about the operation of this command. If anybody already knows or able to understand the command and decipher it kindly explain.
Thank you for the response, i wanted to use the EUTRAN Bands 3,5 and 40 with respect to the document in page 95. Respective values are 2,4 and 39. The snapshot of the same can be seen below
the bands are encoded into a 64 bit integer of which each bit position represents a band value. Set the bit position to 1 to enable the band - 0 to disable it.
So effectively, the value that is listed in the table on page 94.ff is the exponent of the base 2.
Example: 64 bit value with no bands set would be 0x0000000000000000 in hexadecimal. For EUTRAN_BAND39 we can find the exponent value of 38 in the document. Thus you would need to add 2^38 (0x0000004000000000) to the empty 64 bit value.
Of course, you can compute the value by a left shift of a ‘1’ hence the document states “1” << “<lte_pos>” and adding would become a logical OR operation.
This would be a python code to illustrate the principal:
#!/usr/bin/env python3
import argparse
def getBands(mask):
band = 1
i = 1
s = ''
while i < 0xFFFFFFFFFFFFFFFF:
if mask & i:
s += ("B%02d " % band)
band += 1
i <<= 1
return s
if __name__ == '__main__':
parser = argparse.ArgumentParser(description='Check bitmask setting of modem bands')
parser.add_argument('-b','--bitmask', type=str)
parser.add_argument('-a','--add', type=int)
parser.add_argument('-r','--remove', type=int)
args = parser.parse_args()
mask = int(args.bitmask, 16)
print('Current bands:\t' + getBands(mask))
if args.add or args.remove:
print('Current bands:\t%X' % mask)
if args.remove:
removeband = 1
removeband <<= (args.remove - 1)
mask &= ~removeband
if args.add:
addband = 1
addband <<= (args.add - 1)
mask |= addband
print('New bands:\t' + getBands(mask))
print('New bands:\t%X' % mask)
Example calling the script for adding EUTRAN band 39 to a current definition for EUTRAN band 2 & 4:
Where are the settings stored once he issues those commands? I took a look at the documentation for the module and it looks like it could be on the sd card of your pcb computer.
were cellular band ids determined to be such that any combination of numbers is unique so that you can use remainder operation to find the bands that a given bitmask value is always unique combo of the set?
The settings are stored on the modem module either in volatile or non-volatile memory. Please consult your modem’s user manual on how to make settings permanent (surviving power cycle) as this can be different from manufacturer to manufacturer.
I’m not sure I fully understand your question. I would advise to check the modem’s spec as to what bit sets the specific band value you need.
The example provided just explains the principle that every bit corresponds with an iterative band value like band 1, 2, 3, …
I could imagine that there are manufacturers out there that opted for 32-bit values or enumerate bands differently - perhaps 1.3.4.7.8.9… to match what the model supports. Check the part number options of your modem to verify what bands your modem actually supports.