[Tips]Access internet via USB net: share Windows internet connection to android phone - Android General

I tested accessing internet in Android phone via USB net which connected to a Windows XP PC, pure wired, not wireless solution I Googled.
It works! However, some application does not designed to use USB net, these application only use WiFi or GPRS/EDGE/HSPA to access internet.
My environment:
Windows: XP
Phone: Huawei U8800, Android 2.3.5
Internet: Ethernet (ADSL+router infact)
For those people who don't have WiFi, can't use WiFi (care about baby's health?), don't want to use WiFi/GPRS/EDGE/HSPA (expensive?), here is the tips to let you access internet via USB net.
How to do
Your android phone must be rooted first
Install Microsoft ActiveSync on your Windows PC
Install Terminal Emulator application on your android phone from market.
Connect your phone to your Windows PC
On your phone, turn on USB tethering: Settings -> Wireless & networks -> Tethering & portable hotspot -> USB tethering
Now, look at your Windows system, there will be a new network card (Windows Mobile-based Internet Sharing Device) appears
Share your internet connection to the new network card: right click internet connection (PPPoE or Ethernet or WiFi or whatever your internet connection is) -> Property -> Advance -> Enabled internet connection sharing. (if your Windows Firewall service is not started, start it first), this will change the IP address of new network card to 192.168.0.1/255.255.255.0
Now back to your phone, open the Terminal application, type commands like the following
Code:
su
ip addr add 192.168.0.2/24 broadcast 192.168.0.255 dev usb0
route add default gw 192.168.0.1 dev usb0
setprop net.dns 192.168.1.1
setprop net.dns1 8.8.8.8
setprop net.dns2 8.8.4.4
# the DNS server should change to your favorite DNS server, 192.168.1.1 is for my environment (a router)
DONE! turn your phone WiFi off, open a browser, you can surfering now, but as I tested, some other application won't work (or work well), they don't know USB net
Compatible/Incompatible applications
I tested few applications, found some compatible and incompatible applications, I will list them here, if you found incompatible applications, please help fill these lists.
++ Compatible ++
Generally, most browser or browser-like application works with USB net.
XDA
Browser
Gmail
Google Map
News & Weather
QQ
SoSo Map
新蛋商城/Newegg Mall China
Opera Mobile Browser
-- Incompatible --
Market: can browse, but can't download application
Weather Clock: can't update weather
QQGame: can login, but can't enter room to play
Google Voice recognition applications like Voice Search
YY: can't login
Jingdong Mall/京东商城: can't login
Proxy issue
For environment which need proxy to access internet, there're very few applications support it. Currently, I only know Opera Mobile browser works in such environment, there're proxy configurations in opera:config page.

very good work >>>
perfect solution
keep working and you might find easier solution .

ELRAKAWY said:
very good work >>>
perfect solution
keep working and you might find easier solution .
Click to expand...
Click to collapse
An easier way already exists: http://forum.xda-developers.com/showthread.php?t=1371345.

Theonew said:
An easier way already exists: http://forum.xda-developers.com/showthread.php?t=1371345.
Click to expand...
Click to collapse
capslock66 really did a great and expert job both on Android and Windows.
My solutions is some kind of clean & manual one, no application is needed on Android phone, no router-like client application is needed on Windows PC, let "Windows Firewall/Internet Connection Sharing (ICS)" service do the internet sharing magic.
I shared internet between two Windows PC before (install 2 network cards on host PC), so I think it should be same when the client PC changed to an Android phone, that's how this solution came out.

Hey
lovetide said:
How to do
Your android phone must be rooted first
Install Microsoft ActiveSync on your Windows PC
Install Terminal Emulator application on your android phone from market.
Connect your phone to your Windows PC
On your phone, turn on USB tethering: Settings -> Wireless & networks -> Tethering & portable hotspot -> USB tethering
Now, look at your Windows system, there will be a new network card (Windows Mobile-based Internet Sharing Device) appears
Share your internet connection to the new network card: right click internet connection (PPPoE or Ethernet or WiFi or whatever your internet connection is) -> Property -> Advance -> Enabled internet connection sharing. (if your Windows Firewall service is not started, start it first), this will change the IP address of new network card to 192.168.0.1/255.255.255.0
Now back to your phone, open the Terminal application, type commands like the following
Code:
su
ip addr add 192.168.0.2/24 broadcast 192.168.0.255 dev usb0
route add default gw 192.168.0.1 dev usb0
setprop net.dns 192.168.1.1
setprop net.dns1 8.8.8.8
setprop net.dns2 8.8.4.4
# the DNS server should change to your favorite DNS server, 192.168.1.1 is for my environment (a router)
DONE! turn your phone WiFi off, open a browser, you can surfering now, but as I tested, some other application won't work (or work well), they don't know USB net
Click to expand...
Click to collapse
Hey
first of all, thank you so much for your article.
I really need to do this.
anyways, my questions
what's a "rooted android phone" ?
and how do I "Install Terminal Emulator application on my android phone" ?
I'm sorry but I just bought my phone and I don't know much about it
I tried to copy-paste it in my SD Memory but it didn't work
and by the way I didn't download it from Market (because GPRS is so damn expensive in here ), instead I downloaded it from developer's website (jackpal).
thanks again
I really appreciate it o7

Yea you lost me once I found out that in order for this to work I had to install
Microsoft Active Stink.
One of the things I hated about Windows Mobile was its reliance on that crappy software and I don't want it on my new PC.
Arash.Eternal said:
what's a "rooted android phone" ?
and how do I "Install Terminal Emulator application on my android phone" ?
I'm sorry but I just bought my phone and I don't know much about it
I tried to copy-paste it in my SD Memory but it didn't work
and by the way I didn't download it from Market (because GPRS is so damn expensive in here ), instead I downloaded it from developer's website (jackpal).
thanks again
I really appreciate it o7
Click to expand...
Click to collapse
Since you are noob I'll guide you. For info on rooted phones:
http://bit.ly/I3hROF
For everything else check the sticky (the first message) in this forum labeled
Android Terms,Slang & Definitions(READ THIS BEFORE POSTING QUESTIONS!)

Phrack said:
Since you are noob I'll guide you. For info on rooted phones:
For everything else check the sticky (the first message) in this forum labeled
Android Terms,Slang & Definitions(READ THIS BEFORE POSTING QUESTIONS!)
Click to expand...
Click to collapse
meh
thanks for nothin
btw, I LoLed hard at that cat in your signature

Great!
Thanks a ton mate! Keep up the good work. Waiting for Google Play to work with this

lovetide said:
Install Microsoft ActiveSync on your Windows PC
Click to expand...
Click to collapse
That page says: "Note: Microsoft ActiveSync works only with Windows XP SP2 or earlier."
So... can this work on Windows 7?

Hi, This is ashok, I am receiving an error stating "cannot find device usb0". How can i find the device name?

Question
lovetide said:
I tested accessing internet in Android phone via USB net which connected to a Windows XP PC, pure wired, not wireless solution I Googled.
It works! However, some application does not designed to use USB net, these application only use WiFi or GPRS/EDGE/HSPA to access internet.
My environment:
Windows: XP
Phone: Huawei U8800, Android 2.3.5
Internet: Ethernet (ADSL+router infact)
For those people who don't have WiFi, can't use WiFi (care about baby's health?), don't want to use WiFi/GPRS/EDGE/HSPA (expensive?), here is the tips to let you access internet via USB net.
How to do
Your android phone must be rooted first
Install Microsoft ActiveSync on your Windows PC
Install Terminal Emulator application on your android phone from market.
Connect your phone to your Windows PC
On your phone, turn on USB tethering: Settings -> Wireless & networks -> Tethering & portable hotspot -> USB tethering
Now, look at your Windows system, there will be a new network card (Windows Mobile-based Internet Sharing Device) appears
Share your internet connection to the new network card: right click internet connection (PPPoE or Ethernet or WiFi or whatever your internet connection is) -> Property -> Advance -> Enabled internet connection sharing. (if your Windows Firewall service is not started, start it first), this will change the IP address of new network card to 192.168.0.1/255.255.255.0
Now back to your phone, open the Terminal application, type commands like the following
Code:
su
ip addr add 192.168.0.2/24 broadcast 192.168.0.255 dev usb0
route add default gw 192.168.0.1 dev usb0
setprop net.dns 192.168.1.1
setprop net.dns1 8.8.8.8
setprop net.dns2 8.8.4.4
# the DNS server should change to your favorite DNS server, 192.168.1.1 is for my environment (a router)
DONE! turn your phone WiFi off, open a browser, you can surfering now, but as I tested, some other application won't work (or work well), they don't know USB net
Compatible/Incompatible applications
I tested few applications, found some compatible and incompatible applications, I will list them here, if you found incompatible applications, please help fill these lists.
++ Compatible ++
Generally, most browser or browser-like application works with USB net.
XDA
Browser
Gmail
Google Map
News & Weather
QQ
SoSo Map
新蛋商城/Newegg Mall China
Opera Mobile Browser
-- Incompatible --
Market: can browse, but can't download application
Weather Clock: can't update weather
QQGame: can login, but can't enter room to play
Google Voice recognition applications like Voice Search
YY: can't login
Jingdong Mall/京东商城: can't login
Proxy issue
For environment which need proxy to access internet, there're very few applications support it. Currently, I only know Opera Mobile browser works in such environment, there're proxy configurations in opera:config page.
Click to expand...
Click to collapse
What about if I installed one of CM10 ROMs and USB tethering is not working

USB to LAN Ethernet Adapter for Google Android Tablet
AmirNajjar said:
What about if I installed one of CM10 ROMs and USB tethering is not working
Click to expand...
Click to collapse
My Nexus 7 (2012) hat USB host function. I'm simply using an "USB to LAN Ethernet Adapter for Google Android Tablet". No Windows needed.

Lots of troubles
• The ip of my router is "192.168.0.1" and ICS were having a trouble about that.
• After I type in terminal the "ip addr bla bla bla..." it says " Object 'addr' not found. Try 'ip help' "
• I typed "ip help" then it says " 'help' not found try 'ip help' " Seriously??
• I Google "help not found on android terminal" and I cannot find any related problem like mine
The PC I am using doesn't have any WiFi so I badly needed this kind of workaround because I need internet to simulate the app I'm gonna work for. Thanks!

My phone charge only when it connect to pc
why my pc won't recognize my android device , it just doing charging and no usb thing or image in tray or menu ( i don't know the term to use) i search whole day and still i can't find answer for this, i don't have usb utility in my device, i do have usb debugging enabled/disabled, usb computer connection (MTP, PTP and as Storage ) i already restarted my device many times.
Help me with my problem so i can do this
-------------------->>>>>>>>> [Tips]Access internet via USB net: share Windows internet connection to android phone.
sorry if i do this in maybe wrong section :crying:

BoomPork said:
why my pc won't recognize my android device , it just doing charging and no usb thing or image in tray or menu ( i don't know the term to use) i search whole day and still i can't find answer for this, i don't have usb utility in my device, i do have usb debugging enabled/disabled, usb computer connection (MTP, PTP and as Storage ) i already restarted my device many times.
Help me with my problem so i can do this
-------------------->>>>>>>>> [Tips]Access internet via USB net: share Windows internet connection to android phone.
sorry if i do this in maybe wrong section :crying:
Click to expand...
Click to collapse
Have you had try downloading the necessary drivers to be able to detect it by your computer? That's one possible problem I encountered in the past.

