Skip to main content
JPrad.2
Associate
March 15, 2023
Solved

Using PPP to connect Modem GPRS

  • March 15, 2023
  • 16 replies
  • 7472 views

Is possible to install ppp tools to connect internet using a GPRS modem ?

We need pppd/chat and kernel support to get network interface, but I can't found them on OpenStLinux resources.

This topic has been closed for replies.
Best answer by Jean-Marc B

Hi @JPrad.2​ 

The OpenSTLinux Package Repository offers several PPP packages:

root@stm32mp1:~# apt-cache search ppp
perl-module-devel-ppport - perl module devel-ppport
ppp - Point-to-Point Protocol (PPP) support
ppp-doc - Point-to-Point Protocol (PPP) support - Documentation files
ppp-l2tp - Plugin for PPP for l2tp support
ppp-minconn - Plugin for PPP to set a delay before the idle timeout applies
ppp-oa - Plugin for PPP for PPP-over-ATM support
ppp-oe - Plugin for PPP for PPP-over-Ethernet support
ppp-password - Plugin for PPP to get passwords via a pipe
ppp-radius - Plugin for PPP for RADIUS support
ppp-tools - Additional tools for the PPP package
ppp-winbind - Plugin for PPP to authenticate against Samba or Windows
fetchmail - Fetchmail retrieves mail from remote mail servers and forwards it via SMTP
fetchmail-doc - Fetchmail retrieves mail from remote mail servers and forwards it via SMTP - Documentation files
fetchmail-locale-ca - Fetchmail retrieves mail from remote mail servers and forwards it via SMTP - ca translations
fetchmail-locale-cs - Fetchmail retrieves mail from remote mail servers and forwards it via SMTP - cs translations
fetchmail-locale-da - Fetchmail retrieves mail from remote mail servers and forwards it via SMTP - da translations
fetchmail-locale-de - Fetchmail retrieves mail from remote mail servers and forwards it via SMTP - de translations
fetchmail-locale-en-gb - Fetchmail retrieves mail from remote mail servers and forwards it via SMTP - en_GB translations
fetchmail-locale-eo - Fetchmail retrieves mail from remote mail servers and forwards it via SMTP - eo translations
fetchmail-locale-es - Fetchmail retrieves mail from remote mail servers and forwards it via SMTP - es translations
fetchmail-locale-fr - Fetchmail retrieves mail from remote mail servers and forwards it via SMTP - fr translations
fetchmail-locale-id - Fetchmail retrieves mail from remote mail servers and forwards it via SMTP - id translations
fetchmail-locale-it - Fetchmail retrieves mail from remote mail servers and forwards it via SMTP - it translations
fetchmail-locale-ja - Fetchmail retrieves mail from remote mail servers and forwards it via SMTP - ja translations
fetchmail-locale-nl - Fetchmail retrieves mail from remote mail servers and forwards it via SMTP - nl translations
fetchmail-locale-pl - Fetchmail retrieves mail from remote mail servers and forwards it via SMTP - pl translations
fetchmail-locale-ro - Fetchmail retrieves mail from remote mail servers and forwards it via SMTP - ro translations
fetchmail-locale-ru - Fetchmail retrieves mail from remote mail servers and forwards it via SMTP - ru translations
fetchmail-locale-sq - Fetchmail retrieves mail from remote mail servers and forwards it via SMTP - sq translations
fetchmail-locale-sr - Fetchmail retrieves mail from remote mail servers and forwards it via SMTP - sr translations
fetchmail-locale-sv - Fetchmail retrieves mail from remote mail servers and forwards it via SMTP - sv translations
fetchmail-locale-vi - Fetchmail retrieves mail from remote mail servers and forwards it via SMTP - vi translations
fetchmail-locale-zh-cn - Fetchmail retrieves mail from remote mail servers and forwards it via SMTP - zh_CN translations
fetchmail-python - Fetchmail retrieves mail from remote mail servers and forwards it via SMTP
ippool - An IP address pool manager
ippool-doc - An IP address pool manager - Documentation files
ippool-test - An IP address pool manager
iptraf-ng - A console-based network monitoring utility
iptraf-ng-doc - A console-based network monitoring utility - Documentation files
ppp-dialin - Enables PPP dial-in through a serial connection
rp-pppoe - A user-mode PPPoE client and server suite for Linux
rp-pppoe-doc - A user-mode PPPoE client and server suite for Linux - Documentation files
rp-pppoe-relay - A user-mode PPPoE client and server suite for Linux
rp-pppoe-server - A user-mode PPPoE client and server suite for Linux
rp-pppoe-sniff - A user-mode PPPoE client and server suite for Linux
webmin-module-ppp-client - Webmin module for ppp-client

