WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: PPP discipline error when trying to connect via 3G cellular modem  (Read 1915 times)

Offline derjan

  • Newbie
  • *
  • Posts: 9
I'm trying to get a cellular 3G module working on piCore 9.0.3. It's an XBee shield on an sixfab (FTDI chip) USB to serial board, and it works on Raspbian with ppp. I've installed ppp.tcz, usbutils.tcz and usb-serial-4.9.22-piCore-v7.tcz and ran the commands shown in the installation notes from ppp-modules-4.9.22-piCore-v7.tcz (a dependency of ppp.tcz). I can successfully communicate with the modem via screen /dev/ttyUSB0 115200 (AT -> OK etc.).

I've added /etc/ppp/options and /etc/ppp/pppscript (similar to http://forum.tinycorelinux.net/index.php/topic,458.0.html, but with the commands that work on Raspbian) and if I run sudo pppd it seems to connect correctly, but fails with these lines:

Code: [Select]
Script chat -s -v -f /etc/ppp/pppscript -T internet.eplus.de finished (pid 814), status = 0x0
Serial connection established.
Couldn't set tty to PPP discipline: Invalid argument

Searching for the "PPP discipline" error message leads me to this website: http://pptpclient.sourceforge.net/howto-diagnosis.phtml#tty_einval saying the kernel needs to be built with CONFIG_PPP_ASYNC, but as far as I can see (http://tinycorelinux.net/9.x/armv7/releases/RPi/src/kernel/4.9.22-piCore-v7.config.xz) it is compiled with this flag. Does anyone have an Idea what else could be missing / wrong?

Offline derjan

  • Newbie
  • *
  • Posts: 9
Re: PPP discipline error when trying to connect via 3G cellular modem
« Reply #1 on: February 09, 2018, 06:54:05 AM »
If someone has the same problem, it turns out that a file is missing from (I suppose) ppp-modules-4.9.22-piCore-v7.tcz. I've extracted ppp_async.ko from http://tinycorelinux.net/9.x/armv7/releases/RPi/src/kernel/4.9.22-piCore-v7_modules.tar.xz and put it into a directory named ppp-async-4.9.22-piCore-v7/usr/local/lib/modules/4.9.22-piCore-v7/kernel/drivers/net/ppp.

Then I created an extension from this directory with mksquashfs ppp-async-4.9.22-piCore-v7 ppp-async-4.9.22-piCore-v7.tcz -b 4k -no-xattrs and installed it like this:
Code: [Select]
tce-load -i ppp-async-4.9.22-piCore-v7.tcz
sudo depmod -a
mv ppp-async-4.9.22-piCore-v7.tcz /etc/sysconfig/tcedir/optional
echo ppp-async-4.9.22-piCore-v7.tcz >> /etc/sysconfig/tcedir/onboot.lst
filetool.sh -b

After rebooting a PPP connection using the 3G cellular modem could be established.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14850
Re: PPP discipline error when trying to connect via 3G cellular modem
« Reply #2 on: February 10, 2018, 07:33:29 AM »
thanks for reporting this - updated ppp-modules-4.9.22-piCore-v7 posted

Offline derjan

  • Newbie
  • *
  • Posts: 9
Re: PPP discipline error when trying to connect via 3G cellular modem
« Reply #3 on: February 13, 2018, 11:39:06 AM »
Awesome, thanks! It now works out of the box.