Thanks for this. Will try this later. :victory:

Related

Internet on G1 via USB cable (Reverse Tethering)?

Would it be possible to get Internet on the device, through PC, instead of Internet on PC, through device?
Is there any way to do this its very important as I live in India, there is no 3g and edge is very slow so can't download themes, updates directly on my g1
Sure there is a way, WiFi
No you cannot give the phone internet via USB
Can you be more specific on how to do it with WiFi? And without a router
I tried using the AdHoc connection created for the Tethering (Internet from G1's 3G/EDGE to PC), but with no luck.
The laptop and phone can ping each other, I have done all the necessary steps to share my LAN and WiFi connection, remounted the /system partition as rw, edited /etc/resolv.conf (/etc is in fact on /system/etc and if not remounted as rw you cannot edit /etc/resolv.conf), added the IP of the laptop, but then I have some trouble adding default route to it. No matter what settings I try "route add ...", they change nothing...
No internet, no ping.
Did you set the gateway?
You have the SDcard that you can use to move files to the phone, I don't see any need to download directly to the sdcard, especially if you have the phone hooked up via USB anyways.
Kind of pointless no>?
@ncoop23
but then I had some trouble adding default route to it. No matter what settings I try "route add ...", they change nothing...
Click to expand...
Click to collapse
So, I have tried at least.
How do you do it without Wi-Fi, over the USB cable? I can't set up a Wi-Fi node at work or the network security guys will send a SWAT team after me.
If you have access to a computer that has internet, and you have your usb cable, why don't you just download whatever theme/update to the computer, then plug in the usb cable and transfer it to your phone?
You have a PC or laptop with access to the internet. Why not just download stuff on to the PC/Laptop and move onto SD card.
If you want it to get on the market or watch youtube to test it out etc then join the laptop/PC's connection. Simple.
There is no solution for getting internet from laptop to the phone....
I wonder that with technology improving at such a fast pace, why any developer at corporations or independently hasnt thought about it yet. Any app, gadget or software providing a solution for this problem will sell like a hot cake especially in developing countries like south asia, middle east and africa.
Brock Samson said:
If you have access to a computer that has internet, and you have your usb cable, why don't you just download whatever theme/update to the computer, then plug in the usb cable and transfer it to your phone?
Click to expand...
Click to collapse
But how do I sync my Gmail and Contacts without a Wi-Fi or data connection?
dilwaladoctor said:
There is no solution for getting internet from laptop to the phone....
Click to expand...
Click to collapse
Are you sure? There is a solution for getting internet from phone to laptop over USB, so why not from laptop to phone? This blog post claims it can be done, but I haven't ever seen it working: http://blog.mycila.com/2010/06/reverse-usb-tethering-with-android-22.html
I wonder that with technology improving at such a fast pace, why any developer at corporations or independently hasnt thought about it yet. Any app, gadget or software providing a solution for this problem will sell like a hot cake especially in developing countries like south asia, middle east and africa.
Click to expand...
Click to collapse
This isn't a matter of "technology improving". Other phones already have it. Windows Mobile has had it for years.
dilwaladoctor said:
There is no solution for getting internet from laptop to the phone....
Click to expand...
Click to collapse
You have no idea what you're talking about.
http://forum.xda-developers.com/showpost.php?p=5242264&postcount=17
I have know idea if this will work or not, but I have found this on a few different forum all posted by Diyism, so if it does work he deserves all the credit.
Code:
My android os is CyanogenMod 4.2.14.1,
1.Enable "Settings\Wireless controls\Internet tethering"
2.Install HTC Remote NDIS based Device driver([url]http://forum.xda-developers.com/attachment.php?attachmentid=277122&d=1265356413[/url])
3.Set the HTC adapter as: IP:192.168.2.1, Mask:255.255.255.0
4.Set the PC ethercard as shared connection
5.Run these codes in terminal:
su
ifconfig usb0 192.168.2.2 netmask 255.255.255.0
busybox route delete default
iptables -F
iptables -F -t nat
busybox route add default gw 192.168.2.1
setprop net.dns1 8.8.8.8
setprop "net.gprs.http-proxy" ""
6.Now your g1 could open browser to view any web pages on the internet, and update apps in the Market.
highlandsun said:
You have no idea what you're talking about.
http://forum.xda-developers.com/showpost.php?p=5242264&postcount=17
Click to expand...
Click to collapse
Those instructions are only for a Linux computer, though?
I have used the setups as Brock Samson has indicated and it works for me.
I was asking the same question one year ago and I think I've posted somewhere a similar method to Brock Samson's, so it will definitely work.
In fact it will be less hussle if you don't enable internet tethering in settings and just bring usb0 up using ifconfig. You must set a correct IP address and netmask before the port is up though. Otherwise the driver on the PC end will freak out.
Generally Android never uses /etc/resolv.conf. Only console programs originated from Linux use it. DNS server must be set through setprop and has to be set everytime network status changes (e.g. mobile data network reconnect, etc).
Some programs will also use Android API to detect network availability and will back out if neither mobile data nor Wi-Fi is connected, so make sure you don't turn both of them off.
http://forum.xda-developers.com/showthread.php?t=793102

remote desktop on WM?

So i have the HTC HD2 and want to use the remote desktop which is build in the phone. The problem is that i have no clue how to set up my pc.
Im running on windows xp home edition and using a router. I saw a tutorial for setting it up where he basically told me to open a port and it works. After doing that it didnt work and i suspect there are some things not explained in the tutorial... Can anyone help me out on this?
Will not work on XP Home.
Ah i kinda had that feeling, im trying the same thing on my laptop which is windows xp proffesional. But i still cant log in. I also enabled the "allow remote"
Have you activated "Allow remote assistance" or did you activate "Allow connections" ? The latter is the one you need. Also make sure you're in the list of allowed users.
Doing this off the top of my head, I'm using Vista and it's been a while since I've needed to go into those options in XP.
You must have a password set too, so if the computer boots up and goes straight to your desktop without you having to log in, you'll need to set a password.
To access your computer when on the same network (wifi) use the computer's IP address.
Get this by running cmd on the computer and type ipconfig (then hit return).
To access your computer via the internet (over the phone network) use the computer's external IP address.
Get this by going to whatsmyip.org
You'll also need to configure your router to forward TCP port 3389 to the computer's IP address (found via ipconfig as above).
The thing is, with most home broadband connections, your external IP address can change, so get around this problem by using dynamic DNS.
Some routers have a DDNS client built in, with a list of compatible DDNS services. Just go to one of those services' websites and sign up, often it's free. Pick an domain name to register, ie p03p.dyndns.org, and use that to connect rather than your external IP address.
Best to check you can connect via wifi first using the computer's internal IP address.
If that doesn't work, are you running a firewall?
If you don't have a 3rd party one like Symantec/Norton, then check the windows firewall - ensure the Remote Desktop exception is ticked, if it is, then disable the firewall, and also untick the network connections on the advanced tab (even though the windows firewall says it's disabled, don't expect it to know that!).
If you use a 3rd party firewall, then look into how you can add a rule for port 3389 (RDP)
One way to get around the issue of a dynamic IP address on the home PC is to use Himachi2....it's a super-simple way to create a tunnel to your home pc no matter what the ever-changing external IP address is, and they have a winmo client now too. You simply set up the host once on your home PC, and as long as you leave it running it's very easy to create the remote connection just like you're on the local network with the PC....then you just use Remote Desktop that way
I ticked both the allow options just to be sure. What i also did is go on my 2nd laptop which also has windows xp pro on it to try and connect to my 1st laptop which also didnt work.
I think the problem lies in the list of allowed user. When i get into that list i dont see anyone in it. I assume i have to add my 2nd laptop in that list in order to get this to work. I tried to look a bit arround but i dont know how to add someone to that list.

RDP Setup

I am not sure if its the right forum to ask this question, but knowing the smart ppl we have here i hope i am wrong!
I just downloaded Remote RDP Enterprise 3.2 and i am trying to setup so i can connect to my home pc. I am using a router model WGT624 netgear router. I tried the port forwarding (had to setup custom PF, because it wouldnt let me add 3389 as a port on the services which offers through the router) as it was suggested but i think i might be doing something wrong because it just wont connect at all.
my PF on my router looks something like this:
# Service Name Start Port End Port Server IP Address
1 RDP 3389 3389 192.168.X.X
And when i goto whatismyip.com i have a different IP address: 67.234.x.x
on the app on my phone which IP address do i connect through?
Anyone use the same app and has a netgear router and knows how to set it up? or any documentation on how to get this thing working and can share it would be extremely helpful, its for my work!
Thanx so much in advance
Hi iknight8. I don't have that app but I'll try and help.
You need to connect to the external IP address (67.234.x.x) when you are on the internet and the internal IP (192.168.X.X) when you are on your internal network.
A good troubleshooting step would be to try connecting to you PC on the internal address when you are connected to your wifi. This should work with any of the port forwarding you have setup so if it doesn't then then you know it is a proble with the setting on the pc itself. Remote desktop has to be enabled in the computer settings and allowed on any firewalls you are using.
i tried connecting both but i get a Socket is not connected message!
if u can use it and let me know of the setting to make it work would be nice
Thanx again
p.s. wen i am on internal wifi network, same as pc and i put that PF ip addess, i get a mesage "no route to host"...
Do you have allowed RDP connection on PC?
I downloaded the app and the first time I tried it on my wifi I got the same error as you, no route to host. The problem was that I didn't enable remote desktop on my PC. Once I set it to allow connections from computers running any version of remote desktop it worked straight away.
This is what I did.
1. In the app, press the menu button and add.
2. I put in the IP address of my pc and port 3389.
3. On my PC I disabled the windows firewall.
4. Also on my PC (I'm using windows 7), I enabled remote desktop by going to start, right click computer, click properties, click remote settings and check the allow connections from computers running any version of resmote desktop radio button.
5. finally I connected my phone to my wifi and tapped on the connection I created in the app. It gave me my logon screen.
If you can get this working hopefully your port forwarding settings are corect and that will work too. Hope this helps.

How do I connect an Android phone via proxy to use hostfiles on PC?

Hi Guys
I need to connect android(and ios) phones to my pc via proxy so that they use the host files on my PC.
I have to test some website features on mobile browsers/apps. I use different host-files in my pc to hit different servers.(Eg, local vm, staging, production). I want to use my Android (and ios) devices to connect to my pc and use those hostfiles to hit the different servers.
For example, if My hostfile onmy pc is pointing to staging servers, then i want the phone to point to that also. Also I have a vpn on my pc which needs to be connected for me to access staging.
What is the best way for me to do this? Any help is greatly welcome!
Note:
I tried using freeproxy to do this but it's not working as expected.
The steps I tried making freeproxy work.
Code:
1 Used ipconfig to find my pc ip
2 selected a wifi network on my android phone, long pressed it, selected "modify network"
3 set proxy settings as manual, proxy hostname =ip of my pc , port 8080
4 started freeproxy on my PC as admin, started proxy.
after this i'm still not able to get the websites to load...even though on the proxy logs i see that the device is trying to connect it seems tobe not working.
PS: I have rooted test device where i can change hostfiles, but I need VPN which is on my pc to be on in order to hit staging, thus changing hostfile on Android phones prevents me from hitting production directly so I have to go through my PC

[Q] moto g - using PC broadband on moto g

Hi,
I own a moto g and I have a broadband connection on my PC. Is there any way I use that to access internet on my moto g ?
If there is please explain.
Thanks & Regards
Gilagamesh
gilagamesh said:
Hi,
I own a moto g and I have a broadband connection on my PC. Is there any way I use that to access internet on my moto g ?
If there is please explain.
Thanks & Regards
Gilagamesh
Click to expand...
Click to collapse
do you have a desktop or a laptop ..
if desktop then you should try some apps like reverse USB tethering ..which are very simple to use ..
there are too many apps like this which you can find on the play store ..
Sent from my GT-I9300 using XDA Premium 4 mobile app
Thru Ethernet cable? If so change your modem to WiFi modem if using from data card use WiFi dongle search ebay
Sent from my XT1033 using Tapatalk
Well if you are on laptop...you can use this software known as Connectify to set up a Hotspot on ur laptop
You can do that with a wifi adapter on a PC too
jaspreet997 said:
Well if you are on laptop...you can use this software known as Connectify to set up a Hotspot on ur laptop
You can do that with a wifi adapter on a PC too
Click to expand...
Click to collapse
By the way I am using a Desktop PC and I don't have a Wifi adapter. But can't I use usb cables for connecting internet on my mobile? I that mandatory that I purchase a Wifi adapter?
gilagamesh said:
By the way I am using a Desktop PC and I don't have a Wifi adapter. But can't I use usb cables for connecting internet on my mobile? I that mandatory that I purchase a Wifi adapter?
Click to expand...
Click to collapse
Not at all
There are some reverse tethering apps to get ur pc's internet just by USB cable but they need a rooted phone!
Search on play store " reverse tethering"
If you don't wanna root....invest in a router...they are pretty cheap nowdays!
Sent from Samsung Chat
@gilagamesh
You can do it without using any apps ...u just have to enter some commands in ur PC and ur phone by terminal emulator.. Will help u PM me..
NOTE:: Root is required .
Sent from my XT1033 using xda premium
You can setup an ad hoc wifi network and share the internet connection to connected devices.
You can do it using the Control Panel or using the CMD.
In Windows 8 this functionality ist not available anymore using the GUI.
These commands should work on all windows pc's.
Replace ssid and key with your own if wanted.
Remember to open CMD with admin rights.
To configure adhoc network typ in CMD:
netsh wlan set hostednetwork mode=allow ssid=NameForMyNetwork key=MySecurityKey
Click to expand...
Click to collapse
To start adhoc network type in CMD:
netsh wlan start hostednetwork
Click to expand...
Click to collapse
To stop adhoc network type in CMD:
netsh wlan stop hostednetwork
Click to expand...
Click to collapse
Open properties of your network adapter on PC and you'll find an option to share the internet connection of connected devices of the specific adapter.
Connect your Android over wifi to your PC, voila, you should be done if i did not forget something.......
EDIT:
Aaaargh.....just saw it by reading it the thread a second time....you have no wifi.
But anyway, maybe it helps somebody else.
mokkami said:
You can setup an ad hoc wifi network and share the internet connection to connected devices.
You can do it using the Control Panel or using the CMD.
In Windows 8 this functionality ist not available anymore using the GUI.
These commands should work on all windows pc's.
Replace ssid and key with your own if wanted.
Remember to open CMD with admin rights.
To configure adhoc network typ in CMD:
To start adhoc network type in CMD:
To stop adhoc network type in CMD:
Open properties of your network adapter on PC and you'll find an option to share the internet connection of connected devices of the specific adapter.
Connect your Android over wifi to your PC, voila, you should be done if i did not forget something.......
EDIT:
Aaaargh.....just saw it by reading it the thread a second time....you have no wifi.
But anyway, maybe it helps somebody else.
Click to expand...
Click to collapse
A simpler way to go at it is a software called Connectify....completely gui based...I used to use it all the time on my laptop.....works on windows xp sp3 and up....
Sent from Samsung Chat
@mokkami
This is to create a wifi hotspot ...and as i see the person is using a desktop he might not have a wifi card...and even if u dn have wireless network connection 2 adapter you would notbe able to even create Wifi hotspot from a laptop ....and it does need service pack3 for windows 7
---------- Post added at 02:27 PM ---------- Previous post was at 02:23 PM ----------
I Dont remember the original thread but here are the contents i got fromthat link a while ago...
@gilagamesh
Step 1: Connect your Android to PC by USB cable and enable "USB tethering". You are still allowed to enable this option even when your 3g/wifi on your Android is off.
- If you are using Linux (Ubuntu), you don't need to install anything. NetworkManager applet will try to establish a connection on the new detected wired network device.
- If you are using Windows, Windows will automatically search Windows Update and install driver for you. You can skip Windows Update search and install manually an already included driver from Microsoft. In Install Driver window, click Browse My Computer, then Let me pick..., select Network Adapters, uncheck Show Compatible Hardware, look at "Microsoft Corporation" at the left column, and choose Remote NDIS Compatible Device from the right column. You can install or update a driver from Device Manager in Windows.
- If you are using Mac, install driver HoRNDIS. You will be notified about a new network interface. Click "Network Preferences" in the dialog to add it to known interfaces list. Then "Apply".
- If you are using Linux without GUI or NetworkManager, run these commands as root (or use sudo):
Code:
ifconfig usb0 10.42.0.1 netmask 255.255.255.0
(suppose that you don't have any other USB network adapter, otherwise, your Android may be usb1, usb2...)
Code:
echo 1 > /proc/sys/net/ipv4/ip_forward
Command for sudo will be:
Code:
sudo 'echo 1 > /proc/sys/net/ipv4/ip_forward'
Code:
iptables -t nat -F
iptables -t nat -A POSTROUTING -j MASQUERADE
Step 2:
- If you are using Linux, click on NetworkManager applet at the top right of your screen, select "Edit Connections...". In tab "Wired", choose the new established connection (be careful, not Ethernet LAN connection) and click "Edit..." In tab "IPv4 Settings", choose "Shared to other computers" as Method. Click "Save". NetworkManager will reestablish the connection and assign to your PC an IP address on this USB network connection, default: 10.42.0.1. Leave Internet connections (wired or wireless) untouched.
- If you are using Windows, open "Network Connections" in Control Panel. It is somewhat different from setup in Linux. Right click on an Internet connection that you have. I assume that you are using a desktop which doesn't have any wifi adapter, so right click on LAN Ethernet connection with Internet, and select "Properties". In tab "Sharing" (or "Advanced" for Windows XP), click "Allow other network users to connect through...", then select the USB connection in dropdown list below. Click OK. Windows will automatically setup your USB network connection and assign to it an IP address, default for Windows 7: 192.168.137.1, default for Windows XP: 192.168.0.1. You can see your Internet connection is now "Shared" and your USB connection is now "Unidentified network".
- If you are using Mac, open System Preferences - Network. If you installed HoRNDIS, you will see a new network interface corresponding to your USB connection. With "Using DHCP" as Configure Ipv4, it may be already connected. Go back to System Preferences, click "Sharing". Select "Internet Sharing". Choose the Internet connection (Ethernet or Airport...) in "Share your connection from", and choose USB connection interface in "To computers using". Mac will assign to your USB connection interface an IP address, default: 192.168.2.1.
- If you are using Linux without GUI or NetworkManager, you have done all PC setup in step 1.
Your PC setup is now done!
Step 3:
Open Terminal Emulator on your Android. Type:
Code:
su
The command prompt must change from $ to #. If it does not, check to ensure that your device is rooted properly.
[UPDATED]Type the following command in Terminal Emulator, the same for all PC operating systems:
Code:
netcfg rndis0 dhcp
The name for usb interface inside Android may vary. It is usually rndis0 or usb0. Type
Code:
busybox ifconfig
to identify the name.
Use OLD instructions below when automatical dhcp method does not work.
[OLD]Type these following commands in Terminal Emulator:
For Linux PC:
Code:
ifconfig rndis0 10.42.0.2 netmask 255.255.255.0
route add default gw 10.42.0.1 dev rndis0
If route fails, try:
Code:
busybox route add default gw 10.42.0.1 dev rndis0
For Windows PC, use the same above commands, replace 10.42.0.2 by 192.168.137.2 (192.168.0.2 for Windows XP), replace 10.42.0.1 by 192.168.137.1 (192.168.0.1 for Windows XP)
For Mac PC, replace 10.42.0.2 by 192.168.2.2, replace 10.42.0.1 by 192.168.2.1
Now you can close Terminal Emulator and start the browser for Internet.
Some applications (download in Google Play, GMail, Facebook...) don't recognize Internet connection. You can try this way (WARNING: NOT TESTED):
- Enable temporarily 3G connection on your Android
- Type:
Code:
ifconfig rmnet0 0.0.0.0
The name for 3G interface inside Android may vary: ppp0, rmnet0... Type
Code:
busybox ifconfig
to identify the name.
before ifconfig rmnet0 ... above.
This will make applications see your Internet connection via USB as 3G!
And it works !!!
Yes it is to create a hotspot. And i wrote already that i read it to late that he has no wifi available.
prachetas13 said:
and even if u dn have wireless network connection 2 adapter you would notbe able to even create Wifi hotspot from a laptop
Click to expand...
Click to collapse
I do not understand what you mean. I created a wifi hotspot sucessfully on my netbook which was also connected via network cable.
mokkami said:
Yes it is to create a hotspot. And i wrote already that i read it to late that he has no wifi available.
I do not understand what you mean. I created a wifi hotspot sucessfully on my netbook which was also connected via network cable.
Click to expand...
Click to collapse
Its like most of them dn have those adapters ...i have thinkpad L430 but nt able to share internet ...but on my dell laptop it was easier ...i havetried a lot but netsh wlan commands doesnot work ...not even by connectify ...in the other hand it works good on my other laptop ...
well not losing the oroginal topic ...i have provided a method of reverse tethering ..

Categories

Resources