To install the packages you need, just type the commands:

root@stm32mp1:~# apt-get update
root@stm32mp1:~# apt-get install <the packages to install>

Best regards,

--JM

16 replies

Olivier GALLIEN
Technical Moderator
March 15, 2023

Hi @JPrad.2​ ,

Yes ppp is part of openembedded-core yocto layer and might be installable on target with "apt-get"

Refer to :

Package repository for OpenSTLinux distribution - stm32mpu

Hope it help,

Olivier

Olivier GALLIEN In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
Jean-Marc B
Jean-Marc BBest answer
ST Employee
March 15, 2023

Hi @JPrad.2​ 

The OpenSTLinux Package Repository offers several PPP packages:

root@stm32mp1:~# apt-cache search ppp
perl-module-devel-ppport - perl module devel-ppport
ppp - Point-to-Point Protocol (PPP) support
ppp-doc - Point-to-Point Protocol (PPP) support - Documentation files
ppp-l2tp - Plugin for PPP for l2tp support
ppp-minconn - Plugin for PPP to set a delay before the idle timeout applies
ppp-oa - Plugin for PPP for PPP-over-ATM support
ppp-oe - Plugin for PPP for PPP-over-Ethernet support
ppp-password - Plugin for PPP to get passwords via a pipe
ppp-radius - Plugin for PPP for RADIUS support
ppp-tools - Additional tools for the PPP package
ppp-winbind - Plugin for PPP to authenticate against Samba or Windows
fetchmail - Fetchmail retrieves mail from remote mail servers and forwards it via SMTP
fetchmail-doc - Fetchmail retrieves mail from remote mail servers and forwards it via SMTP - Documentation files
fetchmail-locale-ca - Fetchmail retrieves mail from remote mail servers and forwards it via SMTP - ca translations
fetchmail-locale-cs - Fetchmail retrieves mail from remote mail servers and forwards it via SMTP - cs translations
fetchmail-locale-da - Fetchmail retrieves mail from remote mail servers and forwards it via SMTP - da translations
fetchmail-locale-de - Fetchmail retrieves mail from remote mail servers and forwards it via SMTP - de translations
fetchmail-locale-en-gb - Fetchmail retrieves mail from remote mail servers and forwards it via SMTP - en_GB translations
fetchmail-locale-eo - Fetchmail retrieves mail from remote mail servers and forwards it via SMTP - eo translations
fetchmail-locale-es - Fetchmail retrieves mail from remote mail servers and forwards it via SMTP - es translations
fetchmail-locale-fr - Fetchmail retrieves mail from remote mail servers and forwards it via SMTP - fr translations
fetchmail-locale-id - Fetchmail retrieves mail from remote mail servers and forwards it via SMTP - id translations
fetchmail-locale-it - Fetchmail retrieves mail from remote mail servers and forwards it via SMTP - it translations
fetchmail-locale-ja - Fetchmail retrieves mail from remote mail servers and forwards it via SMTP - ja translations
fetchmail-locale-nl - Fetchmail retrieves mail from remote mail servers and forwards it via SMTP - nl translations
fetchmail-locale-pl - Fetchmail retrieves mail from remote mail servers and forwards it via SMTP - pl translations
fetchmail-locale-ro - Fetchmail retrieves mail from remote mail servers and forwards it via SMTP - ro translations
fetchmail-locale-ru - Fetchmail retrieves mail from remote mail servers and forwards it via SMTP - ru translations
fetchmail-locale-sq - Fetchmail retrieves mail from remote mail servers and forwards it via SMTP - sq translations
fetchmail-locale-sr - Fetchmail retrieves mail from remote mail servers and forwards it via SMTP - sr translations
fetchmail-locale-sv - Fetchmail retrieves mail from remote mail servers and forwards it via SMTP - sv translations
fetchmail-locale-vi - Fetchmail retrieves mail from remote mail servers and forwards it via SMTP - vi translations
fetchmail-locale-zh-cn - Fetchmail retrieves mail from remote mail servers and forwards it via SMTP - zh_CN translations
fetchmail-python - Fetchmail retrieves mail from remote mail servers and forwards it via SMTP
ippool - An IP address pool manager
ippool-doc - An IP address pool manager - Documentation files
ippool-test - An IP address pool manager
iptraf-ng - A console-based network monitoring utility
iptraf-ng-doc - A console-based network monitoring utility - Documentation files
ppp-dialin - Enables PPP dial-in through a serial connection
rp-pppoe - A user-mode PPPoE client and server suite for Linux
rp-pppoe-doc - A user-mode PPPoE client and server suite for Linux - Documentation files
rp-pppoe-relay - A user-mode PPPoE client and server suite for Linux
rp-pppoe-server - A user-mode PPPoE client and server suite for Linux
rp-pppoe-sniff - A user-mode PPPoE client and server suite for Linux
webmin-module-ppp-client - Webmin module for ppp-client

