[Q] UDP/TCP-Connect to clients of Tether-Wifi-Hotspot - Android Software Development

Hi everyone,
I have written an app similar to Gmote, but it uses UDP broadcasting on the Wifi to find its server, so connecting is easier. This works fine when I am at home and both my phone and my computer/laptop are connected to my Wifi at home.
However, I was wondering, if this would also work anywhere else, when there is no router (on holidays, parties, etc.). My HTC Desire Z has the HTC-specific Wifi-Hotspot-App, that allows my laptop to access my phone's 3G-connection (which works fine) and the Wifi-Hotspot can even be activated when there is no 3G activated/available. I can ping each of the devices and when I connect another Android-device to this Wifi, I am able to connect to the laptop.
So: UDP-broadcasting and TCP-connects work on this Wifi-Hotspot the same way it works at home, when I use my laptop and a different Android-device. This involves 3 devices in total.
But: I want to UDP-broadcast and connect from my Desire Z, which is the hotspot at the same time (only 2 devices involved). And this doesn't work, as it throws an "Network unreachable"-Exception when trying to UDP-broadcast anything using MulticastSocket.send().
Do you know how I can connect from my phone to my laptop, which is connected to my phone's Wifi-Hotspot? Does it work with your devices?
I appreciate any tips.
Thank you,
Philipp

Related

Internet Sharing With Xbox Live ???

