LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware - ARM (https://www.linuxquestions.org/questions/slackware-arm-108/)
-   -   Slackware ARM current help with ppp setup, missing ethernet drivers (https://www.linuxquestions.org/questions/slackware-arm-108/slackware-arm-current-help-with-ppp-setup-missing-ethernet-drivers-4175616554/)

janas03 10-28-2017 04:17 PM

Slackware ARM current help with ppp setup, missing ethernet drivers
 
Recently I bought OrangePi Zero v1.4 board. It comes with a preinstalled Armbian (this distribution uses 3.x kernel branch). I connected gprs modem and managed to establish ppp connection by adding a script to /etc/ppp/peers and verifying /etc/chatscripts/gprs. I also did wlan and ethernet tests. Everything worked as expected. Ok, let's install Slackware then. Slackware ARM current has support for H2+ and H3 chips so using this thread click I managed to successfully install Slackware the 'normal' way. I have three issues however:
1. I don't really know how to setup ppp. There is no pppsetup in path but I found it somewhere in the /usr/share. So I rebuilt the ppp package using Slackware64-current sources. Ok, let's run pppsetup. It asks questions I don't know answers for and exits with failure. All I want is to have pon and poff (or Slackware alternatives). I know that they will be created upon successful pppsetup finish. How should it be done? I just want to copy my scripts and run pon to start ppp connection.
2. There is no ethernet. ifconfig shows loopback interface only. I compared my and Armbian's uboot output and they are the same (except the model version, my is built for orangepi_zero, Armbian's for orangepi_pc). Both uboots recognize eth0 properly. So I suspect that this may be the kernel driver issue. However, I am out of ideas.
3. The same applies for wlan interface. Grepping dmesg for wlan, radio yields nothing.

Alien Bob 10-28-2017 04:45 PM

This question belongs in the "Slackware - ARM" subforum.

abga 10-29-2017 02:05 PM

Quote:

1. I don't really know how to setup ppp. There is no pppsetup in path but I found it somewhere in the /usr/share. So I rebuilt the ppp package using Slackware64-current sources. Ok, let's run pppsetup. It asks questions I don't know answers for and exits with failure. All I want is to have pon and poff (or Slackware alternatives). I know that they will be created upon successful pppsetup finish. How should it be done? I just want to copy my scripts and run pon to start ppp connection.
You haven't specified the type/model of your GPRS modem and I presume it's on USB. If it's one of those 3G newer dongles (Huawei makes some of them that are to be found everywhere) then the (new) kernel has some updated drivers for them and you get a wan adapter recognized:
https://github.com/torvalds/linux/bl.../usb/cdc_ncm.c

You should see something like this (maybe different manufacturer) in your dmesg:
Code:

[11694.571866] usbserial: USB Serial support registered for GSM modem (1-port)
[11694.599900] huawei_cdc_ncm 1-1.4:1.1: MAC-Address: xx:xx:xx:xx:xx:xx
[11694.621753] huawei_cdc_ncm 1-1.4:1.1: NDP will be placed at end of frame for this device.
[11694.622690] huawei_cdc_ncm 1-1.4:1.1: cdc-wdm0: USB WDM device
[11694.624359] huawei_cdc_ncm 1-1.4:1.1 wwan0: register 'huawei_cdc_ncm' at usb-3f980000.usb-1.4, Huawei CDC NCM device, xx:xx:xx:xx:xx:xx
[11694.624812] usbcore: registered new interface driver huawei_cdc_ncm
[11694.641669] option 1-1.4:1.0: GSM modem (1-port) converter detected
[11694.645459] usb 1-1.4: GSM modem (1-port) converter now attached to ttyUSB0
[11694.645829] option 1-1.4:1.2: GSM modem (1-port) converter detected
[11694.650561] usb 1-1.4: GSM modem (1-port) converter now attached to ttyUSB1
[11694.650829] option 1-1.4:1.3: GSM modem (1-port) converter detected
[11694.651937] usb 1-1.4: GSM modem (1-port) converter now attached to ttyUSB2

- notice the wwan0 interface

If this is the case, you don't even need pppd to establish the connection and instead only run some simple commands to get connected, bundle them in two short scripts - gprs-on and gprs-off

Here's how I do it on a Raspberry Pi - Slack ARM - current with a Huawei 3G USB Modem:
- gprs-on - initializing - network config - establishing connection (added some comments for clarification)
Code:

#!/bin/sh
# Init Huawei 3G Modem -I need to switch the dongle in Serial Mode
# There are 3 default operating modes this dongle knows - CD Mode / Web Mode - HiLink / Serial Mode
/usr/bin/sg_raw /dev/sr0 11 06 20 00 00 00 00 00 01 00
# establishing the connection and provisioning the APN name - my provider uses the name  internet
echo -e "AT^NDISDUP=1,1,\"internet\"\r" > /dev/ttyUSB2

# deleting the default route (Ethernet)  - I don't use DHCP for the "internal affairs"
/sbin/ip route del default via 192.168.0.1

# saving the default resolv.conf before dhclient will modify it
cp /etc/resolv.conf /etc/resolv.conf.bak

# wwan0 - getting the network configuration from the wireless operator
/sbin/dhclient wwan0

- gprs-off - disabling wwan0, restoring wired network config
Code:

#!/bin/sh
/sbin/ifconfig wwan0 down
/sbin/ip route add default via 192.168.0.1
rm /etc/resolv.conf
mv /etc/resolv.conf.bak /etc/resolv.conf

If you really need pppd for you connection, then things are getting a little bit trickier. Basically you need to establish the connection manually with the help of AT commands, dial *#99#, authenticate if required, provide APN name, etc. The creation/editing of the ppp scripts is needed and I can only guide you to follow these HowTos:
https://www.enigma14.eu/wiki/RPi_3G_...th_Huawei_E173
https://wiki.archlinux.org/index.php...dems_with_pppd

... or copy over (adapt) the ppp scripts that were generated and working with your GPRS Modem on Armbian.

As for your other points, I'm sorry I don't own any OrangePi boards & I'm unable to help.

janas03 11-02-2017 05:41 PM

Thank you @abga for your input. I should have written that I am using m590 gprs modem connected to the gpio pins (4,6,8,10). I have working scripts and the connection is established properly on preinstalled Armbian. What I want to get is to do the same on Slackware (I would not like to use anything other than Slackware).


The current status is:
1. When I try to use the modem it hangs on AT command which in turn times out. I guess there is something wrong with gpio configuration. Although WiringOP works as expected (and in the same way as on Armbian) on Slackware the only tty I don't get errors is ttyS0. However, it times out as I wrote before. On Armbian the same connection is working on ttyS1. Apart from that I can see different devices under /dev/tty* like ttyGS0, ttyGS1. I don't know whether I am missing some kernel module or there is something wrong with the board config.
2. There is a problem/bug(?) in the dtb file for OrangePi Zero in the u-boot sources. Using dtb file built from u-boot sources (2017.09) results in
Code:

MAC IRQ configuration information not found
error in dmesg. When I used dtb file from SlackwareARM-Current (sun8i-h2-plus-orangepi-zero.dtb) ethernet card is initialized properly.
3. OrangePi Zero uses XR819 chip. One can enable wifi by building the driver (which is out of the mainline tree due to its instability I guess) and downloading needed firmware blobs from https://github.com/armbian/firmware/tree/master/xr819. The reported speeds are about 20Mbits.

drmozes 11-06-2017 01:27 PM

Quote:

Originally Posted by janas03 (Post 5774803)
1. I don't really know how to setup ppp. There is no pppsetup in path but I found it somewhere in the /usr/share.

Thanks - that was a bug in the package build script; fixed in 14.2 and current.


All times are GMT -5. The time now is 08:13 PM.