To install the packages you need, just type the commands:

root@stm32mp1:~# apt-get update
root@stm32mp1:~# apt-get install <the packages to install>

Best regards,

--JM

JPrad.2
JPrad.2Author
Associate
March 15, 2023

I tried to download packages, but apt-get seems have problems

root@stm32mp1:/etc/systemd/system# apt-get update

The software package is provided AS IS, and by downloading it, you agree to be

bound to the terms of the software license agreement (SLA).

The detailed content licenses can be found at

https://wiki.st.com/stm32mpu/wiki/OpenSTLinux_licenses.

Get:1 http://packages.openstlinux.st.com/4.0 kirkstone InRelease [3459 B]

Reading package lists... Done

E: Release file for http://packages.openstlinux.st.com/4.0/dists/kirkstone/InRelease is not valid yet (invalid for another 136d 20h 12min 44s). Updates for this repository will not be applied.

.

And trying to read packages (No results)

root@stm32mp1:/etc/systemd/system# apt-cache search ppp

root@stm32mp1:/etc/systemd/system#

my linux version is:

root@stm32mp1:/etc/systemd/system# uname -a

Linux stm32mp1 5.15.24 #108 SMP PREEMPT Mon Oct 17 12:22:15 UTC 2022 armv7l armv7l armv7l GNU/Linux

Jean-Marc B
ST Employee
March 15, 2023

Hi @JPrad.2​ 

I think the date system of your board is not synchronized to the current date.

Could you check the date please and set it ?

Best regards,

--JM

JPrad.2
JPrad.2Author
Associate
March 15, 2023

Lot of tanks for your suggestion. Repository is now working.

PatrickF
Technical Moderator
March 16, 2023

In order to give better visibility on the answered topics, please click on 'Select as Best' on the reply which solved your issue or answered your question. See also 'Best Answers'

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.NEW ! Sidekick STM32 AI agent, see here
JPrad.2
JPrad.2Author
Associate
March 16, 2023

Hi. After download ppp and ppp-dialin from repositoy we continue with development.

When I try to execute pppd to stablish GPRS/Internet connection I get next message:

Couldn't open the /dev/ppp device: No such file or directory

/usr/sbin/pppd: You need to create the /dev/ppp device node by

executing the following command as root:

    mknod /dev/ppp c 108 0

After node creation and executing again, the message is:

Couldn't open the /dev/ppp device: No such device or address

/usr/sbin/pppd: Please load the ppp_generic kernel module.

I try to load using modprobe:

modprobe ppp_generic

modprobe: FATAL: Module ppp_generic not found in directory /lib/modules/5.15.24

Is the module available for Linux stm32mp1 5.15.24 ?

JPrad.2
JPrad.2Author
Associate
March 16, 2023

After reading some forums problem seems that /dev/ppp device is not created because ppp_generic kernel module is not loaded.

ppp works with pppd (daemon downloaded from repository) and kernel ppp_generic driver to set the network interface on GPRS connection to ISP.

From ppp - ArchWiki (archlinux.org) at pont 4.3 I read:

When starting PPTP client, the pppd process cannot locate the appropriate module:

Couldn't open the /dev/ppp device: No such device or address

Please load the ppp_generic kernel module.

The solution is to create a /etc/modprobe.d/ppp.conf file with:

alias char-major-108 ppp_generic

The correct module will be loaded after reboot.

For me this operation does not work.

Any suggestion ?

Jean-Marc B
ST Employee
March 16, 2023

Hi @JPrad.2​ 

The kernel ppp module is not available by default in the OpenSTLinux ecosystem and you need to build it locally by modifying the kernel configuration in Device Drivers -> Network Device Support -> [ ] PPP (point-to-point protocol) support.

There are some STM32MPU wiki pages which explain how to perform this action. Please refer to

Best regards,

--JM

JPrad.2
JPrad.2Author
Associate
March 20, 2023

Hi JM,

I've added PPP to kernel:

CONFIG_PPP=m

CONFIG_PPP_BSDCOMP=m

CONFIG_PPP_DEFLATE=m

CONFIG_PPP_FILTER=y

CONFIG_PPP_MPPE=m

CONFIG_PPTP=m

CONFIG_PPP_ASYNC=m

I follow st links to compile and modify and finally have copied modules to image.

Used links were:

