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

Hi !

I try to connect a USB modem EDGE on myRIO without success.

Actually, my modem is recognized as /dev/ttyACM0 and I try to use it with ppp but it doesn't work.

ppp0 is not created when I launch pppd. I tried a lot of different configurations of ppp and none have worked.

Do you know how to configure ppp to use the modem ? There are some other thinks to install ?

Thanks a lot

0 Kudos
Message 1 of 14
(8,000 Views)

Unfortunately, the kernel that shipped for 2013/2013sp1 does not have support for PPP enabled. Also, as I recall, you can't simply compile the support as a module and attempt to load that into the kernel, it simply changes too much regarding the kernel config such that versioned symbols fail to be found on loading.  If you're feeling adventurous, you could try building your own kernel and enabling the support that is needed.

0 Kudos
Message 2 of 14
(4,660 Views)

Thank you for your answer.

So, without build my own kernel, there is no way to use a EDGE modem with myRIO ?

0 Kudos
Message 3 of 14
(4,660 Views)

enzol,

I did a quick search, but it looks like just about all EDGE/EGPRS/IMT-SC USB-based modems use PPP to communicate.   Without PPP support compiled into the kernel, you're kind of out of luck.  As BradM stated, looks like a kernel module isn't going to work due to a variety of dependencies.  Looks like your best bet may be recompiling the kernel.

Note: The source code to all of the OSI licensed code that is on the cRIO and myRIO devices isn't available for download via a direct link, you much email NI at licensing@ni.com and request it.  More information on this can be found in the FAQ: https://decibel.ni.com/content/docs/DOC-35053 ( search for the word 'licensing' to find the question/answer of interest ).

Another option would be to place some other device in your myRIO design that understands PPP via USB and could translate to another protocol that the myRIO supports natively.  Note that this is a pretty extreme 'hack' just to get around not having PPP support in the kernel.

Hope that helps,

-TD

0 Kudos
Message 4 of 14
(4,660 Views)

One thing to keep in mind is that, unfortunately, as things stand now, if you recompile your kernel to have PPP support, there's a good chance that the NI drivers will no longer load (without them being recompiled, that is). This, and the process through which source is requested, are areas that we are looking into improving

0 Kudos
Message 5 of 14
(4,660 Views)

I have spoken too soon, I mis-remembered whether or not that we included the support for PPP in the shipping kernel, and it looks like we did. As I recall, the configuration of the pppd config is a sensitive beast, that is somewhat dependent on your hardware and your carrier, so you probably want to run it in "foreground" mode (using "nodetach") to see how it complains, make changes to the config, and retry.

0 Kudos
Message 6 of 14
(4,660 Views)

Looking over my notes from when I got it working, I have to ask what the actual steps you used to install pppd and friends to the target was. I ask since, in addition to playing around with the config file, there were some non-trivial steps involved in just getting the thing off the ground, specifically around libnl1

0 Kudos
Message 7 of 14
(4,660 Views)

Hi !

I think that my config is good, this is what I have when I launch ppp :

Serial connection established.

using channel 1

Using interface ppp0

Connect: ppp0 <--> /dev/ttyACM0

sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0xac02c7b8> <pcomp> <accomp>]

rcvd [LCP ConfAck id=0x1 <asyncmap 0x0> <magic 0xac02c7b8> <pcomp> <accomp>]

rcvd [LCP ConfReq id=0x1 <mru 1500> <asyncmap 0x0> <magic 0x7b6e516f> <pcomp> <accomp> <auth pap>]

No auth is possible

sent [LCP ConfRej id=0x1 <auth pap>]

rcvd [LCP ConfReq id=0x2 <mru 1500> <asyncmap 0x0> <magic 0x7b6e516f> <pcomp> <accomp>]

sent [LCP ConfAck id=0x2 <mru 1500> <asyncmap 0x0> <magic 0x7b6e516f> <pcomp> <accomp>]

kernel does not support PPP filtering

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

sent [LCP TermAck id=0x3]

Modem hangup

Connection terminated.

When I do "ifconfig", ppp0 doesn't exist.

Here's what I did to install ppp :

opkg update

opkg flag ok libc6

opkg upgrade libc6

opkg install gcc gcc-symlinks

opkg install cpp cpp-symlinks

cd

opkg install libc6-dev -t .

rm -rf opkg-*

opkg install binutils binutils-symlinks

opkg install make

ln -s /lib/libgcc_s.so.1 /lib/libgcc_s.so

opkg install ppp

ln -s /usr/lib/libnl-3.so.200 libnl.so.1

0 Kudos
Message 8 of 14
(4,660 Views)

Ah, one difference is that I used the libnl1 package from the repositories, which installs a static library. I used a cross-compile gcc on my workstation to covert the .a to a .so with the appropriate soname. Anyway, that's an aside and not likely the issue you're seeing here.  Can you check the config of the kernel and post the results of
zcat /proc/config.gz | grep PPP

0 Kudos
Message 9 of 14
(4,660 Views)

Can you check lsmod to make sure that the ppp modules you need are loaded?

0 Kudos
Message 10 of 14
(4,660 Views)