Ishare v1.3 (12/22/2008)
Here i can present my easy Mack-Leo advanced Pack called ishare. It includes iptables for Motorola A780 with
configurated scripts to connect to Linux and Windows XP. With a MAC should also possible maybe i do it in the future.
I created it to save room in my application tree and also for a easy handling.
It could work with e680i, I never tested it.
Tested with windows XP and linux debian. 

All modem speeds are set to: 115200

It uses following IP's:

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


required:

Linloader/(acmattach.lin)
flexbit for USB-Lan option



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.



    ####################
   #                  #
  #  Share Function  #
 #                  #
####################


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 -> Start -> 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

pppd /dev/ttyACM0 noauth local

- Start ishare. Push Share -> Start -> USB -> Linux -> Internet -> PPP

- On your linux Box run as root "routing_acm.sh" script.

- 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 usb bluetooth dongle driver is not loaded do following:

modprobe hci_usb


C. If the bluetooth deamon not started yet, do it please:

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

hcitool scan

F. You can Make the bluetooth adapter visible with this code(I think its not needed, but nice to know):

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

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. It shows BT_ready_call_host Now activate this script (routing_bt.sh) for the iptables and press OK.

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

pppd /dev/ttyACM0 noauth local

- Start ishare. Push Share -> Start -> USB -> Linux -> PPP

- To stop ppp on your phone start ishare. Push Share -> Stop -> PPP

- telnet 192.168.1.2




Telnet Linux BT over ppp
#########################


- Make a connection

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


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
###########################



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




1. Connect serial port and accept spp connection on phone

2. Start ishare. Push Share -> Start -> Bluetooth -> Internet.

3. It will show "BT_ready_call_host". Use the network connection from step C and press ok. 
   Otherwise if it shows "Start_PPP_rfcomm!" ry again to connect serial port from step 1. again and press OK. 
   When this error message comes a second time the program terminates.

4. Run "route_a780.bat" script on windows.

3. To reset the iptables on your phone start ishare. Push Share -> Stop -> Share.



Telnet Windows BT over ppp
##########################


- connect BT serial port

- accept spp connection

- Start ishare. Push Share -> Start -> Bluetooth -> PPP

- 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 Function  #
 #                 #
###################

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!

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 USBLan Linux:
#######################################

Sharing the GPRS connection with your laptop:

1. Establish a USBlan connection.

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:

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.

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:

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:

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


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

root:$1NGzrd.GRDChr$QsdNC32dSEgeE54FVjU:0:0:root:/root:/bin/bash






 I hope you have fun with this application. Use at your own risk. Made and shared by Halftux for Motorolafans.com.