- Tue Apr 12, 2016 3:09 pm
#189355
Hey everyone,
I've looking at writing a python script to periodically post some information to a server via a Telit HE910. We have a registered SIM card and I can enter AT commands directly into the terminal and have things work as expected, however it is failing to initialize via the python script. The problem is somewhere in the following 4 lines - if I enter them manually and then run my script, it POSTs as expected, but if I just run the script (including the same 4 AT commands), it fails.
Thanks!
I've looking at writing a python script to periodically post some information to a server via a Telit HE910. We have a registered SIM card and I can enter AT commands directly into the terminal and have things work as expected, however it is failing to initialize via the python script. The problem is somewhere in the following 4 lines - if I enter them manually and then run my script, it POSTs as expected, but if I just run the script (including the same 4 AT commands), it fails.
Code: Select all
I've been fiddling with this for a few days and am definitely reaching the limit of my abilities, I'd appreciate help or even being pointed in the direction of a place with a bit more experience with Telit's python interpreter - I feel like the first one to use it after a bit of googling, haha.#SER.set_speed("115200", "8N1", "hw")
result = MDM.send('AT#SIMDET=2\r', 0)
result = MDM.send('AT+CGDCONT=1,"IP","apn.provider.ca","0.0.0.0",0,0\r', 0)
result = MDM.send('ATD*99***1#\r', 0)
result = MDM.send('AT#SGACT=1,1\r', 0)
Thanks!