Frubee: program for Internet connection - OLD

Configuration wizards, scanners, remote desktop, etc.
Post Reply
Message
Author
tone
Posts: 28
Joined: Sun 25 Jul 2010, 22:42

Frubee: program for Internet connection - OLD

#1 Post by tone »

OLD TOPIC
THE DIRECTIONS OF THIS TOPIC ARE VALID UP TO VERSION 1.0.0
In the version 2.0.0 the management of Command-line arguments has changed.
To be more clear, I created a new topic.

FOR DIRECTIONS FROM VERSION 2.0.0, SEE THE NEW TOPIC AT http://murga-linux.com/puppy/viewtopic.php?t=100924



I designed and developed a program that connects the client to the router and assign IP address dynamically (to the client on which it's executed), without the use of the DHCP (no DHCP client, no DHCP server).
The program (via pppd) also allows connection to the Internet with USB modem sticks or mobile phone plug to the PC with USB (not tested with smartphones).
This is the URL:
https://github.com/tone77/frubee

I wrote the instructions to try it on Precise Puppy 5.7.1 (kernel 3.9.11).
If you don't want build Frubee, to install it run frubee-0.0.1.pet.
For build Frubee you must install "devx_precise_5.7.1.sfs"
(http://distro.ibiblio.org/quirky/precis ... _5.7.1.sfs)
and run from shell the script "install.sh".

Once installed, run from shell:

Code: Select all

frubee "0" "0" 0
and follow the onscreen instructions.

Light test
You can try Frubee even if the PC has already an IP address and it's connected to the router via DHCP.
Run Frubee.
To restore the original configuration restart PC (PC could have another IP address).

Full test
To avoid the risk of no longer be able to connect, before running the full test, it's advisable to check if Frubee connects to Internet with the mode aforementioned, that is not by manually editing the original configuration.
For details read below.
1. Disable DHCP server in the router
2. Disable DHCP client in Precise Puppy 5.7.1: run "mv /usr/sbin/dhcpcd /usr/sbin/dhcpcd_"
3. Restart PC
4. Run Frubee
5. Re-enable DHCP server in the router
6. Re-enable DHCP client in Precise Puppy 5.7.1: run "mv /usr/sbin/dhcpcd_ /usr/sbin/dhcpcd"
7. Restart PC

The package:
Attachments
frubee-0.0.1.pet
(23.44 KiB) Downloaded 304 times
Last edited by tone on Thu 10 Sep 2015, 13:14, edited 2 times in total.

tone
Posts: 28
Joined: Sun 25 Jul 2010, 22:42

#2 Post by tone »

Directions for use during the operating system boot.
1. Disable DHCP server in the router
2. Disable DHCP client in Precise Puppy 5.7.1: run "mv /usr/sbin/dhcpcd /usr/sbin/dhcpcd_"
3. In the file "/etc/rc.d/rc.local" insert:

Code: Select all

   frubee "0" "0" 1 > /dev/console
or
If you want to connect automatically, pass the correct "Nation" and "Operator":

Code: Select all

   frubee "Nation" "Operator" 1 > /dev/console
To assign a value to the parameters "Nation" and "Operator" read https://github.com/tone77/frubee/blob/m ... -ver-0.0.1.
In this URL you can also read the directions to add a mobile phone operator, a router or custom router of an ISP.
4. Restart PC

If frubee doesn't connects to Internet, read the file "/tmp/NOCONNECT.err" to see the error.

Restore the original configuration
1. Comment in the file "/etc/rc.d/rc.local" the command for run frubee
2. Re-enable DHCP server in the router
3. Re-enable DHCP client in Precise Puppy 5.7.1: run "mv /usr/sbin/dhcpcd_ /usr/sbin/dhcpcd"
4. Restart PC
Last edited by tone on Wed 24 Jun 2015, 12:41, edited 2 times in total.

tone
Posts: 28
Joined: Sun 25 Jul 2010, 22:42

#3 Post by tone »

Attachments
frubee-0.2.1-precise571.pet
(23.53 KiB) Downloaded 298 times

tone
Posts: 28
Joined: Sun 25 Jul 2010, 22:42

#4 Post by tone »

I released version 0.3.0 of Frubee

Has been added the possibility to set the range of the IP addresses to be assigned with Frubee.
The change allows to reserve some IP addresses to be assigned exclusively to Frubee that in this way can coexist peacefully with DHCP on the same router.

Examples
Router 192.168.1.1
DHCP - Start IP address 192.168.1.2
DHCP - End IP address 192.168.1.199
Frubee - Start IP address 192.168.1.200
Frubee - End IP address 192.168.1.254

Code: Select all

frubee "0" "0" 200 254 0
or
Router 192.168.1.1
Frubee - Start IP address 192.168.1.2
Frubee - End IP address 192.168.1.49
DHCP - Start IP address 192.168.1.50
DHCP - End IP address 192.168.1.254

Code: Select all

frubee "0" "0" 2 49 0
For details and changes made in the source code, read https://github.com/tone77/frubee/commit ... 3f36b8f926

pet for Precise Puppy 5.7.1
Attachments
frubee-0.3.0-precise571.pet
(23.89 KiB) Downloaded 253 times

tone
Posts: 28
Joined: Sun 25 Jul 2010, 22:42

#5 Post by tone »

I released version 1.0.0 of Frubee
Has been added the possibility to connect multiple 3G USB modem (multiple pppd).
For details and changes made in the source code, read https://github.com/tone77/frubee/commit ... 14ed64e9b5

To manage the multiple connection I also created the scripts:
frubee_dm (frubee detect modem). This script creates the list of device to pass to frubee for the connection of multiple 3G USB modem: detects only USB modem sticks, not detects mobile phone
frubee_tc (frubee test connection). This script shows connection status of ppp0, ppp1, ppp2, ppp3, ppp4


To explain the operating directions, I write an example. I tried with two modems, but Frubee can connect more.

STEP 0
In order to have a correct detection of modems, restart your PC.

STEP 1
Run in the shell

Code: Select all

 
frubee_tc [URL on which run the ping test] [Interval of seconds between a control and the other]
it appears:

Code: Select all

 
Bytes received in connection ppp0: NOT CONNECTED
Bytes received in connection ppp1: NOT CONNECTED
Bytes received in connection ppp2: NOT CONNECTED
Bytes received in connection ppp3: NOT CONNECTED
Bytes received in connection ppp4: NOT CONNECTED
        TO STOP THE SCRIPT PRESS CTRL+C
------------------------------------------------
If unplug and plug the modem, "frubee_dm" doesn't work correctly: in this case you have to restart the PC.


STEP 2
Plug the first 3G USB modem (I have "Huawei E1820") and run frubee_dm in the shell
It appears:

Code: Select all

-------------------------------------------------
Parameter to be passed to frubee for the modem 1:
ttyUSB0
if not working, try:
ttyUSB1
if not working, try:
ttyUSB2

STEP 3
Plug the second 3G USB modem (I have "Huawei E220") and run frubee_dm in the shell
It appears:

Code: Select all

-------------------------------------------------
Parameter to be passed to frubee for the modem 1:
ttyUSB0
if not working, try:
ttyUSB1
if not working, try:
ttyUSB2
-------------------------------------------------
Parameter to be passed to frubee for the modem 2:
ttyUSB3
if not working, try:
ttyUSB4

STEP 4
To connect the modem 1, run

Code: Select all

frubee "0" "0" 0 0 "ttyUSB0" 0
situation in frubee_tc once connected the modem 1

Code: Select all

Bytes received in connection ppp0: 102
Bytes received in connection ppp1: NOT CONNECTED
Bytes received in connection ppp2: NOT CONNECTED
Bytes received in connection ppp3: NOT CONNECTED
Bytes received in connection ppp4: NOT CONNECTED
        TO STOP THE SCRIPT PRESS CTRL+C
------------------------------------------------
Bytes received in connection ppp0: 432
Bytes received in connection ppp1: NOT CONNECTED
Bytes received in connection ppp2: NOT CONNECTED
Bytes received in connection ppp3: NOT CONNECTED
Bytes received in connection ppp4: NOT CONNECTED
        TO STOP THE SCRIPT PRESS CTRL+C
------------------------------------------------

STEP 5
Once connected the modem 1, to connect the modem 2, run

Code: Select all

frubee "0" "0" 0 0 "ttyUSB3" 0	
situation in frubee_tc once connected the modem 1 and modem 2

Code: Select all

Bytes received in connection ppp0: 4810
Bytes received in connection ppp1: 158
Bytes received in connection ppp2: NOT CONNECTED
Bytes received in connection ppp3: NOT CONNECTED
Bytes received in connection ppp4: NOT CONNECTED
        TO STOP THE SCRIPT PRESS CTRL+C
------------------------------------------------
Bytes received in connection ppp0: 4810
Bytes received in connection ppp1: 242
Bytes received in connection ppp2: NOT CONNECTED
Bytes received in connection ppp3: NOT CONNECTED
Bytes received in connection ppp4: NOT CONNECTED
        TO STOP THE SCRIPT PRESS CTRL+C
------------------------------------------------

If, however, there is something not clear, ask as well, I'm at your disposal.


my desktop with the shell: desktop.png
pet for Precise Puppy 5.7.1: frubee-1.0.0-precise571.pet
Attachments
desktop.png
(174.92 KiB) Downloaded 360 times
frubee-1.0.0-precise571.pet
(27.26 KiB) Downloaded 260 times

tone
Posts: 28
Joined: Sun 25 Jul 2010, 22:42

#6 Post by tone »

I created the package of Frubee 1.0.0 for Slacko 5.7.0
The operating directions are the same as those of Precise Puppy 5.7.1
Attachments
frubee-1.0.0-slacko570.pet
(25.34 KiB) Downloaded 251 times

Post Reply