473,407 Members | 2,546 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

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

4
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
14 8754
bartonc
6,596 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
136 Expert 100+
Without regard to the GPS part, I have also had good success with PySerial.
Feb 12 '07 #3
nsamad
4
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
6,596 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
nsamad
4
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
6,596 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
nsamad
4
thanks for your help... Ill try it out and let you kniow the progress

thanks again
Feb 14 '07 #8
bartonc
6,596 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
rasaq
2
i am also doing that. i need the telit serial port mux application pls, can anyone send it to me?
Feb 22 '07 #10
rasaq
2
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
6,596 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

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

Similar topics

12
by: David Walker | last post by:
Hi I have a program which I need to interface with a webpage - the webpage will accept an input (probably a 'post' string from the program) and then will process it and needs to return a value. ...
3
by: Kevin | last post by:
Hi All I got some good responses from some of you guys regarding me serial port interfacing problem that I posted a little while back. However your help leaded me to this link belo ...
2
by: headware | last post by:
I'm relatively new to ASP.NET and ADO.NET, but I have a basic design question regarding the use of web services and APS.NET applications. Right now we have an application that uses web services to...
1
by: Neil | last post by:
Our hosting company's server went down a few days ago. After they fixed it, our PHP Page and Database are not interfacing. They are not believing me that I have done nothing on my end in several...
2
by: abhay | last post by:
hi,i m interfacing gsm modem to my microcontroller.i need to send sms through it. i am using AT commands for that.the command to send sms (AT+ CMGS) terminates with ctrl-Z.now in my program i hav...
0
by: adilayub | last post by:
can anyody help me in interfacing USB port in java. please mail me the code if anybody has it. Thanks in advace
0
by: adilayub | last post by:
Hello, Can anybody help me in interfacing USB port in C++. if anybody has the code please mail it to me. Thank in advance . Redgs, Adil Ayub
2
by: Rajesh | last post by:
HI, I am newer person in VB development, any one guide me for hardware interfacing in VB. Thanks.
8
by: David | last post by:
Hi, I'm looking for advice on where to start with interfacing VB 2005 with Access 2003. For starters I would like to be able to add data to tables and retrieve queries from tables. Thanks, ...
0
by: David | last post by:
Hi, I have a form with an IE 1.1 web browser on it. A tutorial provided me with basic interfacing such as setting the URL, forward, back, and stop. Now I am hoping I can find a way to do a few...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.