Hi,
We have developed a custom AM1808 board, in that we connected a GSM module to /dev/ttyS1, my requirement is to connect internet through that GSM modem.
Any suggestions would be appreciated.
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi,
We have developed a custom AM1808 board, in that we connected a GSM module to /dev/ttyS1, my requirement is to connect internet through that GSM modem.
Any suggestions would be appreciated.
Hi Sreenivas,
You may find below some useful links.
http://processors.wiki.ti.com/index.php/TI-Android-JB-4.2.2-DevKit-4.1.1_PortingGuide#USB_3G_Modem
http://e2e.ti.com/support/dsp/omap_applications_processors/f/42/t/319803.aspx
Hi Titus,
Thanks for the reply, the links what you have sent was related to Android and USB communications, based on that I have enabled the ppp support in linux menuconfig, and i have also cross compiled ppp-2.4.6 utility.
But i have the problem with configuring the ppp and starting the pppd service, can you please provide clear steps that how to configure and start the internet.
Hi,
$ usb_modeswitch -v <vendor id of ur modem> -p <product id of ur modem> -M < msg code of as per ur vendor&product code>
Or you can write udev rules for all supported modems.
call "pppd' binary to connect internet.
Q) Can you able to convert your modem from USB to modem device
[ 2859.031421] scsi9 : usb-storage 5-1:1.3
[ 2859.138453] USB Serial support registered for GSM modem (1-port)
[ 2859.138621] option 5-1:1.0: GSM modem (1-port) converter detected
[ 2859.139471] usb 5-1: GSM modem (1-port) converter now attached to ttyUSB1
[ 2859.139510] option 5-1:1.1: GSM modem (1-port) converter detected
[ 2859.140479] usb 5-1: GSM modem (1-port) converter now attached to ttyUSB2
[ 2859.140518] option 5-1:1.2: GSM modem (1-port) converter detected
[ 2859.140871] usb 5-1: GSM modem (1-port) converter now attached to ttyUSB3
Ex:
$ pppd call gprs
Put script named "gprs " for accessing internet through APN commands.
hi,
I am using GSM module with serial interface(i.e UART) not the USB module, as far i read, pppd can be used directly by specifying options in /etc/options file, when pppd called its getting terminated after the time out specified with out showing any error.
is there any way to find where i am going wring.
Hi Sreenivas,
Sreenivas said:I am using GSM module with serial interface(i.e UART) not the USB module, as far i read, pppd can be used directly by specifying options in /etc/options file, when pppd called its getting terminated after the time out specified with out showing any error.
I got it,
Please use the attached ppp folder and extract it in your filesystem.
I have modified "gprs" file & /etc/ppp/ folder according to your /dev/ttyS1 serial port modem.
Ensure that you have "/dev/modem" device node, If not then enable kernel support through menconfig as per the previous reply.
To activate gprs in your connected GPRS module,
I assume that you are using airtel n/w, If any other network provide then change the APN settings in connect scripts.
target $ pppd call gprs &
Note:
Ensure that you have the execute (777 -> R/W/X ) permissions for " /etc/ppp/* " folder
Hi,
Thanks for the scripts that you have sent, i have copied ppp folder to /etc and then entered
#pppd call gprs &
I am getting response as
ATPress CTRL-C to close the connection at any stage!
defining PDP context...
OK
Script /etc/ppp/peers/gprs-connect-modem finished (pid 1110), status = 0x3
Connect script failed
[2] + Done(8) pppd call gprs
I dint get where i am going wrong, can you please let me know.
Hi,
I found the issue with the RTS and CTS lines and it got resolved, and it shows log as
pppd call gprs &
root@am180x-evm:/etc/ppp# Press CTRL-C to close the connection at any stage!
defining PDP context...
AT
OK
ATZ
OK
OK
AT+CGDCONT=1,"IP","airtelgprs.com",,0,0
OK
Script /etc/ppp/peers/gprs-connect-modem finished (pid 1170), status = 0x0
Serial connection established.
using channel 4
Using interface ppp0
Connect: ppp0 <--> /dev/ttyS1
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0xdf658ba9>]
rcvd [LCP ConfReq id=0x1 <asyncmap 0xa0000> <auth pap>]
sent [LCP ConfAck id=0x1 <asyncmap 0xa0000> <auth pap>]
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0xdf658ba9>]
rcvd [LCP ConfRej id=0x1 <magic 0xdf658ba9>]
sent [LCP ConfReq id=0x2 <asyncmap 0x0>]
rcvd [LCP ConfAck id=0x2 <asyncmap 0x0>]
sent [LCP EchoReq id=0x0 magic=0x0]
sent [PAP AuthReq id=0x1 user="am180x-evm" password=""]
rcvd [LCP EchoRep id=0x0 magic=0x0]
rcvd [PAP AuthAck id=0x1 "Login OK"]
Remote message: Login OK
PAP authentication succeeded
sent [IPCP ConfReq id=0x1 <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
sent [LCP EchoReq id=0x1 magic=0x0]
rcvd [LCP EchoRep id=0x1 magic=0x0]
sent [IPCP ConfReq id=0x1 <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
rcvd [IPCP ConfReq id=0x1 <addr 192.200.1.21>]
sent [IPCP ConfAck id=0x1 <addr 192.200.1.21>]
rcvd [IPCP ConfNak id=0x1 <addr 100.71.5.196> <ms-dns1 122.175.1.5> <ms-dns2 203.145.160.6>]
sent [IPCP ConfReq id=0x2 <addr 100.71.5.196> <ms-dns1 122.175.1.5> <ms-dns2 203.145.160.6>]
rcvd [IPCP ConfAck id=0x2 <addr 100.71.5.196> <ms-dns1 122.175.1.5> <ms-dns2 203.145.160.6>]
Cannot determine ethernet address for proxy ARP
local IP address 100.71.5.196
remote IP address 192.200.1.21
primary DNS address 122.175.1.5
secondary DNS address 203.145.160.6
Script /etc/ppp/ip-up started (pid 1179)
Script /etc/ppp/ip-up finished (pid 1179), status = 0x0
But the problem is with DNS, airtel network has
Preferred DNS server : 202.56.215.28
Alternate DNS server : 202.56.215.29
i have tried to change the address in /etc/ppp/reslove.conf but while starting ppp its gets automatically changed to that address
while ping i am getting
# ping www.google.com
ping: bad address 'www.google.com'
ping 74.125.224.72
PING 74.125.224.72 (74.125.224.72): 56 data bytes
64 bytes from 74.125.224.72: seq=0 ttl=52 time=861.196 ms
64 bytes from 74.125.224.72: seq=1 ttl=52 time=729.932 ms
64 bytes from 74.125.224.72: seq=2 ttl=52 time=569.338 ms
64 bytes from 74.125.224.72: seq=3 ttl=52 time=588.728 ms
64 bytes from 74.125.224.72: seq=4 ttl=52 time=548.125 ms
64 bytes from 74.125.224.72: seq=5 ttl=52 time=567.580 ms
64 bytes from 74.125.224.72: seq=6 ttl=52 time=586.966 ms
--- 74.125.224.72 ping statistics ---
8 packets transmitted, 7 packets received, 12% packet loss
round-trip min/avg/max = 548.125/635.980/861.196 ms
Hi,
local IP address 100.71.5.196
remote IP address 192.200.1.21
Nice to hear this news.
Copy the resolv.conf file from /etc/ppp/ to /etc and then ping "www.google.com"
cp -rf /etc/ppp/resolv.conf /etc
Dear Titus,
I am also working with UART based GPRS module (/dev/ttyS1) in the same platform and got struck at the below :
I have followed the same steps and copied all the required files. Kernel version is 2.6.37 version.
Please do the needful to rectfy my issue.
root@am180x-evm:~# cd /etc/ppp/
root@am180x-evm:/etc/ppp#
root@am180x-evm:/etc/ppp# pppd call gprs &
root@am180x-evm:/etc/ppp# Press CTRL-C to close the connection at any stage!
defining PDP context...
/etc/ppp/peers/gprs-connect-modem: line 57: TIMEOUT: not found
Script /etc/ppp/peers/gprs-connect-modem finished (pid 1216), status = 0x7f
Connect script failed
[1] + Done(8) pppd call gprs
Thanks,
Lofna
Hi Lofna,
What is your network provider ?
/etc/ppp/peers/gprs-connect-modem: line 57: TIMEOUT: not found
Try to remove "TIMEOUT" command in "gprs-connect-modem" script.
You have to tweak the ppp scripts as per your requirement to make it to work.
You have to get "AT" commands output when you call pppd.
Ex:
AT
OK
ATZ
OK
Dear Titusrathinaraj,
Before it was working the GPRS and got the local IP and remote IP. Some times i am facing the issue to connect wuth GPRS script. While run the script and got the below error.
root@evm:/etc/ppp/peers# pppd connect gprs&
pppd: The remote system is required to authenticate itself
pppd: but I couldn't find any suitable secret (password) for it to use to do so.
Please suggest me what to do?
Thanks,
Lofna
Hi Lofna,
Please make sure that you have "noauth" in "/etc/ppp/options" file and should not have "auth"
Dear Titusrathinaraj,
Thanks,
After changed the setting the previous error gone, now after run the command (pppd connect gprs&) got the following repose:
pppd: no device specified and stdin is not a tty
Thanks,
Lofna
Dear Titusrathinaraj,
Now i am able get the local and remote ip. and able to pinging. Some time my connection is terminated after 1 or 2 minute interval. When i run any Qt browser and try to access Google, the IP link goes down and terminated the connection.
If i run ping in my terminal continuously is getting the packets and have observed the status almost 15 minutes without any fail.
Please find attached log for your reference and suggest me why it is happening. I am using Linux 2.6 & Airtel service provider is using in our GPRS. Our target have 128MR RAM configuration. Is there any memory issue.??
Thanks,
Lofna