Article 5FN1Z How to initialize pppd connection witsh RS232 modem?

How to initialize pppd connection witsh RS232 modem?

by
Creatorczyk
from LinuxQuestions.org on (#5FN1Z)
I trying to run the pppd daemon on my embedded board. When I connect the modem to USB and run "pon provider" the initialization is correct (I get the IP address and in "ifconfig" I have ppp0 interface)

"provider" file:

Code: ttyUSB0
115200
lock
crtscts
modem
passive
novj
defaultroute
noipdefault
usepeerdns
noauth
hide-password
persist
holdoff 10
maxfail 0
debug
connect "/usr/sbin/chat -v -t15 -f /etc/ppp/chatscripts/mobile-modem.chat""mobile-modem.chat" file:

Code: ABORT 'BUSY'
ABORT 'NO CARRIER'
ABORT 'VOICE'
ABORT 'NO DIALTONE'
ABORT 'NO DIAL TONE'
ABORT 'NO ANSWER'
ABORT 'DELAYED'
REPORT CONNECT
TIMEOUT 6
'' 'ATQ0'
'OK-AT-OK' 'ATZ'
TIMEOUT 3
'OK\d-AT-OK' 'ATI'
'OK' 'ATZ'
'OK' 'ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0'
'OK' @/etc/ppp/chatscripts/mode
'OK-AT-OK' 'AT+CGDCONT=1,"IP","myapn.pl"'
'OK' 'ATDT*99#'
TIMEOUT 30
CONNECT ''However, I would like to run pppd on the serial port over RS232 (ttyO1 or ttyO2). To do this, I changed the line in the pppd file from "ttyUSB0" to "/ dev / ttyO2". Unfortunately, the daemon does not establish a connection even though all parameters are the same, except of course the device (ttyO2). Below I am pasting logs from "/ var / log / messages". How could I solve this problem? (The error while sending "AT ^ SYSCFG = 14,2,3fffffff, 0,1 ^ M ^ M" also occurs when connecting via USB and does not cause a connection error)

Code: daemon.notice pppd[1612]: pppd 2.4.7 started by root, uid 0
local2.info chat[1614]: abort on (BUSY)
local2.info chat[1614]: abort on (NO CARRIER)
local2.info chat[1614]: abort on (VOICE)
local2.info chat[1614]: abort on (NO DIALTONE)
local2.info chat[1614]: abort on (NO DIAL TONE)
local2.info chat[1614]: abort on (NO ANSWER)
local2.info chat[1614]: abort on (DELAYED)
local2.info chat[1614]: report (CONNECT)
local2.info chat[1614]: timeout set to 6 seconds
local2.info chat[1614]: send (ATQ0^M)
local2.info chat[1614]: expect (OK)
local2.info chat[1614]: ^M
local2.info chat[1614]: OK
local2.info chat[1614]: -- got it
local2.info chat[1614]: send (ATZ^M)
local2.info chat[1614]: timeout set to 3 seconds
local2.info chat[1614]: expect (OKd)
local2.info chat[1614]: ^M
local2.info chat[1614]: ^M
local2.info chat[1614]: OK^M
local2.info chat[1614]: alarm
local2.info chat[1614]: send (AT^M)
local2.info chat[1614]: expect (OK)
local2.info chat[1614]: ^M
local2.info chat[1614]: OK
local2.info chat[1614]: -- got it
local2.info chat[1614]: send (ATI^M)
local2.info chat[1614]: expect (OK)
local2.info chat[1614]: ^M
local2.info chat[1614]: ^M
local2.info chat[1614]: 332^M
local2.info chat[1614]: ^M
local2.info chat[1614]: OK
local2.info chat[1614]: -- got it
local2.info chat[1614]: send (ATZ^M)
local2.info chat[1614]: expect (OK)
local2.info chat[1614]: ^M
local2.info chat[1614]: ^M
local2.info chat[1614]: OK
local2.info chat[1614]: -- got it
local2.info chat[1614]: send (ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0^M)
local2.info chat[1614]: expect (OK)
local2.info chat[1614]: ^M
local2.info chat[1614]: ^M
local2.info chat[1614]: OK
local2.info chat[1614]: -- got it
local2.info chat[1614]: send (AT\^SYSCFG=14,2,3fffffff,0,1^M)
local2.info chat[1614]: expect (OK)
local2.info chat[1614]: ^M
local2.info chat[1614]: AT^SYSCFG=14,2,3fffffff,0,1^M^M
local2.info chat[1614]: ERROR^M
local2.info chat[1614]: alarm
local2.info chat[1614]: send (AT^M)
local2.info chat[1614]: expect (OK)
local2.info chat[1614]: AT^M^M
local2.info chat[1614]: OK
local2.info chat[1614]: -- got it
local2.info chat[1614]: send (AT+CGDCONT=1,"IP","myapn.pl"^M)
local2.info chat[1614]: expect (OK)
local2.info chat[1614]: ^M
local2.info chat[1614]: AT+CGDCONT=1,"IP","myapn.pl"^M^M
local2.info chat[1614]: OK
local2.info chat[1614]: -- got it
local2.info chat[1614]: send (ATDT*99#^M)
local2.info chat[1614]: timeout set to 30 seconds
local2.info chat[1614]: expect (CONNECT)
local2.info chat[1614]: ^M
local2.info chat[1614]: alarm
local2.info chat[1614]: Failed
daemon.debug pppd[1612]: Script /usr/sbin/chat -v -t15 -f /etc/ppp/chatscripts/mobile-modem.chat finished (pid 1613), status = 0x3
daemon.err pppd[1612]: Connect script failedlatest?d=yIl2AUoC8zA latest?i=2GgD-_wPN_U:7ou6JSFQE84:F7zBnMy latest?i=2GgD-_wPN_U:7ou6JSFQE84:V_sGLiP latest?d=qj6IDK7rITs latest?i=2GgD-_wPN_U:7ou6JSFQE84:gIN9vFw2GgD-_wPN_U
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments