Page 1 of 1

[SOLVED - by dirty solution] porteus 4.0 x86 and my ppp0 issue (dwm-157)

Posted: 25 May 2018, 17:55
by mrtank
#####################
Update: 30/May/2018
dirty solution found
better ideas/solutions are welcome
#####################

Dear all

at the beginning of this week i've got a dwm-157 3g/hpsa stick and i'm trying hard to get the internet working.
i've googled lots of questions but i cant solve by myself.

Stick is started on 3g_connect.sh script, which is delivered with the stick.

ppp0 is up and running, as you can see:

Code: Select all

root@porteus:~# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.43.1    0.0.0.0         UG    600    0        0 wlan0
10.64.64.64     0.0.0.0         255.255.255.255 UH    0      0        0 ppp0
127.0.0.0       0.0.0.0         255.0.0.0       U     0      0        0 lo
192.168.43.0    0.0.0.0         255.255.255.0   U     600    0        0 wlan0
192.168.70.0    0.0.0.0         255.255.255.0   U     0      0        0 ap1

Code: Select all

root@porteus:~# routel  
         target            gateway          source    proto    scope    dev tbl
    10.64.64.64                       10.52.141.25   kernel     link   ppp0 
     127.0.0.0/ 8                                               link     lo 
  192.168.70.0/ 24                  192.168.70.111   kernel     link    ap1 
   10.52.141.25              local    10.52.141.25   kernel     host   ppp0 local
      127.0.0.0          broadcast       127.0.0.1   kernel     link     lo local
     127.0.0.0/ 8            local       127.0.0.1   kernel     host     lo local
      127.0.0.1              local       127.0.0.1   kernel     host     lo local
127.255.255.255          broadcast       127.0.0.1   kernel     link     lo local
   192.168.70.0          broadcast  192.168.70.111   kernel     link    ap1 local
 192.168.70.111              local  192.168.70.111   kernel     host    ap1 local
 192.168.70.255          broadcast  192.168.70.111   kernel     link    ap1 local
            ::1              local                   kernel              lo 
fe80::e6a7:a0ff:fe53:c2fe              local                   kernel             ap1 
        fe80::/ 64                                   kernel             ap1 
        ff00::/ 8 
ping -I ppp0 does nothing

Code: Select all

root@porteus:~# ping -I ppp0 google.com
ping: unknown host google.com
also a normal ping

i would be honest, i've no clue about routing.

can someone please explain what the next steps are?

cheers

porteus 4.0 x86 and my pp0 issue

Posted: 25 May 2018, 23:04
by brokenman
Olá Mr Tank.

Can you please generate a system information dump using the Porteus Settings Centre?
This will help identify the problem.

porteus 4.0 x86 and my pp0 issue

Posted: 26 May 2018, 06:04
by mrtank
Ol'a Brokenman

Sure, i can.
But first one information i've forgotten.

the funny thing is i've got it working for a short time.
i copy/paste some informations i've found by google and it was working shortly before battery was running out of power.
one or more copy/paste was the solution.
last two lines i remember.
ip addr add 192.168.0.254 dev eth0
sysctl net.ipv4.ip_forward=1
and now the dump: https://pastebin.com/CeLmaSCF

i hope that's the correct information you need.

thanks my friend.

porteus 4.0 x86 and my ppp0 issue

Posted: 27 May 2018, 17:08
by brokenman
For testing I suggest you remove all your extra modules and only boot in fresh mode with only the modules in the base folder. You have MANY quite unnecessary modules loading. Once you have booted with a fresh Porteus-v4.0 install can you check the output of this command (with dongle plugged in)

Code: Select all

ls /sys/class/net
lsusb -v
dmesg

porteus 4.0 x86 and my ppp0 issue

Posted: 27 May 2018, 18:40
by mrtank
Hi Brokenman

good idea.

but i'm already trying. :)
problem still not solved.
only two additional modules are loaded

1: module with the 3g_connect.sh script
2: firefox

ls /sys/class/net output:

Code: Select all

root@porteus:~# ls /sys/class/net
eth0@  lo@  ppp0@  wlan0@  wwan0@
lsusb -v output:

https://pastebin.com/aKfT1Rkk

dmesg output:

https://pastebin.com/YSxWKDda

route -n output:

Code: Select all

root@porteus:~# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         0.0.0.0         0.0.0.0         U     0      0        0 ppp0
10.64.64.64     0.0.0.0         255.255.255.255 UH    0      0        0 ppp0
127.0.0.0       0.0.0.0         255.0.0.0       U     0      0        0 lo
routel output:

Code: Select all

root@porteus:~# routel
         target            gateway          source    proto    scope    dev tbl
        default                                                 link   ppp0 
    10.64.64.64                       10.177.163.8   kernel     link   ppp0 
     127.0.0.0/ 8                                               link     lo 
   10.177.163.8              local    10.177.163.8   kernel     host   ppp0 local
      127.0.0.0          broadcast       127.0.0.1   kernel     link     lo local
     127.0.0.0/ 8            local       127.0.0.1   kernel     host     lo local
      127.0.0.1              local       127.0.0.1   kernel     host     lo local
