share internet from pc to android

Search This thread

mvmsk

Senior Member
Jun 15, 2011
159
18
32
Vizag
reymusic.co
Same here. My MIUI Desire picks up on the network and tries to connect but keeps trying to obtain a IP address but never does. It gives up but then keeps retrying with no success. Ideas?

dude..if u r stuck-up at that point[ip adress]

first use static ip adress and then reset back to automatic mode...

then you will be able to access internet..

//fresh update


https://www.facebook.com/mhotspot
 

mvmsk

Senior Member
Jun 15, 2011
159
18
32
Vizag
reymusic.co
No go. Went static, tried to connect (didn't work of course) then went back and disabled static, back and try to connect again, but same thing.

ohww noo :(:confused:

dude...wats ur device n os version??

ps:
sry dude im lvng...i'll be bak in an hour..

but once see the wall, www.facebook.com/mhotspot..
bcoz..3,4 guys hd the same problem..and they had theirs solved..
 
  • Like
Reactions: Pitbull_Raven

adamsuail

Senior Member
Jun 6, 2007
363
95
46
No go. Went static, tried to connect (didn't work of course) then went back and disabled static, back and try to connect again, but same thing.

It actually works!!
OK, it was not straight forward, am on windows 7 so i had to save it somewhere, then go to my firewall and make an exception for it...reboot and BOOOM, it works..good find guys :D

*don't forget to setup the software first..create the network and share your connection as mentioned on the site's how to.
 

buythismobile

Senior Member
Jun 20, 2011
59
1
Want to connect Android mobile to laptop internet by USB cable

Want to connect Android mobile to laptop internet by USB cable


Hello,

Do you have any definitive reply about connecting your phone to internet through USB ?

My laptop is using a Wifi that needs USER and PASSWORD to login, and I cannot login on laptop and phone at the same time (only one user can be connected).

Thanks.
 

mvmsk

Senior Member
Jun 15, 2011
159
18
32
Vizag
reymusic.co
Want to connect Android mobile to laptop internet by USB cable


Hello,

Do you have any definitive reply about connecting your phone to internet through USB ?

My laptop is using a Wifi that needs USER and PASSWORD to login, and I cannot login on laptop and phone at the same time (only one user can be connected).

Thanks.


i got your problem.This is so simple.You can use the laptop's wifi to emulate the ip packets and receive simultaneously.

i.e Internet: --> wifi in and wifi out

procedure: you are connected to internet through wifi.[and also no other user can connect simultaneously].So use mhotspot. you can now create a wifi hotspot with the laptop's wifi.

Therefore, your phone can connect to you laptop's wifi and access internet.



check dis link for pictorial explanation http://mhotspot.com/extend-your-wifi-range.html
 
Last edited:

jax_al

New member
Jan 24, 2008
1
0
definitive solition

Since Android supports pc internet/ USB tether, I tried to configure it for reverse use.
Following is the steps to get internet on android device via usb.

On Android Device
STEP 1) Root your phone. Root using SuperoneClick
STEP 2) When you connect usb cable, choose pc internet. (For Eclair)
Or
Settings –> Wireless and network –> Tethering — USB tethering (For Froyo)

(If you are using Eclair, IP network will be 192.168.1.0/24 whereas with froyo it is 192.168.42.0/24. This may be different. You can find ip network by netcfg command on android OR by ip range of usb0 device)
STEP 3) save following commands as /sdcard/and.sh (you can save it anywhere with any filename)

ifconfig usb0 192.168.1.25 netmask 255.255.255.0
route add default gw 192.168.1.100 dev usb0
setprop net.dns1 4.2.2.2
netcfg
Following is why we used above commands.
Line 1
When you choose pc internet, android acts as dhcp server & provides ip 192.168.1.100 to computer. Whereas android itself picks 192.168.1.254.
In above script first of all we are changing default ip 192.168.1.254 to 192.168.1.25, reason being when ip is leased to a computer, 192.168.1.254 is registered as dns server. Which may make your internet inaccessible on computer. Changing it to 192.168.1.25 will make 192.168.1.254 dns server inaccessible & has no effect on internet.

Line 2
Since 192.168.1.100 is the machine we are going to get internet from, it should be set as default gateway for android device.

Line 3
This will configure 4.2.2.2 as default dns, you may use your isp dns servers.

Line 4
Will display change of ip address for usb0


STEP 4) use connectbot or any other app to access shell & change permission for script.

su
chmod 777 /sdcard/and.sh

STEP 5) run scrip using following command

su
. /sdcard/and.sh

On Computer
STEP 6) once you connect usb cable & choose pc internet on android, additional interface usb0 will be detected on Fedora / Ubuntu which will get ip 192.168.1.100 from android dhcp

STEP 7) Keep following commands in /etc/rc.local Or run whenever you connect android phone.

echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
Or
iptables -t nat -A POSTROUTING -s 192.168.1.0/24 -j MASQUERADE

Line 1 is for ip forwarding
Line 2 is to masquerade through eth0, this is internet source interface on your computer.

If you are using slitaz latest cooking version, it does not detect ip from dhcp by default.
here you can add ip for usb0 device using following command.

ifconfig usb0 192.168.1.100 netmask 255.255.255.0 up

