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

Technical issues/questions of an intermediate or advanced nature.
Post Reply
User avatar
mrtank
White ninja
White ninja
Posts: 8
Joined: 25 May 2018, 16:50
Distribution: Porteus 4.0

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

Post#1 by mrtank » 25 May 2018, 17:55

#####################
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
Last edited by mrtank on 30 May 2018, 15:37, edited 2 times in total.

User avatar
brokenman
Site Admin
Site Admin
Posts: 5867
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v3.2rcX all desktops
Location: Brazil
Contact:

porteus 4.0 x86 and my pp0 issue

Post#2 by brokenman » 25 May 2018, 23:04

Olá Mr Tank.

Can you please generate a system information dump using the Porteus Settings Centre?
This will help identify the problem.
How do i become super user?
Wear your underpants on the outside and put on a cape.

User avatar
mrtank
White ninja
White ninja
Posts: 8
Joined: 25 May 2018, 16:50
Distribution: Porteus 4.0

porteus 4.0 x86 and my pp0 issue

Post#3 by mrtank » 26 May 2018, 06:04

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.
i try to do my best

User avatar
brokenman
Site Admin
Site Admin
Posts: 5867
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v3.2rcX all desktops
Location: Brazil
Contact:

porteus 4.0 x86 and my ppp0 issue

Post#4 by brokenman » 27 May 2018, 17:08

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
How do i become super user?
Wear your underpants on the outside and put on a cape.

User avatar
mrtank
White ninja
White ninja
Posts: 8
Joined: 25 May 2018, 16:50
Distribution: Porteus 4.0

porteus 4.0 x86 and my ppp0 issue

Post#5 by mrtank » 27 May 2018, 18:40

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.
i try to do my best

User avatar
brokenman
Site Admin
Site Admin
Posts: 5867
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v3.2rcX all desktops
Location: Brazil
Contact:

porteus 4.0 x86 and my ppp0 issue

Post#6 by brokenman » 27 May 2018, 20:23

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
How do i become super user?
Wear your underpants on the outside and put on a cape.

User avatar
mrtank
White ninja
White ninja
Posts: 8
Joined: 25 May 2018, 16:50
Distribution: Porteus 4.0

porteus 4.0 x86 and my ppp0 issue

Post#7 by mrtank » 28 May 2018, 05:22

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
i try to do my best

User avatar
brokenman
Site Admin
Site Admin
Posts: 5867
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v3.2rcX all desktops
Location: Brazil
Contact:

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

Post#8 by brokenman » 30 May 2018, 16:20

After you set up the connection with NetworkManager you can create a module with the files in /etc/NetworkManager/system-connections
How do i become super user?
Wear your underpants on the outside and put on a cape.

User avatar
Ed_P
Contributor
Contributor
Posts: 3955
Joined: 06 Feb 2013, 22:12
Distribution: 4.0 Cinnamon 64-bit ISO
Location: Western NY, USA

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

Post#9 by Ed_P » 31 May 2018, 15:29

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.
Ed

User avatar
mrtank
White ninja
White ninja
Posts: 8
Joined: 25 May 2018, 16:50
Distribution: Porteus 4.0

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

Post#10 by mrtank » 01 Jun 2018, 05:39

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. ;)
i try to do my best

User avatar
Ed_P
Contributor
Contributor
Posts: 3955
Joined: 06 Feb 2013, 22:12
Distribution: 4.0 Cinnamon 64-bit ISO
Location: Western NY, USA

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

Post#11 by Ed_P » 01 Jun 2018, 21:06

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
Last edited by Ed_P on 04 Jun 2018, 13:30, edited 1 time in total.
Reason: Added the lost line.
Ed

User avatar
mrtank
White ninja
White ninja
Posts: 8
Joined: 25 May 2018, 16:50
Distribution: Porteus 4.0

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

Post#12 by mrtank » 04 Jun 2018, 09:45

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!
i try to do my best

User avatar
Ed_P
Contributor
Contributor
Posts: 3955
Joined: 06 Feb 2013, 22:12
Distribution: 4.0 Cinnamon 64-bit ISO
Location: Western NY, USA

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

Post#13 by Ed_P » 04 Jun 2018, 13:27

: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:
Ed

Post Reply