467,132 Members | 1,222 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,132 developers. It's quick & easy.

Is anyone interfacing GM8620-GPS or similar device with python script??

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
Feb 12 '07 #1
  • viewed: 8351
Share:
14 Replies
bartonc
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.
Feb 12 '07 #2
dshimer
Expert 100+
Without regard to the GPS part, I have also had good success with PySerial.
Feb 12 '07 #3
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
Feb 13 '07 #4
bartonc
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.
Feb 13 '07 #5
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
Expand|Select|Wrap|Line Numbers
  1. import MDM
  2. import MOD
  3.  
  4. APN = "telstra.internet"
  5.  
  6. WEB_ADDR = "www.telit.com"
  7.  
  8. T_MINIMUM = 5
  9. T_GPRS = 20
  10. T_CONNECT = 100
  11.  
  12. a = MDM.send('AT+CGDCONT=1,"IP","',0)
  13. a = MDM.send(APN,0)
  14. a = MDM.send('"\r',0)
  15. a = MDM.receive(T_GPRS)
  16. a = a.find('OK')
  17. if (a == -1):
  18.  print 'ERROR in APN setting'
  19. else:
  20.  print 'APN SETTING OK'
  21.  
  22. a = MDM.send('AT#SKTSET=0,80,"',0)
  23. a = MDM.send('WEB_ADDR',0)
  24. a = MDM.send('"\r',0)
  25. a = MDM.receive(T_GPRS)
  26.  
  27. a = a.find('OK')
  28. if (a == -1):
  29.  print 'ERROR in port setting'
  30. else:
  31.  print 'port SETTING OK'
  32.  
  33. a = MDM.send('AT#SKTSAV\r',0)
  34. a = MDM.receive(T_MINIMUM)
  35.  
  36. a = a.find('OK')
  37. if (a == -1):
  38.  print 'ERROR in saving'
  39. else:
  40.  print 'saving OK'
  41.  
  42. ###### the section below is creating trouble########
  43.  
  44. a = MDM.send('AT#SKTOP\r',0)
  45. timer = MOD.secCounter()
  46. timeout = MOD.secCounter() + T_CONNECT 
  47. a = MDM.receive(4*T_MINIMUM)
  48. gprs_data = a.find('CONNECT')
  49. print 'printing gprs_data',gprs_data
  50.  
  51. ####several attempt to connect####
  52. while ((gprs_data == -1) and (timer >0)):
  53.  
  54.     a = MDM.receive(4*T_MINIMUM)
  55.     gprs_data = a.find('CONNECT')
  56.     timer = timeout - MOD.secCounter()
  57.     print 'Timer counter',timer
  58. if (gprs_data != -1):
  59.     print 'GPRS CONNECTED SUCCESFULLY'
  60.  #statements for receiving data
  61.  
  62. else:
  63.     print 'FAILED GPRS CONNECTION'
  64.  
  65. a = MDM.send('+++\r',0)
  66. print 'END'
Feb 14 '07 #6
bartonc
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
Expand|Select|Wrap|Line Numbers
  1. import MDM
  2. import MOD
  3.  
  4. APN = "telstra.internet"
  5.  
  6. WEB_ADDR = "www.telit.com"
  7.  
  8. T_MINIMUM = 5
  9. T_GPRS = 20
  10. T_CONNECT = 100
  11.  
  12. a = MDM.send('AT+CGDCONT=1,"IP","',0)
  13. a = MDM.send(APN,0)
  14. a = MDM.send('"\r',0)
  15. a = MDM.receive(T_GPRS)
  16. a = a.find('OK')
  17. if (a == -1):
  18.  print 'ERROR in APN setting'
  19. else:
  20.  print 'APN SETTING OK'
  21.  
  22. a = MDM.send('AT#SKTSET=0,80,"',0)
  23. a = MDM.send('WEB_ADDR',0)
  24. a = MDM.send('"\r',0)
  25. a = MDM.receive(T_GPRS)
  26.  
  27. a = a.find('OK')
  28. if (a == -1):
  29.  print 'ERROR in port setting'
  30. else:
  31.  print 'port SETTING OK'
  32.  
  33. a = MDM.send('AT#SKTSAV\r',0)
  34. a = MDM.receive(T_MINIMUM)
  35.  
  36. a = a.find('OK')
  37. if (a == -1):
  38.  print 'ERROR in saving'
  39. else:
  40.  print 'saving OK'
  41.  
  42. ###### the section below is creating trouble########
  43.  
  44. a = MDM.send('AT#SKTOP\r',0)
  45. timer = MOD.secCounter()
  46. timeout = MOD.secCounter() + T_CONNECT 
  47. a = MDM.receive(4*T_MINIMUM)
  48. gprs_data = a.find('CONNECT')
  49. print 'printing gprs_data',gprs_data
  50.  
  51. ####several attempt to connect####
  52. while ((gprs_data == -1) and (timer >0)):
  53.  
  54.     a = MDM.receive(4*T_MINIMUM)
  55.     gprs_data = a.find('CONNECT')
  56.     timer = timeout - MOD.secCounter()
  57.     print 'Timer counter',timer
  58. if (gprs_data != -1):
  59.     print 'GPRS CONNECTED SUCCESFULLY'
  60.  #statements for receiving data
  61.  
  62. else:
  63.     print 'FAILED GPRS CONNECTION'
  64.  
  65. a = MDM.send('+++\r',0)
  66. 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.