This is all.
Now you should be able to access internet on your android phone using usb cable.

Eclair
Except for Chat & Installing application from Market I was able to sync my phone.

Froyo
Apart from Chat & Installing application from android market, Gmail is not being synced. Whereas applications like greader / k-9 mail works fine.

I have tested this only on Samsung Galaxy 3 (GT-I5801)
 

monnezzaio

New member
Oct 12, 2006
3
0
android --> USB --> PC --> internet: google APPS don't work: ANY NEWS??

android --> USB --> PC --> internet: google APPS don't work: ANY NEWS??
 

Defiant one

New member
Jan 22, 2012
3
0
Hi everyone.

Managed to share my lappy internet connection with my Defy+ (Gingerbread) last nite. My lappy connects to the net via one of those HSDPA USB stick thingy...
* I set up an adhoc network (WEP, used fixed IP address, saved it in my lappy)
* Set my main internet connection network (the HSDPA thing) to enable sharing (Just make sure you select the correct Wireless Network during enabling sharing, else it won't work).
* Set my Droid to use fixed IP (with gateway=adhoc network's IP, DNS1=adhoc network's IP, DN2=8.8.8.8)

Note: Using WPA2 on the gateway PC crashed my Droid's "Setting apps" when I try to connect to the adhoc network - No idea why, so I stuck to WEP

Everything connects! And without using any third party software.

For more elaborate description of how carry out the setting on the gateway PC - Win7/Vista or XP (in my case, the lappy with the main connection), you can refer to the following link:

http: // unlockforus.blogspot.com / 2008 / 10 / vistaxp-how-to-share-internet.html

And of course, I haven't hit my 10 posts mark yet, so the onlyway I could post the link was to space the "/". Remember to remove the space after copying "link" to your browser.

Learnt much from XDA Developers site, so I thought I'd share a bit of what worked for me here too...

Cheers! =)

PS: Oops... My description was for Wireless connection... not USB. Have not tested it out for USB yet. Only done it last nite
 
Last edited:

fash_1

New member
Feb 3, 2012
4
0
* Set my main internet connection network (the HSDPA thing) to enable sharing (Just make sure you select the correct Wireless Network during enabling sharing, else it won't work).

I dont have the option of selecting Wireless Network when I click on enable sharing. I use XP. Can you help please?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 2
    Connectify

    Use Connectify easier. :)
    These devices are known to be compatible:

    Atheros AR5xxx/AR9xxx cards, driver version 8.0.0.238
    Broadcom 4310-series (in many Dell laptops)
    Broadcom 4321AG/4322AG/43224AG WLAN Adapter, driver version 5.60.18.8 (here)
    D-link AirPlus G DWL-G510 Wireless PCI Adapter, driver version 3.0.1.0
    D-Link DWA-140 RangeBooster N USB Adapter, driver version 3.0.3.0
    Dell 1510 Wireless N adapter, Broadcom version,driver 5.60.18.8, (here)
    Intel 5100/5300, WiFi Link 1000 BGN, driver version 13.0.0.107
    Linksys Dual-Band Wireless-N USB Network Adapter(WUSB600N), driver version 3.0.10.0
    Netgear 108 Mbit WG311T
    Ralink RT2870 (in many 802.11n USB dongles)
    Realtek RTL8187B (Win7 driver ver.1178)
    Realtek RTL8187SE (with the drivers that came with Windows 7)
    Realtek RTL8192u with 1370(Beta)
    Sitecom Wireless USB Adapter 54g WL-608, with Ralink RT2870 drivers, version 3.0.9.0
    These older devices are known to be incompatible:

    Belkin F5D7050UK
    Belkin Wireless G MIMO devices (as of version 3.1.2.0)
    D-Link AirPlus G DWL-G122
    Gigabyte GA-WPKG 802.11g
    Intel 3945/4965,2200BG (most Intel cards, unfortunately)
    Mac Book Builtin Broadcom devices
    Realtek RTL8187 (like in older 802.11bg USB dongles)
    Zydas ZD1211 (also in 802.11bg USB dongles)
    2
    HERE IT IS :

    Reverse USB Tethering with Android 2.2
    (share internet from pc to android using usb)

    http://blog.mycila.com/2010/06/reverse-usb-tethering-with-android-22.html#comment-form
    1
    Did anyone find a solution for this, preferably using USB cable?
    1
    Change to Desire HD

    I just found out that "Desire HD" ROM supports internet sharing from PC to your Mobile through HTC Sync application.
    But unfortunately the "Desire" ROM does not have this option.

    Download HTC Sync and install any Desire HD build in your HD2. Connect it to your PC via USB cable, when the phone prompts for what type of connection you would like to make, select "Internet Pass-through" and your are done.

    Just to mention, the "Android Market" cannot download applications using this connection. All others should be fine.
    1
    No go. Went static, tried to connect (didn't work of course) then went back and disabled static, back and try to connect again, but same thing.

    ohww noo :(:confused:

    dude...wats ur device n os version??

    ps:
    sry dude im lvng...i'll be bak in an hour..

    but once see the wall, www.facebook.com/mhotspot..
    bcoz..3,4 guys hd the same problem..and they had theirs solved..