Modify, rebuild and reload the Linux® kernel - stm32mpu

Menuconfig or how to configure kernel - stm32mpu

My OpenStLinux version and developer package are:

Linux stm32mp1 5.15.24

Process to generate kernel and copy modules works fine, but new image does not start a expected.

On booting, I get next messages on network start up (errors in bold font):

[ OK ] Stopped Network Configuration.

     Starting Network Configuration...

[ *** ] (1 of 3) A start job is running for…ton configuration (23s / no limit)

[**  ] (1 of 3) A start job is running for…ton configuration (33s / no limit)

[  44.359760] Time out check galcore device expired

[ OK ] Finished Check if the gpu … correct weston configuration.

[FAILED] Failed to start Network Name Resolution.

See 'systemctl status systemd-resolved.service' for details.

[ OK ] Stopped Network Name Resolution.

[FAILED] Failed to start Network Configuration.

See 'systemctl status systemd-networkd.service' for details.

[ OK ] Stopped Network Configuration.

     Starting Network Configuration...

[  **] A start job is running for Network Configuration (1min 34s / 3min)

Last message does not end never, so I can't access to systemd-resolved.service and systemd-network.service to debuig them.

I think cause may be first error (galcore device timeout). Searching at web, I can read error may be realted to modules version, but developer-package and linux image is the same.

Can you help me ?

Jean-Marc B
ST Employee
March 20, 2023

Hi @JPrad.2​ 

For the galcore module, this post may be helpful: https://community.st.com/s/question/0D53W00001KSSAoSAP/time-out-check-load-galcore-module-expired-how-to-solve-it

For the network problem, you could try without connecting the board to ethernet.

Best regards,

--JM

JPrad.2
JPrad.2Author
Associate
March 20, 2023

Hi,

I'm working to solve galcore module.

I prepare sources at:

/home/selba/DevOpenSTLinux/tmp/gcnano-binaries/gcnano-driver-6.4.9

In folder I can see Makefile, Kbuild, and so on...

I define variable GALCORE_DIR with value the previous path.

Next, I change to my linux kernel source code which is:

~/DevOpenSTLinux/Developer-Package/en.SOURCES-stm32mp1-openstlinux-5.15-yocto-kirkstone-mp1-v22.06.15/stm32mp1-openstlinux-5.15-yocto-kirkstone-mp1-v22.06.15/sources/arm-ostl-linux-gnueabi/linux-stm32mp-5.15.24-stm32mp1-r1-r0/linux-5.15.24

From this I run your link detailed command to compile the driver:

make -C ${PWD} AQROOT=${GALCORE_DIR} M=${GALCORE_DIR} modules

Compilation fails. I've reviewed paths but I can't view what's happen.

output is:

make -C ${PWD} AQROOT=${GALCORE_DIR} M=${GALCORE_DIR} modules

make: Entering directory '/home/selba/DevOpenSTLinux/Developer-Package/en.SOURCES-stm32mp1-openstlinux-5.15-yocto-kirkstone-mp1-v22.06.15/stm32mp1-openstlinux-5.15-yocto-kirkstone-mp1-v22.06.15/sources/arm-ostl-linux-gnueabi/linux-stm32mp-5.15.24-stm32mp1-r1-r0/linux-5.15.24'

make[1]: *** No rule to make target '/home/selba/DevOpenSTLinux/tmp/gcnano-binaries/gcnano-driver-6.4.9/hal/os/linux/kernel/platform/st/gc_hal_kernel_platform_st.o', needed by '/home/selba/DevOpenSTLinux/tmp/gcnano-binaries/gcnano-driver-6.4.9/galcore.o'. Stop.

make: *** [Makefile:1868: /home/selba/DevOpenSTLinux/tmp/gcnano-binaries/gcnano-driver-6.4.9] Error 2

make: Leaving directory '/home/selba/DevOpenSTLinux/Developer-Package/en.SOURCES-stm32mp1-openstlinux-5.15-yocto-kirkstone-mp1-v22.06.15/stm32mp1-openstlinux-5.15-yocto-kirkstone-mp1-v22.06.15/sources/arm-ostl-linux-gnueabi/linux-stm32mp-5.15.24-stm32mp1-r1-r0/linux-5.15.24'

Olivier GALLIEN
Technical Moderator
March 20, 2023

Hi @JPrad.2​ ,

gcnano-driver-6.4.9 is not compatible with linux-5.15.24 but linux-5-15.67.

To be compatible with linux-5.15.24 you have to use gcnano V6.4.7.

Refer to STM32 MPU ecosystem release note - stm32mpu to get consistent set of component.

Hope it help

Olivier

Olivier GALLIEN In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.