linuxembeddedpppimx6

PPP connection issue embedded linux


I'm trying to establish a PPP connection between an iMX6 and a desktop over serial wire (RS-422). But at the side of the embedded system the connection fails due an error:

Warning: couldn't open ppp database /var/run/pppd2.tdb

or

ioctl (SIOCGIFFLAGS): Bad file descriptor (line 2389)

I've checked several things:

The full output with command is as followed:

root@imx6:~# pppd -d /dev/ttymxc0 38400 -detach lock nocrtscts nocdtrcts 192.168.0.2: netmask 255.255.255.0 &
[1] 355
root@imx6:~# Warning: couldn't open ppp database /var/run/pppd2.tdb
using channel 8
Using interface ppp0
Connect: ppp0 <--> /dev/ttymxc0
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x9194c525> <pcomp> <accomp>]
rcvd [LCP ConfRej id=0x1 <pcomp> <accomp>]
sent [LCP ConfReq id=0x2 <asyncmap 0x0> <magic 0x9194c525>]
rcvd [LCP ConfAck id=0x2 <asyncmap 0x0> <magic 0x9194c525>]
rcvd [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0xcee8fa7d>]
sent [LCP ConfAck id=0x1 <asyncmap 0x0> <magic 0xcee8fa7d>]
sent [CCP ConfReq id=0x1 <deflate 15> <deflate(old#) 15> <bsd v1 15>]
sent [IPCP ConfReq id=0x1 <compress VJ 0f 01> <addr 192.168.0.2>]
rcvd [LCP EchoReq id=0x0 magic=0xcee8fa7d]
sent [LCP EchoRep id=0x0 magic=0x9194c525]
rcvd [IPCP ConfReq id=0x1 <addr 192.168.0.1>]
sent [IPCP ConfAck id=0x1 <addr 192.168.0.1>]
rcvd [CCP ConfReq id=0x1]
sent [CCP ConfAck id=0x1]
rcvd [CCP ConfRej id=0x1 <deflate 15> <deflate(old#) 15> <bsd v1 15>]
sent [CCP ConfReq id=0x2]
rcvd [IPCP ConfRej id=0x1 <compress VJ 0f 01>]
sent [IPCP ConfReq id=0x2 <addr 192.168.0.2>]
rcvd [CCP ConfAck id=0x2]
rcvd [IPCP ConfAck id=0x2 <addr 192.168.0.2>]
sock_fd - number:4 (line 2386)
local  IP address 192.168.0.2
remote IP address 192.168.0.1
Fatal signal 11
sock_fd - number:4 (line 2386)
ioctl (SIOCGIFFLAGS): Bad file descriptor (line 2389)
Script /etc/ppp/ip-up started (pid 358)
Modem hangup
Connect time 0.1 minutes.
Sent 0 bytes, received 0 bytes.
sock_fd - number:4 (line 2386)
Connection terminated.
Script /etc/ppp/ip-up finished (pid 358), status = 0x7f
Fatal signal 11
Script /etc/ppp/ip-down started (pid 359)
Script /etc/ppp/ip-down finished (pid 359), status = 0x7f
^C
[1]+  Done(16)                pppd -d /dev/ttymxc0 38400 -detach lock nocrtscts nocdtrcts 192.168.0.2: netmask 255.255.255.0

The following lines are added to the pppd source to debug this problem:

sock_fd - number:4 (line 2386)

Does anybody know what I could do wrong or what I'm missing?


Solution

  • The problem is fixed by enabling CONFIG_FILE_LOCKING in the kernel configuration.