Ishare v1.3
Here i can present my easy Mack-Leo advanced pack called ishare. It includes iptables and a bunch of connecting and ppp scripts.
I created it to save room in my application tree and also for an easy handling.
It could work with e680i, I never tested it.
Tested with windows XP and linux debian. I think the most people have such similar configuration,scripts and tools on there phones. However i like the easy usage and to have only one small program. So i will share it with you all. Also I made a little step by step tutorial for people who never shared the internet connection.
It uses following IP's:
Code:
Linux Windows
host (PC) phone host(PC) phone
USB 192.168.1.1 192.168.1.2 169.254.142.1 169.254.142.2
BT 192.168.1.3 192.168.1.4 192.168.1.3 192.168.1.4
What you can do with it:
Internet sharing BT over PPP (Linux/Windows)
Internet sharing USB over USBLan(Linux/Windows)
Internet sharing USB over PPP(Linux)
Telnet over PPP USB (Linux)
Telnet over PPP BT (Linux/Windows)
Telnet over GPRS (no limit)
Internet sharing GPRS over PPP-USB (Linux)
Internet sharing GPRS over PPP-BT (Linux/Windows)
Internet sharing GPRS over USBLan (Linux/Windows)
It is not my whole work so thanks to:
"Mack" for his connectivity pack
"Leopardus II" for leoppp
"zyp_2000" for similar pack in asia
"Pnail" for a nice hint in his post
In this pack (zip) is included:
route_a780.bat [Windows-Batch for BT and USB routing]
routing_bt.sh [Routing script for Linux BT]
routing_usb.sh [Routing script for Linux USB-Lan]
routing_acm.sh [Routing script for Linux USB-PPP]
ishare.mpkg [Program for iptables und PPP-script on phone]
manual.txt [nearly like this thread]
Required:
Linloader/(acmattach.lin)
flexbit for USB-Lan option and to know how you activating it
Installation:
If the MackConnectivity pack is installed plz deinstall it first, because ishare will install in:
/diska/.system/QTDownLoad/mack
Ishare needs to be installed on diska and comes as a mpkg!!
Everytime when you want to share you internet you need to switch of gprs antenna !!!
Many people asked in the past what is a fake profile. It is not needed, everyone works. But to be complete:
Create a virtual GPRS "fake" connection profile at phone.
a) run the "Setup" program in phone.
b) select the "Data Network"
c) create a new connection profile named "fake"
d) set the APN: 0 and press Save to save the connection profile.
Internet sharing Linux USB-LAN
- Put the phone in USBlan mode and connect the usb cable.
- On your linux Box run as root "routing_usb.sh" script.
- Start ishare. Push Share -> USB -> Linux -> Internet -> LAN
- Now your ready
- To reset the iptables on your phone start ishare. Push Share -> Stop -> Share.
Internet sharing Linux USB-PPP
- Set your phone to modem mode and connect to your PC
- On your linux-box start ppp-deamon
Code:
pppd /dev/ttyACM0 noauth local
- Start ishare. Push Share -> Start -> USB -> Linux -> Internet -> PPP
- A message appears with "PPP_service_started" don't press OK.
- On your linux Box run as root "routing_acm.sh" script. After that press OK.
- To stop ppp on your phone start ishare. Push Share -> Stop -> Share
Internet sharing Linux BT
*Prepare*
A. On your Linux-box:
Set the local device class 0x120100 and a 4 diggets pin in "/etc/bluetooth/hcid.conf". Dont forget the pin.
B. If the driver from your bluetooth usb dongle not loaded do following:
C. If the bluetooth deamon not started yet, do it please:
Code:
/etc/init.d/bluetooth start
D. On your phone make the bluetooth visible.
E. On your linux-box scan for bluetooth and write down the mac address from the phone with:
F. You can Make the bluetooth adapter visible with this code:
Code:
hciconfig -a hci0 piscan
G. On your phone search for bluetooth device and create bond with PC. In Device Information unmark "Notify me before connecting to device".
*Connection*
1. If "dund -l" shows no connection, make a connection from your linux-box with the phone mac address:
dund -p5 -P5 -c [bt_address_from_phone] noauth local
1. If "dund -l" shows no connection, make a connection from your linux-box with the phone mac address:
Code:
dund -p5 -P5 -c [bt_address_from_phone] noauth local
2. Now you need to enter the pin on your phone and on your linux-box.
Also accept the SPP-connection on phone.
3. Start ishare. Push Share -> Start -> Bluetooth -> Internet.
4. Now activate this script (routing_bt.sh) for the iptables:
5. To reset the iptables on your phone start ishare. Push Share -> Stop -> Share.
Telnet Linux USB over ppp
- Set your phone to modem mode and connect to your PC
- On your linux-box start ppp-deamon
Code:
pppd /dev/ttyACM0 noauth local
- Start ishare. Push Share -> Start -> USB -> Windows -> PPP
- To stop ppp on your phone start ishare. Push Share -> Stop -> PPP
- telnet 192.168.1.2
- To stop ppp on your phone start ishare. Push Share -> Stop -> PPP.
Telnet Linux BT over ppp
- Make a connection
Code:
dund -p5 -P5 -c [bt_address_from_phone] noauth local
- Accept SPP-connection on phone.
- Start ishare. Push Share -> Start -> Bluetooth -> PPP
- telnet 192.168.1.4
- To stop ppp on your phone start ishare. Push Share -> Stop -> PPP.
Troubleshooting Linux:
- When you using the Phone as GPRS modem in Linux it could be that there is a peer ip in your "/etc/ppp/option" that needs to be removed.
- Use ifconfig and route -n to solve maybe your problems.
- Hardware most kernel problem
Internet sharing Windows USB_LAN
Requirement: installed and working Belcara usblan driver
*Prepare*
A. If you cant activate sharing your Internet connection with your Network interface. You need to install
a loopback adapter.
-> Start -> Settings -> Control Panel -> Add Hardware -> next
-> Select "Yes, I have already connected the hardware" -> next
-> goto the end of the list "Add a new hardware device" -> next
-> Select "Install the hardware that I manually select from a list (Advanced)" -> next
-> Select "Network adapters" -> next
-> Select "Microsoft" -> "Microsoft Loopback Adapter"
B. Set your share device
-> Start -> Settings -> Network Connections
-> Properties local lan (eth0) -> Advanced
-> Allow other network users to connect through this computer's Internet connection -> ok
C. If you had to install a loopback adapter you can delete the "Microsoft Loopback Adapter" now.
-> Start -> Settings -> Control Panel -> Hardware -> Device Manager
-> Network adapters -> Uninstall
*Connection*
1. Start ishare. Push Share -> Start -> USB -> Windows -> Internet
2. Run "route_a780.bat" script on windows.
3. To reset the iptables on your phone start ishare. Push Share -> Stop -> Share.
Internet sharing Windows BT
*Prepare*
A. Setup bluetooth binding with PC <-> phone
- enable bluetooth phone visible
- Add new bluetooth device
- select A780
- put a security code for example 1234
- connect and enter code on phone
- select service "serial port"
- configuration note down the com port
B. create "null modem"
-> Start -> Settings -> Control Panel -> Add Hardware -> next
-> Select "Yes, I have already connected the hardware" -> next
-> goto the end of the list "Add a new hardware device" -> next
-> Select "Install the hardware that I manually select from a list (Advanced)" -> next
-> Select "Modems" -> next
-> Select "Don't detect my modem; I will select it from a list -> next
-> Manufacturer "Standard Modem Types" -> "Communications cable between two computers" -> next
-> Select com port from serial BT device -> next
C. create new network connection.
-> Start -> Settings -> Network Connections
-> New Connection Wizard -> next
-> Set up an advanced connection -> next
-> Connect directly to another computer -> next
-> guest -> next
-> Name for the connection A780BT -> next
-> Select device from step b: Communication cable between two computer (COMx)
Properties from new network connection A780BT:
Options->Dialing options:deselect "Prompt for name and password..."
Networking->TCP/IP-> Properties -> Advanced-> "Default gateway for the remote network" deselect
*Connection*
1. Connect serial port and accept spp connection on phone
2. Start ishare. Push Share -> Start -> Bluetooth -> Internet. When "BT_ready_call_host" appears dont press ok run first step 3 and then press ok.
3. Use the network connection from step C.
4. Run "route_a780.bat" script on windows.
Telnet Windows BT over ppp
- connect BT serial port
- accept spp connection
- Start ishare. Push Share -> Start -> Bluetooth -> PPP. When "BT_ready_call_host" appears dont press ok run first next step and then press ok.
- run network connection A780BT from step c
- telnet 192.168.1.4
- To stop ppp on your phone start ishare. Push Share -> Stop -> PPP.
Troubleshooting Windows:
Check always with "ipconfig" and "route print" if all is ok.
On Windows XP System it could be that there is a driver problem with the normal Motorola modem driver.
How to remove:
(Maybe turn off your system restore. I never leave it on.)
- connect phone in modem mode and uninstall it with device manager after this unplug it.
- now remove motmodem.sys in C:\WINDOWS\system32\drivers and maybe it is also in C:\WINDOWS\system32\DRVSTORE
- and dont forget to rename the source folder were you unpacked the driver and installed it from there
GPRS Functions
GPRS antenna needs to be activated. If you are not sure how to configure in windows or need help for preparing
look above under the other topics for *prepare*. The following routing suggestion could be optimized and maybe needs
a change. For my network i could enter; quick hack no real solution. Otherwise it could be expensive. And check DNS server!
Code:
Howto connect to provider:
a) run the "Setup" program in phone.
b) select the "Data Network"
c) select your profile and connect
How to add route Linux:
route add <adress> dev ppp0
You could route ALL traffic through the GPRS connection:
route del default
route add default dev ppp0
Show routing table: route -n
How to add route Windows: For default gateway and gateway:
route add 0.0.0.0 mask 0.0.0.0 169.254.142.2
route add 0.0.0.0 mask 0.0.0.0 169.254.142.2 if 0x1...
destination, mask, gateway , if=interface
Show routing table: route print
Internet sharing GPRS over USB-LAN Linux
Sharing the GPRS connection with your laptop:
1. Establish a USBlan connection.
Code:
ifconfig usb0 192.168.1.1 netmask 255.255.255.0 up
2. Start ishare. Push GPRS -> Internet -> Start -> Lan
3. It will show Connect_Provider? -> Run Provider.
4. Go back to Ishare and press ok.
5. On your laptop, add a route through usb0:
Code:
ip route add default via 192.168.1.2 dev usb0
Internet sharing GPRS over ACM(ppp) Linux
Sharing the GPRS connection with your laptop:
1. connect cabel to pc in modem mode
1. Establish a ppp connection.
Code:
pppd /dev/ttyACM0 noauth local
2. Start ishare. Push GPRS -> Internet -> Start -> ACM
3. It will show Connect_Provider? -> Run Provider.
4. Go back to Ishare and press ok.
5. On your laptop, add a route ppp:
Code:
route add default dev ppp0
6. [toStop] Start ishare. Push GPRS -> Internet -> Stop -> PPP.
Internet sharing GPRS over BT(ppp) Linux
1. Establish a rfcomm connection.
dund -p5 -P5 -c [bt_address_from_phone] noauth local
2. Accept SPP-connection on phone.
3. Start ishare. Push GPRS -> Internet -> Start -> BT
3. It will show Connect_Provider? -> Run Provider.
4. Go back to Ishare and press ok.
5. On your laptop, add a route ppp:
Code:
route add default dev ppp0
6. [toStop] Start ishare. Push GPRS -> Internet -> Stop -> PPP.
Internet sharing GPRS over BT(ppp) Windows
1. Connect serial port and accept spp connection on phone.
2. Start ishare. Push GPRS -> Internet -> Start -> BT.
3. It will show "BT_ready_call_host". Use the network connection from [Internet sharing Windows BT step C]. Press Ok.
4. It will show Connect_Provider? -> Run Provider.
5. Go back to Ishare and press ok.
4. Run "route add 0.0.0.0 mask 0.0.0.0 192.168.1.3" on windows.
5. Start ishare. Push GPRS -> Internet -> Stop -> PPP.
Internet sharing GPRS over USB-LAN Windows
1. Connect USBlan
2. route delete 0.0.0.0 mask 0.0.0.0 169.254.142.253
3. route add 0.0.0.0 mask 0.0.0.0 169.254.142.2
route add 0.0.0.0 mask 0.0.0.0 169.254.142.2 if $usb0
4. Start ishare. Push GPRS -> Internet -> Start -> LAN.
5. It will show Connect_Provider? -> Run Provider.
6. Go back to Ishare and press ok.
7. [toStop] Start ishare. Push GPRS -> Internet -> Stop -> LAN.
When you didnt put some DNS to usblan you can do it by typing:
netsh interface ip set dns name="Local Area Connection X" static 62.159.208.235 (first DNS)
netsh interface ip add dns name="Local Area Connection X" 194.25.2.129 (second DNS)
Telnet over GPRS
With this you can telnet your phone over the internet. Ones you are connected no other sessions are allowed.
a) run the "Setup" program in phone.
b) select the "Data Network"
c) select your profile and connect
d) Start ishare. Push GPRS
e) you will get ip and port with this you can telnet
f) disconnect gprs profile after usage
For this its also good to set a root password.
If you wonna do this you need to edit cg33 and flash it back.
The passwords are stored in "/etc/passwd".
This is the line for root password
Code:
root::0:0:root:/root:/bin/bash
Now i used a debian system and copied the encrypted password from "/etc/shadow"
Encrypted password:
$1NGzrd.GRDChr$QsdNC32dSEgeE54FVjU
Now change the root line from "/etc/passwd" and flash back to phone.
Code:
root:$1NGzrd.GRDChr:0:0:root:/root:/bin/bash
I hope you have fun with this application and tutorial. Use at your own risk.
The attached file is realy a zip archive.