Joined this site a while ago, and needless to say, I've been literally blown away by it. The members of this site are just incredibly talented; I've been able to make my 8525 look and function just fantastic, and just about any fix/patch I've been able to locate through this site.
Currently using Custel WM6 rom and it's so stable and faster than the WM5 I had (though it was so hard to choose with so MANY excellent cooked roms to choose from)...
So, since it seems there's no limit to what can be done with these great devices, I was wondering if it is at all possible to use an 8525 to connect an Xbox 360 to Xbox Live?? I am able to connect using Internet Connection Sharing via USB to my laptop running Vista Ult. and get great surfing speed, so is there any way to somehow configure it to get the 360 to connect to Live through it? Could the 8525 be connected directly to the 360 (prob not likely) or can it be set up using the laptop to share the connection??
Any help/answers on this would be greatly appreciated!!!
I may be wrong, but I don't think that this is possible.
As far as I know, the xbox has no bluetooth pan support, and I don't think it is possible to have an USB modem directly setuped.
The remaining possibilities are: through the RJ45 or through the wifi. Sadly the hermes has no RJ45 connector, and it is unable to become an acces-point nor an add-hock host.
I just wanted to say that the idea of using a Hermes to connect an xbox 360 to xbox live would be just about the coolest thing ever done with a cell phone.
Is it possible to connect a 360 to XBL via a PC/laptop?
Dammit!!
Well, was worth a try, especially before tangling myself in wires trynna wing it... Guess I will be calling those Optimum guys for my XB Live fix...
Precisely what I was thinking. Was sitting here surfing using the phone as a modem, getting great speed, then thought, 'hey it would be cool as f%#$# to connect to Live with this...' I mean, I know the 8525 could probably handle it... The question is, what CANT this phone do?!
HOLLIDAY1183 said:
Joined this site a while ago, and needless to say, I've been literally blown away by it. The members of this site are just incredibly talented; I've been able to make my 8525 look and function just fantastic, and just about any fix/patch I've been able to locate through this site.
Currently using Custel WM6 rom and it's so stable and faster than the WM5 I had (though it was so hard to choose with so MANY excellent cooked roms to choose from)...
So, since it seems there's no limit to what can be done with these great devices, I was wondering if it is at all possible to use an 8525 to connect an Xbox 360 to Xbox Live?? I am able to connect using Internet Connection Sharing via USB to my laptop running Vista Ult. and get great surfing speed, so is there any way to somehow configure it to get the 360 to connect to Live through it? Could the 8525 be connected directly to the 360 (prob not likely) or can it be set up using the laptop to share the connection??
Any help/answers on this would be greatly appreciated!!!
Click to expand...
Click to collapse
Just tried it. Plugged it in and enabled Internet Connection Sharing, and the phone starts charging, but says "Check USB Connection" I'm not much of a hacker, so I can't attempt any driver\software hacks to get it working. You'd probably have to write a driver for the XBox to recognize the phone, and possibly vice versa. Definitly possible. Probably never going to happen though.
I'm doing it now. I connected the 8525 by USB to my computer. Then I open up the Internet Sharing program that uses the phone as a USB modem (I'm using Black Majic ROM btw). Then I select connect on the program on my 8525. Once it connects, I go to my Network Connections on my PC. I have the RJ-45 connected from the XBOX 360 to the ethernet port on my PC. I click once on the connection that says Local Area Connection # (mine is 13, everyones would be different) Windows Mobile Based Internet Sharing Device, then I hold Ctrl on my PC keyboard and click on the other connection (the one for my ethernet port). Once both are highlighted, you can right click on either one and select Bridge (I believe thats the one, anything that says Bridge on it) and let Windows bridge the connections and you should be set. Sorry if my explaining isn't very good.
Via a PC it should indeed be not an issue (as explained above).
To do it directly, it should work with an ethernet-bluetooth bridge. I'm
using 2 ethernet-wifi bridges to connect a TV and a PC to a wifi router,
but I'm pretty sure ethernet-bluetooth bridges also exist.
Jörg
Wow, according to drodri I was pretty close to having it right before... I will try that setup in a sec... also, is there a way to incorporate my wireless-G linksys router into this, or no? Is that in Vista?
I appreciate your input... I've done exactly the same as your setup, and when I go into Network Connections, it has the 8525 listed as Remote NDIS based Internet Sharing Device (Internet Connect #5) & the ethernet connection as Local Area Connection (Unidentified Network)... In the Network and Sharing Center, do I make the ethernet connection Private, or leave it Public? Or does it matter at all... because it still for some reason won't connect to Live, it still fails the IP test... there must be a setting or configuration I'm missing here, I just know it
You could also possibly use an ethernet to wifi device (wireless access point) to go from ethernet to wifi on the 360, then use a wireless network to the TyTN (ad-hoc mode rather than ap mode) and use that to run the connection..
but..
a) its an expensive way to do it
b) it needs extra hardware
c) it may not work (can the tytn do ICS over wifi rather than usb? DUN mode may work on the newer roms that will have it - but does DUN work over wifi)
d) the access point would need to initiate the connection to the phone while also doing dhcp for the xbox.. it should work.. and id try it for you.. except that it seems like a horribly complex way to do it.
Hmm... maybe I'll give it a shot.
Where there's a will, there's a way
I think the ideal goal here would be straight from 360 to Hermes. USB or wifi, with a small adaptor if needed. It would be beautiful if someone could write drivers so you could just plug 'er in with USB and use the built in Internet Sharing on the Hermes.
Obviously those are high hopes, and in a perfect world everything would automatically work like that. *drools over universal compatibility*
dtx said:
I think the ideal goal here would be straight from 360 to Hermes. USB or wifi, with a small adaptor if needed. It would be beautiful if someone could write drivers so you could just plug 'er in with USB and use the built in Internet Sharing on the Hermes.
Obviously those are high hopes, and in a perfect world everything would automatically work like that. *drools over universal compatibility*
Click to expand...
Click to collapse
For USB The problem is the driver would have to be on the 360.. it's 100% impossible.
Even if you can run unsigned code on your 360, you'd also have to be some kind of coding,hardware modding, hacking junkie to even try to write a 360 driver; on top of which to do it for a crazy reason like interfacing to one mobile phone... that would be die hard madness!
Microsoft on the other hand could probably whip it up in 5 minutes as the xbox already supports everything that's needed except an RNDIS driver to enumerate the phone as a network card. Problem being the target audience is small; possibly even just you guys
Wifi is more likely to happen as you dont really need to modify the 360, if someone wrote a driver to make the phone look like a wireless AP (if thats possible with its wifi chipset) and assuming ICS on WM6 supports wifi connection to the PC/360 (im not sure it does) then it should work fine. (Has anyone checked if the 360 wifi adapter can support a connection to non-ap ad-hoc wifi? if it can then this might work already if you very lucky - i dont have the wifi link for my 360 or id try it)
sambartle said:
.......if someone wrote a driver to make the phone look like a wireless AP (if thats possible with its wifi chipset) and assuming ICS on WM6 supports wifi connection to the PC/360 (im not sure it does) then it should work fine. (Has anyone checked if the 360 wifi adapter can support a connection to non-ap ad-hoc wifi?....
Click to expand...
Click to collapse
Does anybody know if there is already software to make the Hermes a WiFi-Router or make ICS make select WiFi?
I'm going to try this tonight with my regular xbox
There are already instructions on this forum for using your device as a wifi access point. It seems pretty straight-forward. So you should be able to connect any wifi client, including a wifi capable Xbox 360.
8525 / Hermes wifi AP
Hey, I actually did something similar since I didn't want to buy a $100 wireless adapter. I have a PC (but can be done with a laptop) with a wi-fi connection near my 360 all I had to do was use a patch cable to connect the PC to the 360. I am running vista, but Patch cables are hardware that tells the network card they are attached to a like device. It automatically shared my connection and we were able to go on-line. There were other ways I found that suggest changing router settings and such, but this was the easiest way. All you need now to use your phone to get your 360 on-lin is a computer

Sharing a WM ICS connection in a Wifi (adhoc) network

I figured out that using my Imagio as a WiFi Router drains the battery faster than it can charge. This is bad for a sometimes day-long connection using low bandwidth sites (live blogging for hours on CoverItLive.com).
Typically, I use the Imagio when WiFi isn't available, or is flat out ridiculously priced ($thousands in some convention centers).
I have to work with my partner, who also needs a connection, and sharing it would be oh so convenient using WiFi. So I thought, why not share my Imagio's connection by using Internet Connection Sharing on my computer through the WiFi. Not so fast: all ICS uses a fixed IP of 192.168.0.1. Conflict city when you try to use ICS twice in the same daisy chain.
"So", says I, "why not use Network Bridging to accomplish the same thing?". Well, this works in getting the signal to my partner's machine. She can internet beautifully. But, it turns out, my machine can't access the Internet anymore so long as the Imagio's ICS is bridged to the machine's built in WiFi. Take it out of the bridge, it works on my machine but not my partner's. Put it in the bridge, it doesn't on my machine, but it does on my partner's.
Anyone have any insight as to how this can be accomplished. Imagio ICS via USB to computer A, computer A's Wifi set in ad-hoc mode to be used as a router to get Internet to computer B, both machines being able to access the Internet.
Also, USB-Modem works with ICS on the laptop, but it uses dial-up, and the problem with that is that if you stop using it for a certain period of time, it loses the connection, which can screw up things royally. ICS is much more consistent.
There has to be a way that bridging can be used without taking the Imagio's ICS out of that computer's universe.
None of this would be a problem if she got a WM phone instead of the LG Touch (which requires a hefty monthly plan to use it as a modem).
Thanks to any who know more about this than me or have some other ideas.
--
FB
You can configure ICS on the phone to use a different IP range (probably also possible on the PC but don't know how).
So then you can use Phone->ICS->USB->ComputerA->ICS->Wi-Fi->ComputerB
WMWifiRouter uses 192.168.3.x instead of .0.x by default. I think this can also be configured using ICS Control.
frankenbike said:
I figured out that using my Imagio as a WiFi Router drains the battery faster than it can charge. This is bad for a sometimes day-long connection using low bandwidth sites (live blogging for hours on CoverItLive.com).
Typically, I use the Imagio when WiFi isn't available, or is flat out ridiculously priced ($thousands in some convention centers).
I have to work with my partner, who also needs a connection, and sharing it would be oh so convenient using WiFi. So I thought, why not share my Imagio's connection by using Internet Connection Sharing on my computer through the WiFi. Not so fast: all ICS uses a fixed IP of 192.168.0.1. Conflict city when you try to use ICS twice in the same daisy chain.
"So", says I, "why not use Network Bridging to accomplish the same thing?". Well, this works in getting the signal to my partner's machine. She can internet beautifully. But, it turns out, my machine can't access the Internet anymore so long as the Imagio's ICS is bridged to the machine's built in WiFi. Take it out of the bridge, it works on my machine but not my partner's. Put it in the bridge, it doesn't on my machine, but it does on my partner's.
Anyone have any insight as to how this can be accomplished. Imagio ICS via USB to computer A, computer A's Wifi set in ad-hoc mode to be used as a router to get Internet to computer B, both machines being able to access the Internet.
Also, USB-Modem works with ICS on the laptop, but it uses dial-up, and the problem with that is that if you stop using it for a certain period of time, it loses the connection, which can screw up things royally. ICS is much more consistent.
There has to be a way that bridging can be used without taking the Imagio's ICS out of that computer's universe.
None of this would be a problem if she got a WM phone instead of the LG Touch (which requires a hefty monthly plan to use it as a modem).
Thanks to any who know more about this than me or have some other ideas.
--
FB
Click to expand...
Click to collapse
I use WM WiFirouter, it is a great program with multiple different configurations. I use it at home on an old IPAQ hooked to my PC as a wireless router so my kids can use the internet on their laptops.
WM WiFi Router was my first choice. Note the point I made that the battery drains faster than it can recharge. This becomes something of a problem after an hour or so.
Sadly, I got the connection sharing option to work now on the laptop using ICS control, but it seems to disconnect the WiFi ad-hoc network. And doesn't actually share through the WiFi. I suspect this is a problem with the way the WiFi on the laptop works, since I had the same problem with Network Bridging, and had to run a Dos script to enable the WiFi. It only works when bridging is being used, so I have to find the equivalent for when bridging isn't being used but ICS is.
I don't suppose anyone knows anything about *that*?
EDIT: I just downloaded the latest version of WMWifiRouter, which has USB connection support and seems to be a whole lot more reliable in general. AND IT WORKS with connection sharing, the laptop WiFi works as a router, and it DOES solve my problems. Thanks for the suggestion that made me reconsider it again.
EDIT +1: Still uses up the battery faster than it charges. Not as fast as WiFi though. WMWifiRouter is a pretty amazing connection sharing tool kit with USB, BT and WiFi connectivity and lots of control without the weird IP address pathologies. Amazing that it also gets around my laptop's weird connection sharing WiFi pathology as well. Another nice thing is the "keep connection alive" ping feature, and the real time power status and information. They really try to pack a lot of useful stuff for your $20.

Need Assistance. PC to Phone wifi connection messed up

Hello all,
I am very new in networking and wifi. My problem is I have an Cat 5 cable running to the modem from my desktop; and also an Asus wireless adapter installed on the desktop to access "ad Hoc" on station mode - my Epson workforce 435. All these work without issues whatsoever. The cable provides great internet access and the wireless card permits all printing, scanning and fax via wifi.
Now, I have just purchased a sony xperia acro s. Wanted to hook it up on the wifi settings. In fact didnt have to do too much- switched on wifi on the phone- changed Station mode to AP- scanned- found "Storm Trooper" - and connected onto the wireless network (without even adding a new connection or making any alteration - except the WEP password which I have changed to wpsk2 something (compatible with phone)).
Since connection was connected via "StormTrooper" ssid (in fact also name of my pc)- all was fine and I had used this connection for about 3 days on and off on the xperia, great connection all activities were optimum.
Just today, the connection methods changed. It shows up on the phone as connected, but cannot access internet on it. And upon disconnecting the device, I LOOSE the connection via the CAT 5 direct - in totality. Cannot access internet on PC anymore, and error messages come on screen
" Windows Network Diagnostic Policy is Disabled" . To solve it went into "services" but was unable to do so. So had restored it to a point where everything worked fine and pc is back to normal.
Tried the connection three times again with the phone, and same problem ensued. No luck. Had to restore PC everytime to get back internet connection.
Look forward to expertise.
PC specs: Storm Trooper
intel i3770k
Sabertooth z77
Ati 7850 Sapphire
8 GB Ram (MB compatible corsair)
1 TB HDD Green
120gb ssd
Corsair H100
Sony Xperia Acro S said:
Hello all,
I am very new in networking and wifi. My problem is I have an Cat 5 cable running to the modem from my desktop; and also an Asus wireless adapter installed on the desktop to access "ad Hoc" on station mode - my Epson workforce 435. All these work without issues whatsoever. The cable provides great internet access and the wireless card permits all printing, scanning and fax via wifi.
Now, I have just purchased a sony xperia acro s. Wanted to hook it up on the wifi settings. In fact didnt have to do too much- switched on wifi on the phone- changed Station mode to AP- scanned- found "Storm Trooper" - and connected onto the wireless network (without even adding a new connection or making any alteration - except the WEP password which I have changed to wpsk2 something (compatible with phone)).
Since connection was connected via "StormTrooper" ssid (in fact also name of my pc)- all was fine and I had used this connection for about 3 days on and off on the xperia, great connection all activities were optimum.
Just today, the connection methods changed. It shows up on the phone as connected, but cannot access internet on it. And upon disconnecting the device, I LOOSE the connection via the CAT 5 direct - in totality. Cannot access internet on PC anymore, and error messages come on screen
" Windows Network Diagnostic Policy is Disabled" . To solve it went into "services" but was unable to do so. So had restored it to a point where everything worked fine and pc is back to normal.
Tried the connection three times again with the phone, and same problem ensued. No luck. Had to restore PC everytime to get back internet connection.
Look forward to expertise.
PC specs: Storm Trooper
intel i3770k
Sabertooth z77
Ati 7850 Sapphire
8 GB Ram (MB compatible corsair)
1 TB HDD Green
120gb ssd
Corsair H100
Click to expand...
Click to collapse
So you're using your desktop as a wireless router? If you're using Win 7 you might try Connectify or something similar.
MrObvious said:
So you're using your desktop as a wireless router? If you're using Win 7 you might try Connectify or something similar.
Click to expand...
Click to collapse
Solved: Interference was by Avast and minor settings on wifi. All working now.

share internet between 2 android devices via usb

Hello everybody,
does anyone know if there is a way to share internet between 2 different android devices via usb?
The one android device has internet via a strong wifi antenna (from a hotspot from my isp where you have to log-in via a http-page)
The other android device I want to use to set up a wifi "router" for my other devices in the house.
So there has to be a connection between the two via usb (or bluetooth but i prefer usb)
I added an image to make it more clear (i hope )
I've seen this question come around a couple of times (aspecially for my isp) as this "http-logon-hotspot" signal can't simply be "repeated" with a normal repeater.
tkideneb said:
Hello everybody,
does anyone know if there is a way to share internet between 2 different android devices via usb?
The one android device has internet via a strong wifi antenna (from a hotspot from my isp where you have to log-in via a http-page)
The other android device I want to use to set up a wifi "router" for my other devices in the house.
So there has to be a connection between the two via usb (or bluetooth but i prefer usb)
I added an image to make it more clear (i hope )
I've seen this question come around a couple of times (aspecially for my isp) as this "http-logon-hotspot" signal can't simply be "repeated" with a normal repeater.
Click to expand...
Click to collapse
i never heard 2 different android devices can share internet via usb,but set up a wifi "router" can do that.
Also,maybe you can invent such a usb in the future!
does not cause

[Q] How to share phone WiFi with an Internet Radio

Hi Guys,
Firstly, I hope this is posted in the correct section.
Secondly, My name is Mark, and I've followed this site/forum for a few years now, and have successfully rooted 2 old phones (HTC Nexus One & HTC One S) thanks to all the information and guides right here on xda-developers.
Thirdly, is my issue: (the back-story) [tried, tested & failed alternatives]
At work, we've recently invested in a WiFi Internet Radio, to take advantage of the tens of thousands of stations compared to the 20 or so offered on DAB/FM. Getting it connected to the internet however has been a struggle.
The offices Wired & Wireless LAN networks are locked by a pin, which nobody knows, or will give out, this network is for official business use only, by the companies own equipment. Also network tabs in the computers control panel are blocked, so these pins are completely unobtainable. There is a WiFi hotspot nearby, this is setup and ran by "The Cloud" (aka Sky). When we try to connect to this network directly from the radio, it asks for a pin, however to use these hot spots you have to register a username & password on a browser to be granted access, again, not possible with the radio. 3G/4G is very limited in the building due to the location of the building, and (we think) a chrome window tint that runs all the way around the building, We've tried, the radio can find and connect to the phone, but the phone can't connect to the internet via 3g. Even if 3g was good, it'd be very data consuming to be running radio over portable WiFi hotspot for 52 hours a week.
So what I want to do, if it's possible, is to share my WiFi connection (to the hotspot) over WiFi or USB (to the radio), using my phone as a WiFi repeater/modem in between. Or perhaps there's another alternative I've missed? I'm not overly sure on the ins and outs of usb modems and other networking hardware.
The phone is a Sony Xperia Z2 (currently not rooted, but willing to root if needs be to make this work)
The radio is a Roberts Stream 93i (has WiFi, ethernet & USB)
And in case anyone mentions, there is a STRICT ban on phones, ipods (and anything that connects to the internet) due to the confidential nature of our work, if this wasn't the case we'd just of bought a pair of speakers and streamed the internet radio on our phones.
Thanks for your help, I've been searching high & low for 3 straight days now!
Stoneyworth said:
Hi Guys,
Firstly, I hope this is posted in the correct section.
Secondly, My name is Mark, and I've followed this site/forum for a few years now, and have successfully rooted 2 old phones (HTC Nexus One & HTC One S) thanks to all the information and guides right here on xda-developers.
Thirdly, is my issue: (the back-story) [tried, tested & failed alternatives]
At work, we've recently invested in a WiFi Internet Radio, to take advantage of the tens of thousands of stations compared to the 20 or so offered on DAB/FM. Getting it connected to the internet however has been a struggle.
The offices Wired & Wireless LAN networks are locked by a pin, which nobody knows, or will give out, this network is for official business use only, by the companies own equipment. Also network tabs in the computers control panel are blocked, so these pins are completely unobtainable. There is a WiFi hotspot nearby, this is setup and ran by "The Cloud" (aka Sky). When we try to connect to this network directly from the radio, it asks for a pin, however to use these hot spots you have to register a username & password on a browser to be granted access, again, not possible with the radio. 3G/4G is very limited in the building due to the location of the building, and (we think) a chrome window tint that runs all the way around the building, We've tried, the radio can find and connect to the phone, but the phone can't connect to the internet via 3g. Even if 3g was good, it'd be very data consuming to be running radio over portable WiFi hotspot for 52 hours a week.
So what I want to do, if it's possible, is to share my WiFi connection (to the hotspot) over WiFi or USB (to the radio), using my phone as a WiFi repeater/modem in between. Or perhaps there's another alternative I've missed? I'm not overly sure on the ins and outs of usb modems and other networking hardware.
The phone is a Sony Xperia Z2 (currently not rooted, but willing to root if needs be to make this work)
The radio is a Roberts Stream 93i (has WiFi, ethernet & USB)
And in case anyone mentions, there is a STRICT ban on phones, ipods (and anything that connects to the internet) due to the confidential nature of our work, if this wasn't the case we'd just of bought a pair of speakers and streamed the internet radio on our phones.
Thanks for your help, I've been searching high & low for 3 straight days now!
Click to expand...
Click to collapse
is the radio for the employees to enjoy, or is it being hooked into the building for customer/clients?
if it could be considered to the benefit of customers/clients, just get in touch with IT and see if they have a solution for you. (creating an exception on the netowrk for the radio, maybe?)
If you are simply trying to fly under the radar, and get the thing running, then it sounds like you might be out of luck.
so, you are saying plugging it into an ethernet port, it won't obtain access to the net?
plugging it into a known working port, it also won't work?
you could, try bringing in your own wifi router, plugging that into an open ethernet port (wan) and then see if it grabs net through that.
as i read your previous post, it leads me to believe that there is a PIN you need to input for WIFI & LAN... kind of strange for LAN

Categories

Resources