Tiny Core Linux

Tiny Core Extensions => TCE Q&A Forum => Topic started by: Guy on December 03, 2011, 07:48:56 PM

Title: Mobile Broadband
Post by: Guy on December 03, 2011, 07:48:56 PM
I am planning to move to mobile broadband. I have it working with Linux Mint. I would like to get it working with Tinycore. I have not been successful yet.

I also think mobile broadband should be made easy for all Tinycore users who want it.

When it is easy to use, it should be included in the multicore iso.


As I said, I don't have it working, but I am guessing network-manager-gnome may be app to use. Is this correct?

However, I have not been able to get network-manager-gnome working.


Anyone who has mobile broadband working, please share what you did. (I have read the pages in this forum, without success).


People wanting to test mobile broadband, you can probably buy prepaid mobile broadband usb drives quite inexpensively, in most places.
Title: Re: Mobile Broadband
Post by: gerald_clark on December 04, 2011, 12:33:14 AM
I don't think you are going to see Gnome included in multicore.
Multicore is just a tool set to get tc/mc installed.  Anything other
than the default window manager will have to be loaded later.
Title: Re: Mobile Broadband
Post by: Guy on December 04, 2011, 02:36:42 AM
I don't expect Gnome to be included in multicore, just an easy way to connect mobile broadband.

I think a large proportion of internet users, use mobile broadband.

At this stage, very few of them use Tinycore.
Title: Re: Mobile Broadband
Post by: curaga on December 04, 2011, 03:33:57 AM
The only "easy" tools for mobile sticks are AFAIK network manager gnome, and vodafone mobile connect. I think both require big parts of gnome, and vodafone's tool needs python and friends too.

Perhaps someone has put together something lighter using the collected 3g provider data, I don't know.
Title: Re: Mobile Broadband
Post by: Guy on December 04, 2011, 04:06:00 AM
I get the impression that network-manager-gnome should run without the Gnome desktop. Is this correct?

It is not working for me.
Title: Re: Mobile Broadband
Post by: Guy on December 04, 2011, 04:14:46 AM
Following the info file for network-manager-gnome

If I run

/usr/local/etc/init.d/dbus restart

I get

no /usr/local/bin/dbus-daemon found; none killed
rm: can't remove '/var/run/dbus/pid': no such file or directory
mkdir: can't create '/var/run/dbus': Permission denied


Then when I run

/usr/local/etc/init.d/NetworkManager start

There are more errors.


There may be dependencies missing from network-manager-gnome.


What can be done to get it working?
Title: Re: Mobile Broadband
Post by: Juanito on December 04, 2011, 05:10:57 AM
no /usr/local/bin/dbus-daemon found; none killed
rm: can't remove '/var/run/dbus/pid': no such file or directory
This normal for the first time the dbus daemon is (re)started

Quote
mkdir: can't create '/var/run/dbus': Permission denied
This is because you need to run the command as root or preface it with "sudo"
Title: Re: Mobile Broadband
Post by: Guy on December 04, 2011, 05:44:21 AM
It does not work

When running /usr/local/etc/init.d/NetworkManager start

I get

/usr/local/sbin/NetworkManager: error while loading shared libraries: libgudev-1.0.so.0: cannot open shared object file: No such file or directory
Title: Re: Mobile Broadband
Post by: netnomad on December 04, 2011, 05:45:45 AM
hi friends

