|
Hi All,
Is there anyone using python script to programm the Telit GM862-GPS module??
I am a newbie in using python. I am developing an application in which i have to open a GPRS connection and download the webpage and save in the GM862-GPS memory.
I encounter a problem today which drive me crazy... I could open a connection and download the http page using AT command through hyperterminal (without python script). When i used python script to send the same AT command, I couldnt' connect. the GM862-GPS replied with NO CARRIER.
I would be great if anyone could help me with this problem??
Thanks heaps!!!
Noorul
| |
Share:
Expert 4TB |
Hi All,
Is there anyone using python script to programm the Telit GM862-GPS module??
I am a newbie in using python. I am developing an application in which i have to open a GPRS connection and download the webpage and save in the GM862-GPS memory.
I encounter a problem today which drive me crazy... I could open a connection and download the http page using AT command through hyperterminal (without python script). When i used python script to send the same AT command, I couldnt' connect. the GM862-GPS replied with NO CARRIER.
I would be great if anyone could help me with this problem??
Thanks heaps!!!
Noorul
I've done some research on GPS.
I have working code for talking to serial port on Windows.
I'd like to see how you are attempting serial com and share mine with you.
| | Expert 100+ |
Without regard to the GPS part, I have also had good success with PySerial.
| | |
I've done some research on GPS.
I have working code for talking to serial port on Windows.
I'd like to see how you are attempting serial com and share mine with you.
I use Hyperterminal to talk to the device using serial port. I download my python script through serial port.
Libraries used
import SER - send and receive data via serial port
import MDM - send AT command to the module
| | Expert 4TB |
I use Hyperterminal to talk to the device using serial port. I download my python script through serial port.
Libraries used
import SER - send and receive data via serial port
import MDM - send AT command to the module
You haven't provide much to go on. The way I see it you have mis-stated or mis-conceived a couple of things here. I understand that you "use Hyperterminal to talk to the device" manually and have success. When you say "download my python script through serial port", I imagine you mean something like "I want my python script to talk to the device through serial port".
On Windows (and probably most any operating system), only one program can use a serial port at one time. If your program seems like it should work but doesn't, you may just need to close Hyperterminal.
I'll check out those modules (if I can find them) so that (when you post some code) I can check your usage.
| | |
You haven't provide much to go on. The way I see it you have mis-stated or mis-conceived a couple of things here. I understand that you "use Hyperterminal to talk to the device" manually and have success. When you say "download my python script through serial port", I imagine you mean something like "I want my python script to talk to the device through serial port".
On Windows (and probably most any operating system), only one program can use a serial port at one time. If your program seems like it should work but doesn't, you may just need to close Hyperterminal.
I'll check out those modules (if I can find them) so that (when you post some code) I can check your usage.
I am using a Telit serial MUX (which converts one pyhsical serial port to 4 virtual port). I use one port to view my debug information and one port to send my python script and AT command. I have included the code below. Thanks -
import MDM
-
import MOD
-
-
APN = "telstra.internet"
-
-
WEB_ADDR = "www.telit.com"
-
-
T_MINIMUM = 5
-
T_GPRS = 20
-
T_CONNECT = 100
-
-
a = MDM.send('AT+CGDCONT=1,"IP","',0)
-
a = MDM.send(APN,0)
-
a = MDM.send('"\r',0)
-
a = MDM.receive(T_GPRS)
-
a = a.find('OK')
-
if (a == -1):
-
print 'ERROR in APN setting'
-
else:
-
print 'APN SETTING OK'
-
-
a = MDM.send('AT#SKTSET=0,80,"',0)
-
a = MDM.send('WEB_ADDR',0)
-
a = MDM.send('"\r',0)
-
a = MDM.receive(T_GPRS)
-
-
a = a.find('OK')
-
if (a == -1):
-
print 'ERROR in port setting'
-
else:
-
print 'port SETTING OK'
-
-
a = MDM.send('AT#SKTSAV\r',0)
-
a = MDM.receive(T_MINIMUM)
-
-
a = a.find('OK')
-
if (a == -1):
-
print 'ERROR in saving'
-
else:
-
print 'saving OK'
-
-
###### the section below is creating trouble########
-
-
a = MDM.send('AT#SKTOP\r',0)
-
timer = MOD.secCounter()
-
timeout = MOD.secCounter() + T_CONNECT
-
a = MDM.receive(4*T_MINIMUM)
-
gprs_data = a.find('CONNECT')
-
print 'printing gprs_data',gprs_data
-
-
####several attempt to connect####
-
while ((gprs_data == -1) and (timer >0)):
-
-
a = MDM.receive(4*T_MINIMUM)
-
gprs_data = a.find('CONNECT')
-
timer = timeout - MOD.secCounter()
-
print 'Timer counter',timer
-
if (gprs_data != -1):
-
print 'GPRS CONNECTED SUCCESFULLY'
-
#statements for receiving data
-
-
else:
-
print 'FAILED GPRS CONNECTION'
-
-
a = MDM.send('+++\r',0)
-
print 'END'
| | Expert 4TB |
I am using a Telit serial MUX (which converts one pyhsical serial port to 4 virtual port). I use one port to view my debug information and one port to send my python script and AT command. I have included the code below. Thanks -
import MDM
-
import MOD
-
-
APN = "telstra.internet"
-
-
WEB_ADDR = "www.telit.com"
-
-
T_MINIMUM = 5
-
T_GPRS = 20
-
T_CONNECT = 100
-
-
a = MDM.send('AT+CGDCONT=1,"IP","',0)
-
a = MDM.send(APN,0)
-
a = MDM.send('"\r',0)
-
a = MDM.receive(T_GPRS)
-
a = a.find('OK')
-
if (a == -1):
-
print 'ERROR in APN setting'
-
else:
-
print 'APN SETTING OK'
-
-
a = MDM.send('AT#SKTSET=0,80,"',0)
-
a = MDM.send('WEB_ADDR',0)
-
a = MDM.send('"\r',0)
-
a = MDM.receive(T_GPRS)
-
-
a = a.find('OK')
-
if (a == -1):
-
print 'ERROR in port setting'
-
else:
-
print 'port SETTING OK'
-
-
a = MDM.send('AT#SKTSAV\r',0)
-
a = MDM.receive(T_MINIMUM)
-
-
a = a.find('OK')
-
if (a == -1):
-
print 'ERROR in saving'
-
else:
-
print 'saving OK'
-
-
###### the section below is creating trouble########
-
-
a = MDM.send('AT#SKTOP\r',0)
-
timer = MOD.secCounter()
-
timeout = MOD.secCounter() + T_CONNECT
-
a = MDM.receive(4*T_MINIMUM)
-
gprs_data = a.find('CONNECT')
-
print 'printing gprs_data',gprs_data
-
-
####several attempt to connect####
-
while ((gprs_data == -1) and (timer >0)):
-
-
a = MDM.receive(4*T_MINIMUM)
-
gprs_data = a.find('CONNECT')
-
timer = timeout - MOD.secCounter()
-
print 'Timer counter',timer
-
if (gprs_data != -1):
-
print 'GPRS CONNECTED SUCCESFULLY'
-
#statements for receiving data
-
-
else:
-
print 'FAILED GPRS CONNECTION'
-
-
a = MDM.send('+++\r',0)
-
print 'END'
Telit looks very cool. Also, you script looks like it should work, provided that these are the same commands that you use in Hyperterminal. To troubleshoot this, I'd make the setup as simple as posible by running the script directly to the serial port (no telit installed). If it works, then Telit is the culprit. Since MDM looks like it's talking to Telit, you may need another python serial module (as suggested above) to make this work.
| | |
thanks for your help... Ill try it out and let you kniow the progress
thanks again
| | Expert 4TB |
thanks for your help... Ill try it out and let you kniow the progress
thanks again
You are welcome. And please do keep us up to date. Thanks.
| | |
i am also doing that. i need the telit serial port mux application pls, can anyone send it to me?
| | |
I am using a Telit serial MUX (which converts one pyhsical serial port to 4 virtual port). I use one port to view my debug information and one port to send my python script and AT command. I have included the code below. Thanks -
import MDM
-
import MOD
-
-
APN = "telstra.internet"
-
-
WEB_ADDR = "www.telit.com"
-
-
T_MINIMUM = 5
-
T_GPRS = 20
-
T_CONNECT = 100
-
-
a = MDM.send('AT+CGDCONT=1,"IP","',0)
-
a = MDM.send(APN,0)
-
a = MDM.send('"\r',0)
-
a = MDM.receive(T_GPRS)
-
a = a.find('OK')
-
if (a == -1):
-
print 'ERROR in APN setting'
-
else:
-
print 'APN SETTING OK'
-
-
a = MDM.send('AT#SKTSET=0,80,"',0)
-
a = MDM.send('WEB_ADDR',0)
-
a = MDM.send('"\r',0)
-
a = MDM.receive(T_GPRS)
-
-
a = a.find('OK')
-
if (a == -1):
-
print 'ERROR in port setting'
-
else:
-
print 'port SETTING OK'
-
-
a = MDM.send('AT#SKTSAV\r',0)
-
a = MDM.receive(T_MINIMUM)
-
-
a = a.find('OK')
-
if (a == -1):
-
print 'ERROR in saving'
-
else:
-
print 'saving OK'
-
-
###### the section below is creating trouble########
-
-
a = MDM.send('AT#SKTOP\r',0)
-
timer = MOD.secCounter()
-
timeout = MOD.secCounter() + T_CONNECT
-
a = MDM.receive(4*T_MINIMUM)
-
gprs_data = a.find('CONNECT')
-
print 'printing gprs_data',gprs_data
-
-
####several attempt to connect####
-
while ((gprs_data == -1) and (timer >0)):
-
-
a = MDM.receive(4*T_MINIMUM)
-
gprs_data = a.find('CONNECT')
-
timer = timeout - MOD.secCounter()
-
print 'Timer counter',timer
-
if (gprs_data != -1):
-
print 'GPRS CONNECTED SUCCESFULLY'
-
#statements for receiving data
-
-
else:
-
print 'FAILED GPRS CONNECTION'
-
-
a = MDM.send('+++\r',0)
-
print 'END'
Thanks for your contribution. I need the Telit serial port mux application you are using my e-mail address is rasaq_olaleye@yahoo.com
| | Expert 4TB |
i am also doing that. i need the telit serial port mux application pls, can anyone send it to me?
I didn't have any luck finding it. Hopefully somebody will.
Do you absolutely need telit? Can you just go direct to ONE serial port or use a better hardware solution?
| | |
Hi Everybody.
I'm trying to use the telit CMUX feature on a board selfmade. No chance!
I'm sure I'm making some mistake with the serial port interfacing.
Does anybody have any idea on how to solve it? A schema would be very much appreciated! I hope in your reply...
| | |
Try to use AT#SKTD, in the place of AT#SKTSET and AT#SKTOP. I had the same problem, and it is working now.
| | |
Hi,
Seems that there is inaccuracy with terms:
- Python programmability
- CMUX
- Managing GPRS connection
In Telit Python programmable GPRS modules
( GM862, GE863, GE864 and GC864 Family ).
Please find complete set of material at:
http://www.m2m-platforms.com/ on material-section.
Kind Regards,
KariM2M
| | Post your reply Sign in to post your reply or Sign up for a free account.
Similar topics
12 posts
views
Thread by David Walker |
last post: by
|
3 posts
views
Thread by Kevin |
last post: by
|
2 posts
views
Thread by headware |
last post: by
|
1 post
views
Thread by Neil |
last post: by
|
2 posts
views
Thread by abhay |
last post: by
| | |
2 posts
views
Thread by Rajesh |
last post: by
|
8 posts
views
Thread by David |
last post: by
|
reply
views
Thread by David |
last post: by
| | | | | | | | | | |