Is the Python struct module available in 2.7-enabled modems? It’s not listed under the module availability list but I was hoping that was a documentation mistake 🙂
What I’m aiming for is an easy way to generate messages which can be encoded into binary format (with correct endians) and streamed to a remote receiver.
No struct is not available and being a builtin module cannot be provided separately.
Alrighty, thanks. I’l take a different approach then.
Set AT+CMEE=2 and read the verbose error message.
when python is running,it shows +CME Error operation not allowed,but same time i can connect to ils by manual at commands.is there any settings needed to run python?
Use quoted string parameters (“”) as a good discipline.
Test the script with module fresh restarted; try several subsequent connection trials with some delays between them.
Hi Cosmin
Sorry for inconvenience,i will check and update as soon,
Thanks for your responses and expecting again n again from you………
Regards
shibil
Hi Cosmin
Thanks for your responses.now i restarted and add some delays in my script,and now it is working fine as i expected.
Regards
Shibil
Good, thanks for telling.
Hi Cosmin,
currently i am debugging by the ‘SER.send function’.Can i debugging using ”print” statement,if yes, How?…..i noticed an example “trace on SER”,can i import to my script?
Regards
Shibil
Of course, you can have the print statements output to serial ports, USB, CMUX – read the docs.
Hi
I gone through the Docmnt”Telit_Easy_Script_Python_2.7_r5″,but i could’nt see about the Print Statemant,
Of course it is:
The Python print statement, for debugging purposes, is directly forwarded to second serial port USIF1.
Read page 25, 3.2 Debug Python script.
To debug on SER use the redirection shown in trace on SER.
Hi
sorry…i got it,it is my mistake,thanks
Regards
Shibil
Hi Cosmin
when i connected my modem via USB Mini cable and rs232 at same time,then i can open 4 com ports like
COM2(rs232 ‘UART to USB bridge’)
COM 34(telite mobile modem)
COM 33(USB1)
COM32(USB2)
in this,which one give me the print staement as debugging?
Please read Telit GE910 Family Ports Arrangements, especially chapter 5.2.1 Python Script Debugging.
Hi Cosmin,
Thanks for response,Now a days i spending time for GSM Based location tracking,i excuted a python for this,while excuting python the modem restart after somr time aoutomatically,What will be the reason for this?,code size is almost 7kb,and put some COde parts here
after 2 or 3 minute python will aoutomaticaly restarting again and again
SER.send(‘Hellorn’) MDM.send(‘ATr’,0) S=MDM.read() SER.send(S) Module_init() imei=module_id() connect_init(APN) ip_resetting() ip_getting() cach_dns_res_set() socket_dial(REMOTE_PORT,REMOTE_IP) cd = MDM.getDCD() while (1==1): Reset_Counter=Reset_Counter+1 while ip == ”: ip_resetting() ip_getting() cd = MDM.getDCD() while cd != 1: socket_dial(REMOTE_PORT,REMOTE_IP) cd = MDM.getDCD() TIME=get_Clock() gps=GSM_locate() STRtoSEND1=Start+imei+PIPE+TIME+PIPE STRtoSEND=gps+End SER.send(STRtoSEND1 + STRtoSEND+’rn’) MDM.send(STRtoSEND1,10) MDM.send(STRtoSEND,10) Wait(5) a=MDM.read() SER.send(a) cd = MDM.getDCD() if Reset_Counter >= 50: SER.send(str(Reset_Counter)) Reset_Counter=0 MDM2.send(‘AT#REBOOTr’,5) s=MDM2.read() SER.send(‘rnModem Resettedrn’) Wait(10)
We use cookies to enhance your browsing experience and help us improve our websites. To improve our website, we carefully select third parties that use cookies to allow us to serve specific content and achieve the purposes set out in our cookie policy. For more information on how to make adjustments through your browser to the cookies being used on your device, please click Find Out More link. By closing this banner or continuing to browse our website, you agree to our use of such cookies. FIND OUT MORE
Is the Python struct module available in 2.7-enabled modems? It’s not listed under the module availability list but I was hoping that was a documentation mistake 🙂
What I’m aiming for is an easy way to generate messages which can be encoded into binary format (with correct endians) and streamed to a remote receiver.
No struct is not available and being a builtin module cannot be provided separately.
Alrighty, thanks. I’l take a different approach then.
Set AT+CMEE=2 and read the verbose error message.
when python is running,it shows +CME Error operation not allowed,but same time i can connect to ils by manual at commands.is there any settings needed to run python?
Use quoted string parameters (“”) as a good discipline.
Test the script with module fresh restarted; try several subsequent connection trials with some delays between them.
Hi Cosmin
Sorry for inconvenience,i will check and update as soon,
Thanks for your responses and expecting again n again from you………
Regards
shibil
Hi Cosmin
Thanks for your responses.now i restarted and add some delays in my script,and now it is working fine as i expected.
Regards
Shibil
Good, thanks for telling.
Hi Cosmin,
currently i am debugging by the ‘SER.send function’.Can i debugging using ”print” statement,if yes, How?…..i noticed an example “trace on SER”,can i import to my script?
Regards
Shibil
Of course, you can have the print statements output to serial ports, USB, CMUX – read the docs.
Hi
I gone through the Docmnt”Telit_Easy_Script_Python_2.7_r5″,but i could’nt see about the Print Statemant,
Of course it is:
Read page 25, 3.2 Debug Python script.
To debug on SER use the redirection shown in trace on SER.
Hi
sorry…i got it,it is my mistake,thanks
Regards
Shibil
Hi Cosmin
when i connected my modem via USB Mini cable and rs232 at same time,then i can open 4 com ports like
COM2(rs232 ‘UART to USB bridge’)
COM 34(telite mobile modem)
COM 33(USB1)
COM32(USB2)
in this,which one give me the print staement as debugging?
Please read Telit GE910 Family Ports Arrangements, especially chapter 5.2.1 Python Script Debugging.
Hi Cosmin,
Thanks for response,Now a days i spending time for GSM Based location tracking,i excuted a python for this,while excuting python the modem restart after somr time aoutomatically,What will be the reason for this?,code size is almost 7kb,and put some COde parts here
after 2 or 3 minute python will aoutomaticaly restarting again and again
SER.send(‘Hellorn’)
MDM.send(‘ATr’,0)
S=MDM.read()
SER.send(S)
Module_init()
imei=module_id()
connect_init(APN)
ip_resetting()
ip_getting()
cach_dns_res_set()
socket_dial(REMOTE_PORT,REMOTE_IP)
cd = MDM.getDCD()
while (1==1):
Reset_Counter=Reset_Counter+1
while ip == ”:
ip_resetting()
ip_getting()
cd = MDM.getDCD()
while cd != 1:
socket_dial(REMOTE_PORT,REMOTE_IP)
cd = MDM.getDCD()
TIME=get_Clock()
gps=GSM_locate()
STRtoSEND1=Start+imei+PIPE+TIME+PIPE
STRtoSEND=gps+End
SER.send(STRtoSEND1 + STRtoSEND+’rn’)
MDM.send(STRtoSEND1,10)
MDM.send(STRtoSEND,10)
Wait(5)
a=MDM.read()
SER.send(a)
cd = MDM.getDCD()
if Reset_Counter >= 50:
SER.send(str(Reset_Counter))
Reset_Counter=0
MDM2.send(‘AT#REBOOTr’,5)
s=MDM2.read()
SER.send(‘rnModem Resettedrn’)
Wait(10)