Feb 14 '07 #7
thanks for your help... Ill try it out and let you kniow the progress

thanks again
Feb 14 '07 #8
bartonc
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.
Feb 14 '07 #9
i am also doing that. i need the telit serial port mux application pls, can anyone send it to me?
Feb 22 '07 #10
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
Expand|Select|Wrap|Line Numbers
  1. import MDM
  2. import MOD
  3.  
  4. APN = "telstra.internet"
  5.  
  6. WEB_ADDR = "www.telit.com"
  7.  
  8. T_MINIMUM = 5
  9. T_GPRS = 20
  10. T_CONNECT = 100
  11.  
  12. a = MDM.send('AT+CGDCONT=1,"IP","',0)
  13. a = MDM.send(APN,0)
  14. a = MDM.send('"\r',0)
  15. a = MDM.receive(T_GPRS)
  16. a = a.find('OK')
  17. if (a == -1):
  18.  print 'ERROR in APN setting'
  19. else:
  20.  print 'APN SETTING OK'
  21.  
  22. a = MDM.send('AT#SKTSET=0,80,"',0)
  23. a = MDM.send('WEB_ADDR',0)
  24. a = MDM.send('"\r',0)
  25. a = MDM.receive(T_GPRS)
  26.  
  27. a = a.find('OK')
  28. if (a == -1):
  29.  print 'ERROR in port setting'
  30. else:
  31.  print 'port SETTING OK'
  32.  
  33. a = MDM.send('AT#SKTSAV\r',0)
  34. a = MDM.receive(T_MINIMUM)
  35.  
  36. a = a.find('OK')
  37. if (a == -1):
  38.  print 'ERROR in saving'
  39. else:
  40.  print 'saving OK'
  41.  
  42. ###### the section below is creating trouble########
  43.  
  44. a = MDM.send('AT#SKTOP\r',0)
  45. timer = MOD.secCounter()
  46. timeout = MOD.secCounter() + T_CONNECT 
  47. a = MDM.receive(4*T_MINIMUM)
  48. gprs_data = a.find('CONNECT')
  49. print 'printing gprs_data',gprs_data
  50.  
  51. ####several attempt to connect####
  52. while ((gprs_data == -1) and (timer >0)):
  53.  
  54.     a = MDM.receive(4*T_MINIMUM)
  55.     gprs_data = a.find('CONNECT')
  56.     timer = timeout - MOD.secCounter()
  57.     print 'Timer counter',timer
  58. if (gprs_data != -1):
  59.     print 'GPRS CONNECTED SUCCESFULLY'
  60.  #statements for receiving data
  61.  
  62. else:
  63.     print 'FAILED GPRS CONNECTION'
  64.  
  65. a = MDM.send('+++\r',0)
  66. 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
Feb 22 '07 #11
bartonc
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?
Feb 22 '07 #12
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...
Oct 2 '07 #13
Try to use AT#SKTD, in the place of AT#SKTSET and AT#SKTOP. I had the same problem, and it is working now.
Oct 16 '07 #14
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
Oct 10 '08 #15

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

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
reply views Thread by adilayub | last post: by
reply views Thread by adilayub | last post: by
2 posts views Thread by Rajesh | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.