127.255.255.255          broadcast       127.0.0.1   kernel     link     lo local
            ::1              local                   kernel              lo 


Many thanks for your time and support.

porteus 4.0 x86 and my ppp0 issue

Posted: 27 May 2018, 20:23
by brokenman
Could I get the contents of that 3g script please?

Added in 29 minutes 58 seconds:
Just for reference I have put a link to some files I found:

http://ftp.dlink.ru/pub/usb/DWM-157/

Instructions to install:
https://www.youtube.com/watch?v=4NU8F3g ... e=youtu.be

porteus 4.0 x86 and my ppp0 issue

Posted: 28 May 2018, 05:22
by mrtank
Sure, brokenman.

i've created a module based on the delivered *.deb, stored on original CD.
https://www.dropbox.com/s/af9tv406v0gdp ... m.xzm?dl=0

Many thanks for the links.
I will give a try.
Feedback will follow.

Cheers

mrtank

#######
feedback
#######

i wasn't able to find any linux specific files in this links.
but i did an dirty solution.

don't laught :)

i unpacked the dlink_gsm.xzm again, killed the 3g_connect.sh file, cause it starts automatically. after that i repack the rest of these files.
after a reboot i was able to use the networkmanager to set up the connection.
cause i don't know how to save the settings of networkmanager, i created a save-config by porteus.
now it works. dirty but it will help me to have an connection on my holidays.

sure, a clean solution is needed asap, but for the moment its ok.

Many thanks for your Time.
And maybe you have some good tips for me.

Cheers

mrtank

[SOLVED - by dirty solution] porteus 4.0 x86 and my ppp0 issue (dwm-157)

Posted: 30 May 2018, 16:20
by brokenman
After you set up the connection with NetworkManager you can create a module with the files in /etc/NetworkManager/system-connections

[SOLVED - by dirty solution] porteus 4.0 x86 and my ppp0 issue (dwm-157)

Posted: 31 May 2018, 15:29
by Ed_P
brokenman wrote:
30 May 2018, 16:20
you can create a module with the files in /etc/NetworkManager/system-connections
I do something similar to do this but I include files in /var/run/NetworkManager, /var/lib/dhcpcd and /etc/hosts.

[SOLVED - by dirty solution] porteus 4.0 x86 and my ppp0 issue (dwm-157)

Posted: 01 Jun 2018, 05:39
by mrtank
Thanks Brokenman and Ed_P

I will give a try.

Feedback will follow after holydays.
Do not touch a running system during holydays, or so. ;)

[SOLVED - by dirty solution] porteus 4.0 x86 and my ppp0 issue (dwm-157)

Posted: 01 Jun 2018, 21:06
by Ed_P
Something like this should work for you mrtank. :)

mkmodchanges.sh

Code: Select all

#!/bin/bash

# Save changes as a mod file 
# https://forum.porteus.org/viewtopic.php?f=81&t=5981&start=15#p46643

MOD=mychanges   # mychanges-$(date +%Y%m%d)

if [ `whoami` != "root" ]; then
   echo -e "Enter root's password"
   su -c "sh $0 $1"
   exit
fi

if [ -d /tmp/mod/ ]; then
   rm -rf /tmp/mod
fi
mkdir -p /tmp/mod

# copy modified files

#                  -- Network files --
#                  touch /var/lib/dhcpcd/dhcpd.leases
cp -a --parents    /etc/NetworkManager/system-connections/*       /tmp/mod/
cp -a --parents    /var/run/NetworkManager/*                      /tmp/mod/
cp -a --parents    /var/lib/dhcpcd/*                              /tmp/mod/
cp -a --parents    /etc/hosts                                     /tmp/mod/

du -h    /tmp/mod/
echo
echo Changed files copied. Press Enter to create module, Ctrl+C to exit.
read

echo 
dir2xzm  /tmp/mod /tmp/$MOD.xzm   &&   rm -rf /tmp/mod

echo 
ls -sh   /tmp/*.xzm

echo
echo Copy /tmp/$MOD.xzm to your /modules folder, Ctrl+C to exit.

read

rm      /tmp/$MOD.xzm
echo Finished!
read

[SOLVED - by dirty solution] porteus 4.0 x86 and my ppp0 issue (dwm-157)

Posted: 04 Jun 2018, 09:45
by mrtank
First i have to say; YOU GUYS ARE WONDERFUL!

And if i change the script from

Code: Select all

if [ -d /tmp/mod/ ]; then
   rm -rf /tmp/mod
fi
to

Code: Select all

if [ ! -e /tmp/mod/ ]; then
   mkdir /tmp/mod
fi
everything is working now.

Many Thanks!

[SOLVED - by dirty solution] porteus 4.0 x86 and my ppp0 issue (dwm-157)

Posted: 04 Jun 2018, 13:27
by Ed_P
:oops: Sorry. But glad you figured it out. :)

Normally the line:

Code: Select all

mkdir -p /tmp/mod
is after my code to delete an old one. In my cutting and pasteing I missed it. :sorry: