NI Linux Real-Time Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Using ppp on NI Linux Real-Time with a EDGE modem

It's very strange...

With zcat /proc/config.gz | grep PPP, I got :

CONFIG_PPP=m

CONFIG_PPP_BSDCOMP=m

CONFIG_PPP_DEFLATE=m

# CONFIG_PPP_FILTER is not set

# CONFIG_PPP_MPPE is not set

# CONFIG_PPP_MULTILINK is not set

# CONFIG_PPPOE is not set

# CONFIG_PPPOL2TP is not set

CONFIG_PPP_ASYNC=m

CONFIG_PPP_SYNC_TTY=m

And with lsmod, I got :

    Tainted: P

ppp_deflate 4056 0 - Live 0xbf33e000

bsd_comp 5152 0 - Live 0xbf339000

ppp_async 7041 0 - Live 0xbf333000

crc_ccitt 1129 1 ppp_async, Live 0xbf32f000

ppp_generic 21589 3 ppp_deflate,bsd_comp,ppp_async, Live 0xbf324000

slhc 4399 1 ppp_generic, Live 0xbf31f000

niriozynqk 208231 0 - Live 0xbf2d2000 (P)

bb_libk 127770 0 - Live 0xbf2a5000 (P)

NiRioSrv 687319 2 - Live 0xbf1a6000 (P)

nibds 48648 3 niriozynqk,bb_libk,NiRioSrv, Live 0xbf192000 (P)

nikal 55372 4 niriozynqk,bb_libk,NiRioSrv,nibds, Live 0xbf172000 (P)

ipv6 269231 12 - Live 0xbf11a000

wl12xx_sdio 3582 0 - Live 0xbf116000 (O)

cdc_acm 15093 0 - Live 0xbf10d000

wl12xx 193120 0 - Live 0xbf0d0000 (O)

mac80211 371582 1 wl12xx, Live 0xbf056000 (O)

cfg80211 194843 2 wl12xx,mac80211, Live 0xbf015000 (O)

firmware_class 6438 1 wl12xx, Live 0xbf00f000

ehci_hcd 38916 0 - Live 0xbf000000

Does PPP_FILTER is needed for ppp ?

0 Kudos
Message 11 of 14
(1,228 Views)

I was able to get 3G CDC ACM modem support working without filtering, and, checking the Kconfig text that accompanies the setting, seems that it is unnecessary, a nicety to have to limit some of the communication.

Reading your ppp output more closely...

enzol2 wrote:

...

sent [CCP ConfReq id=0x1 <deflate 15> <deflate(old#) 15> <bsd v1 15>]

sent [IPCP ConfReq id=0x1 <compress VJ 0f 01> <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]

rcvd [LCP TermReq id=0x3]

LCP terminated by peer

...

it seems that some of the configuration that ppp attempts is making the modem unhappy, leading it to terminate the connection. Basically, I would either check to see if someone else has configured ppp to work with this modem and see what their configuration was or become familiar with the pppd manpage and change around options to get things working.

0 Kudos
Message 12 of 14
(1,228 Views)

Shame on me !!!

I forgot to config /etc/ppp/peap-secret...

It's working now !

Thank you for your help

0 Kudos
Message 13 of 14
(1,228 Views)

No problem. Now it should show up as a proper network interface and, I can attest, will work properly with LV networking primitives, I created a prototype remote control application whereby I could change the brightness and color of a 9068 LED from anywhere that had a connection to the internet, creating a simple protocol atop TCP/IP primitives. Just be careful to note whether or not it's using the regular wired network connection or the cellular modem connection.

You will likely want to look into setting up iptables rules to control input and output for particular ports that you care about, at least for early prototyping. If you don't want to concern yourself with that, you could make a startup app instead and use either a logfile, RT LEDs, or some other means to check to see what the application is doing. I ultimately used the RT LEDs for a simple means of letting me know where the application was at: off meant it was still looking for the ppp0 interface to appear, amber meant it was waiting for a network connection/ability to ping network resources, and green meant it had established a network connection and was sending/receiving. The application was written to handle the network becoming unreachable, first returning to attempting to establish a connection and, failing that, would restart the pppd daemon (even though the daemon was configured to do this itself, sometimes it would miss the fact that the connection would need to be reinitialized).

0 Kudos
Message 14 of 14
(1,228 Views)