there is a way to connect very easy:
i edited a bunch of config-files that i load with an own meta.tcz
/etc/ppp/*
/etc/resolv.conf
then i load some binaries that i collected, some parts of pppd and usb-modeswitch.
and use three scripts:

pin
#!/bin/bash
sudo echo 'at+cpin="mypin"'>/dev/ttyUSB0

pon
#!/bin/bash
sudo rm -fR /etc/resolv.conf &
sudo ifconfig $(awk -F: '/eth0:|tr.:/{print $1}' /proc/net/dev 2>/dev/null) down
sudo ifconfig $(awk -F: '/eth1:|tr.:/{print $1}' /proc/net/dev 2>/dev/null) down
sudo ifconfig $(awk -F: '/eth.:|tr.:/{print $1}' /proc/net/dev 2>/dev/null) down
sudo pppd -detach connect "chat -v -s -f /etc/ppp/pppscript" &

poff
#!/bin/sh
sudo /usr/local/bin/ppp-off
sleep 1
sudo udhcpc

with these scripts i pass my pin to my umts-modem.
afterwards pon puts my active network-devices down, removes the odd, not fitting resolv.conf and then starts the umts-connection.
poff ends this mobile-connection, and establishes the local-connection with the help of udhcpc.

quick & dirty, but it works very stable.
every hint is welcome to enhance this script or to make this procedure more elegant.
Title: Re: Mobile Broadband
Post by: Juanito on December 04, 2011, 06:33:16 AM
error while loading shared libraries: libgudev-1.0.so.0: cannot open shared object file

This is because the udev-lib extension is missing - did you download and load network-manager using the appsbrowser (this would have taken care of downloading/loading udev-lib automatically)?
Title: Re: Mobile Broadband
Post by: Guy on December 04, 2011, 06:45:22 AM
Quote
This is because the udev-lib extension is missing - did you download and load network-manager using the appsbrowser (this would have taken care of downloading/loading udev-lib automatically)?

Yes I did install using the appbrowser.

I am checking updates, but I don't think they are a problem.

Do you, or anyone else, get network-manager-gnome working?
Title: Re: Mobile Broadband
Post by: Juanito on December 04, 2011, 06:54:02 AM
I think gudev-lib was a separate extension until recently (I may be wrong), so it could be your version of udev-lib needs updating if it is installed?

Edit: ..and no, I never tried network-manager-gnome
Title: Re: Mobile Broadband
Post by: Guy on December 04, 2011, 06:57:25 AM
There is a possibility that it does not work, and nobody is using it, so it is not discussed.
Title: Re: Mobile Broadband
Post by: Juanito on December 04, 2011, 07:00:18 AM
Maybe - but for sure it won't work without eliminating the missing library message by loading the latest udev-lib  :)
Title: Re: Mobile Broadband
Post by: Guy on December 04, 2011, 07:01:45 AM
netnomad

I would need to know exactly what you did to be able to reproduce it, such as what other files you include.

I also don't need to disconnect another network, just connect the mobile broadband.
Title: Re: Mobile Broadband
Post by: Guy on December 04, 2011, 07:29:59 AM
I have now got it started.

I added libxcb.tcz to OnBoot.

This probably needs to be included as a dependency. (I have not checked the dep file)


Now to see if I can get connected to the internet.
Title: Re: Mobile Broadband
Post by: Guy on December 04, 2011, 08:32:36 AM
After adding libxcb.tcz to OnBoot, I got the graphical interface - the same as in Linux Mint, and I can set it up the same.

However, I previously explored the files and directories where the settings are saved (in /etc), and these are not being created in Tinycore. So the graphical interface appears to work correctly, but the settings are not saved (unless they are in a different place). There seems to be something fundamental missing.

It would be good to get this working, so we can have an easy method for users to connect to mobile broadband.

I think, in the future, more people will use mobile broadband than other types of internet connections.
Title: Re: Mobile Broadband
Post by: Rich on December 04, 2011, 08:40:47 AM
Hi Guy
/usr/local/etc is one possibility.
Title: Re: Mobile Broadband
Post by: Guy on December 04, 2011, 09:10:34 AM
There is something in /usr/local/etc, but it looks like blank files before the settings are put in.

Some things are also saved in the home directory.
Title: Re: Mobile Broadband
Post by: Rich on December 04, 2011, 09:19:52 AM
Hi Guy
If you want to find which files are being changed:
Open a terminal and type
touch Now
Then change some settings.
At the terminal enter
sudo find / -newer Now
That should list any files that were modified since you executed the touch command and hopefully
provide enough clues of which files/directories to add to your backup.
Title: Re: Mobile Broadband
Post by: netnomad on December 04, 2011, 09:26:29 AM
hi guy,

my files in
/etc/ppp
total 4
-rw-------    1 tc       staff           78 Mar 12  2011 chap-secrets
-rwxr--r--    1 tc       staff          458 Oct 21 21:04 ip-down
-rwxr--r--    1 tc       staff          405 Oct 21 21:04 ip-up
-rw-r--r--    1 tc       staff          152 Apr  7  2011 options
-rw-r--r--    1 tc       staff          219 Apr  7  2011 options.demand
-rw-------    1 tc       staff           77 Mar 12  2011 pap-secrets
-rw-r--r--    1 tc       staff          212 Apr  7  2011 pppscript



my  pppscript:

TIMEOUT 10
ABORT "ERROR"
ABORT "BUSY"
ABORT "NO CARRIER"
ABORT "NO DIALTONE"
"" "ATZ"
OK "ATE1V1&D2&C1S0=0+IFC=2,2"
#OK "ATE1V1&D2&C1S0=0"
OK "ATE1"
TIMEOUT 60
OK AT+CGDCONT=1,"myprovider","apn_of_myprovider"
OK ATD*99***1#
CONNECT



my options:

lock
defaultroute
noipdefault
usepeerdns
modem
/dev/ttyUSB0
460800
nocrtscts
ipxcp-accept-local
ipxcp-accept-remote
debug
passive
asyncmap 0
name "user"



my options.demand:

lock
defaultroute
noipdefault
usepeerdns
modem
/dev/ttyUSB0
460800
nocrtscts
debug
passive
asyncmap 0
name "user"
ipcp-accept-local
ipcp-accept-remote
#0.0.0.0:10.10.10.10
#demand
connect "chat -v -f /etc/ppp/pppscript"



these are all my files in my meta-package for /usr/local

/usr/local$ ls -lR
.:
total 0
drwxr-xr-x    2 tc       staff           79 Nov  9 16:29 bin/
drwxr-xr-x    3 tc       staff           27 Oct 22 00:35 include/
drwxr-xr-x    3 tc       staff           27 Oct 22 00:35 lib/
drwxr-xr-x    2 tc       staff           93 Oct 22 00:35 sbin/
drwxr-sr-x    3 tc       staff           30 Nov  6 14:10 share/
drwxrwxr-x    2 tc       staff           30 Nov  6 23:22 tce.installed/

./bin:
total 5
-rwxr--r--    1 tc       staff           76 Apr  7  2011 connect
-rwxr--r--    1 tc       staff           54 Oct 21 22:53 pin
-rwx------    1 tc       staff          289 Nov  9 12:07 poff
-rwxr--r--    1 tc       staff          743 Nov  9 16:29 pon
-rwsr-xr-x    1 tc       staff         1859 Jan  1  1970 ppp-off

./include:
total 0
drwxr-xr-x    2 tc       staff          315 Oct 22 00:35 pppd/

./include/pppd:
total 97
-rw-r--r--    1 tc       staff         2098 Jan  1  1970 ccp.h
-rw-r--r--    1 tc       staff         4412 Jan  1  1970 chap-new.h
-rw-r--r--    1 tc       staff         3928 Jan  1  1970 chap_ms.h
-rw-r--r--    1 tc       staff         5218 Jan  1  1970 eap.h
-rw-r--r--    1 tc       staff         1711 Jan  1  1970 ecp.h
-rw-r--r--    1 tc       staff         6137 Jan  1  1970 fsm.h
-rw-r--r--    1 tc       staff         4028 Jan  1  1970 ipcp.h
-rw-r--r--    1 tc       staff         3581 Jan  1  1970 ipxcp.h
-rw-r--r--    1 tc       staff         5611 Jan  1  1970 lcp.h
-rw-r--r--    1 tc       staff         2118 Jan  1  1970 magic.h
-rw-r--r--    1 tc       staff         2167 Jan  1  1970 md4.h
-rw-r--r--    1 tc       staff         3120 Jan  1  1970 md5.h
-rw-r--r--    1 tc       staff          119 Jan  1  1970 patchlevel.h
-rw-r--r--    1 tc       staff         1813 Jan  1  1970 pathnames.h
-rw-r--r--    1 tc       staff         1657 Jan  1  1970 pppcrypt.h
-rw-r--r--    1 tc       staff        35083 Jan  1  1970 pppd.h
-rw-r--r--    1 tc       staff          653 Jan  1  1970 sha1.h
-rw-r--r--    1 tc       staff         1490 Jan  1  1970 spinlock.h
-rw-r--r--    1 tc       staff         5489 Jan  1  1970 tdb.h
-rw-r--r--    1 tc       staff         3875 Jan  1  1970 upap.h

./lib:
total 0
drwxr-xr-x    3 tc       staff           28 Oct 22 00:35 pppd/

./lib/pppd:
total 0
drwxr-xr-x    2 tc       staff          148 Oct 22 00:35 2.4.4/

./lib/pppd/2.4.4:
total 92
-rwxr-xr-x    1 tc       staff         4857 Jan  1  1970 minconn.so
-rwxr-xr-x    1 tc       staff         7284 Jan  1  1970 passprompt.so
-rwxr-xr-x    1 tc       staff         5627 Jan  1  1970 passwordfd.so
-rwxr-xr-x    1 tc       staff         4340 Jan  1  1970 radattr.so
-rwxr-xr-x    1 tc       staff        45996 Jan  1  1970 radius.so
-rwxr-xr-x    1 tc       staff         9884 Jan  1  1970 radrealms.so
-rwxr-xr-x    1 tc       staff        14402 Jan  1  1970 winbind.so

./sbin:
total 325
-rwxr-xr-x    1 tc       staff        19044 Jan  1  1970 chat
-r-xr-xr-x    1 tc       staff       239868 Jan  1  1970 pppd
-rwxr-xr-x    1 tc       staff        43768 Jan  1  1970 pppdump
-r-xr-xr-x    1 tc       staff        18252 Jan  1  1970 pppoe-discovery
-rwxr-xr-x    1 tc       staff         9964 Jan  1  1970 pppstats
Title: Re: Mobile Broadband
Post by: Guy on December 04, 2011, 09:53:53 AM
Thanks all

Rich - it seems like the settings are not actually being saved, but will investigate more later. I will be working long hours this week. I may or may not have time before next weekend.

Just to clarify - the settings in home are being saved. It seems the settings in (/etc or) /usr/local/etc are not being saved.

There may be some other app or dependency which needs to be run to make this work.


netnomad - I hope to look into this when I have time.


Anyone with more ideas, please share them.
Title: Re: Mobile Broadband
Post by: Arslan S. on December 04, 2011, 10:25:21 AM
you should be able to start NetworkManager from base but for nm-applet (network-manager-gnome) you need at least a panel, you can setup lxde or xfce

just make sure NetworkManager daemon is running and execute nm-applet as root, then an icon should apper in your panel

also you may need mobile-broadband-provider-info extension
Title: Re: Mobile Broadband
Post by: Guy on December 07, 2011, 06:07:25 AM
I am now running with xfce.

I can start the "Network Connections" graphical interface from the terminal, using "nm-connection-editor". It does not appear in the menu, or as an icon.

The graphical interface works correctly, and saves settings in /home.

However, nothing is saved in (/etc or) /usr/local/etc, the same as before using xfce. So it is not possible to get a connection.

Is there anyone who has this working. If so what did you do?

I suspect there are one or more dependencies missing. Any help in getting this to work would be appreciated, and beneficial for other Tinycore users with mobile broadband.
Title: Re: Mobile Broadband
Post by: Arslan S. on December 07, 2011, 11:24:55 AM
did you install ModemManager and mobile-broadband-provider-info ?

assuming NetworkManager daemon is running when you run nm-applet as root an icon should appear in your panel and you should be able to manage network connections
Title: Re: Mobile Broadband
Post by: Guy on December 08, 2011, 06:57:31 AM
Yes, I installed ModemManager and mobile-broadband-provider-info.

I don't get an icon.

In xfce I can only start it with the terminal.

In Tinycore without xfce, I can start it from the menu.


Have you had this running correctly and used it to connect mobile broadband?


It seems the front end is running correctly, but something else is missing. It probably needs more dependencies. But which ones?
Title: Re: Mobile Broadband
Post by: Arslan S. on December 08, 2011, 11:13:01 AM
no i have never connected to a mobile broadband before

do you see your device in the nm-applet's menu when you connect it to your computer ?

if not that may be because of udev rules (see modemmanager files list)

to monitor udev events
Code: [Select]
udevadm monitor
Title: Re: Mobile Broadband
Post by: Guy on December 09, 2011, 05:36:50 AM
When I connect to mobile broadband in Linux Mint, I have Network Connections, which I think is the same as network-manager-gnome, set up, and when I turn on the computer, it automatically connects to the internet.

-------

Back to Tinycore.

If I open the terminal, and type

udevadm monitor

then connect the modem, I get many lines. The first line is

KERNEL [83.924960] add     /devices/pci0000:00/0000:00:03.3/usb1/1-1 (usb)

There are many other similar lines.

---------

To start Network Connections with xfce, I open the terminal and type

nm-connection-editor

I get 4 paragraphs. This starts

** (nm-connection-editor:4727): WARNING **: nm_connection_list_new: failed to load VPN plugins: Couldn't read VPN .name files directory /usr/local/etc/NetworkManager/VPN.

** (nm-connection-editor:4727): WARNING **: get_all_cb: couldn't retrieve system settings properties: (2) The name org.freedesktop.NetworkManagerSystemSettings was not provided by any .service files.

and files such as /usr/local/etc/NetworkManager/VPN don't exist.

I hope this provides some clues.
Title: Re: Mobile Broadband
Post by: Guy on December 09, 2011, 06:41:07 AM
Arslan S

I don't know where you live, how busy you are, or anything else about your situation, but

are you in a situation where you could purchase a prepaid mobile broadband modem and use it to get this working. You can often get prepaid modems with one month worth of data quite inexpensively. I don't want you to feel pressured, but if you can it would be greatly appreciated. It would be a big benefit for many people using Tinycore.


Anyone else

Is there anyone else who could purchase a prepaid mobile broadband modem and use it to get this working. Many Tinycore users would appreciate someone doing this.

If more than one person contributes, and you help each other, that would be great.
Title: Re: Mobile Broadband
Post by: Arslan S. on December 09, 2011, 08:38:30 AM
Arslan S

I don't know where you live, how busy you are, or anything else about your situation, but

are you in a situation where you could purchase a prepaid mobile broadband modem and use it to get this working. You can often get prepaid modems with one month worth of data quite inexpensively. I don't want you to feel pressured, but if you can it would be greatly appreciated. It would be a big benefit for many people using Tinycore.


Anyone else

Is there anyone else who could purchase a prepaid mobile broadband modem and use it to get this working. Many Tinycore users would appreciate someone doing this.

If more than one person contributes, and you help each other, that would be great.

unfortunately i don't have much time left before i leave for 5-6 months due to military obligations in my country (Rep. of Turkey)

Title: Re: Mobile Broadband
Post by: netnomad on December 09, 2011, 11:07:25 AM
hi guy,

just dig in the forum and you will succeed...
in the moment umts-hardware and it's configurations are too various
to solve everything for someone else...
so dig in the forum, perhaps have a second look at my hints and you will get it.
in advance check whether other succeeded with your individual hardware...

good luck.
Title: Re: Mobile Broadband
Post by: Guy on December 09, 2011, 09:14:48 PM
I have eliminated one error message by installing NetworkManager-vpnc in OnBoot.

Still not working, but it seems this needs to be a dependency.
Title: Re: Mobile Broadband
Post by: Arslan S. on December 10, 2011, 02:23:17 AM
vpn is not related to mobile broadband
it is an optional dep for networkmanager to connect to private networks