[Q] UPD socket communication problem over 3g - Android Software Development

Hello everyone.
I am developing an application where I want a two-way communication between my cell phone (Nexus One, Samsung Fascinate both running Android 2.2) and my PC. Right now I am establishing a UDP connection between the phone and the PC and am able to communicate between the two over wifi. However, the communication fails when I am using 3G. I have tried it both ways - supplying the phone's IP address to the PC and vice versa but nothing works over 3G. I read somewhere that it could be due to NATs.
Has someone experienced this? How did you solve it?
Any pointers in the right direction would be much appreciated.
Thanks in advance.

For peer-to-peer communications, both (all) peers must "see" the other. That means that each peer must have an internet routable IP address. Otherwise, you need a centralized server that can bes "seen" on the internet that each peer connects to and the server brokers the connection between the peers. Of course, then it is no longer peer-to-peer.

Related

Socket SDIO WLAN card in I-Mate II

hi all,
Can't seem to get the Socket SDIO card working on my I-Mate II. Everywhere I look it seems like it requires SDIO NOW from bSquare but yet some posts say they get it working.
Anyone had any luck on this with a repeatable process documented?
Thanks!
Randall
Re Socket WiFi SDIO card
I had the same problem, but it's working fine now. First, get the latest driver software from Socket and install it. Then insert the card and wait several minutes until the wireless icon appears on the top bar. This will list available wireless networks in a bubble. Select the one you want and select to connect to the internet. It will then ask for the WEP key, if you need one, which you should enter as hex or ASCII. It should now be working.
Hope this helps!
Paul
Yeah I already did that one . I had it working for a little while last night but can't seem to get it going again.
Update: SDIO Issues
Hi all,
Where I have discovered something interesting. If you broadcast the SSID, then you can connect without issue using the Socket SDIO card. ( I assume it will be the same thing for the SanDisk Card as well)
I couldn't connect to anything until I started broadcasting the SSID. And here at work today I can connect to the AP's that broadcast and those that don't I can't no matter what I do.
Do I smell a bug here? :-D
i always seem to get a problem of not receiving an ip address from my linksys router. as soon as i put a static address in, restarted, reset it, restarted again, it worked...
Re: Update: SDIO Issues
sysmgtsrv said:
Hi all,
Where I have discovered something interesting. If you broadcast the SSID, then you can connect without issue using the Socket SDIO card. ( I assume it will be the same thing for the SanDisk Card as well)
>How do i access & broadcast SSID ? I have a SanDisk SDIO WLAN and i am experiecing problems now with access public access hotspots which i never did. The IP assigned to me are always the same despite having resetted my XDAII. Thanks sir.
I couldn't connect to anything until I started broadcasting the SSID. And here at work today I can connect to the AP's that broadcast and those that don't I can't no matter what I do.
Do I smell a bug here? :-D
Click to expand...
Click to collapse
hihi something to share with u all, me also having the same problem of not able to connect with my linksys router with SSID broadcast disable. I tried with both sankdisk n socket driver, both also can't work. But i have no problem with getting any ip from my router
In short:
The SocketIO 802.11b SDIO Card, like most 802.11b devices, will not connect without either enabling SSID Broadcast on the Access Point OR manually specifying the SSID in the setup of the wirless profile of the connecting device (the XDA in this case).
In not so short:
In infrastructure mode (connection from Client to Access Point (AP)), the client sends all traffic to the AP. The access point acts as an ethernet bridge and forwards the communications onto the appropriate network–
either the wired network, or the wireless network. Prior to communicating data, wireless clients and access points must establish a relationship, or an association. Only after an association is established can the two wireless stations exchange data. In infrastructure mode, the clients associate with an access point. The association process is a two step process involving three states:
1. Unauthenticated and unassociated,
2. Authenticated and unassociated,
3. Authenticated and associated.
To transition between these three states, the communicating parties exchange messages called management frames. All access points transmit a beacon management frame at a fixed interval. To associate with an access point and join a BSS, a client listens for beacon messages to identify the access points within range. The client then selects the BSS to join in a vendor independent manner. For instance in Windows XP, all of the network names (or service set identifiers (SSID)) which are contained in the beacon frame are presented to the user so that they may select the network to join. A client may also send a probe request management frame to find an access point affiliated with a desired SSID.
After identifying an access point, the client and the access point perform a mutual authentication by exchanging several management frames as part of the process. The two standardized authentication mechanisms are Open System Authentication and Shared Key Authentication.
After successful authentication, the client moves into the second state, authenticated and unassociated.
Then the client sends an association request frame, and the access point responds with an association response frame, which moves us from the second state to the third and final state, authenticated and associated.
After following the process described, the client becomes a peer on the wireless network, and can transmit data frames on the network.
The problem is, if the SSID is not being broadcasted in the beacon frame, the client does not know who to respond back to. By specifying the SSID the client will then be able to establish communication.
Thats my understanding of the process/problem anyway.
Note: In my experience 802.11g is not subject to this limitation, my guess would be 802.11g uses the AP's MAC address in addition to the SSID (if enabled) in management frames/association.
Hope this helps..
Maven Raphene
CCNA, A+, NET+, *CI, *SPJ, ***RAINRL
*Certifiable Idiot
**Self proclaiming jackass
***Rest assured I'm not really listening
speedolite said:
hi something to share with u all, me also having the same problem of not able to connect with my linksys router with SSID broadcast disable. I tried with both sankdisk n socket driver, both also can't work. But i have no problem with getting any ip from my router
Click to expand...
Click to collapse

GPRS push?

Hi all,
I'm brand new to mobile / pocket pc development, I just have a few networking related questios though.
I'm implementing my own blackberry style client/server for my brand new (got it yesterday) XDA IIi.
From what I've read the IP address of a mobile connected to GPRS will change every data session, so even though it has stayed 'online' all day it may have multiple IP addresses throughout the day. How do the blackberry style systems get around this? Is this todo with the IMS / SIP protocol ?
What I'm wanting is so that the mobile phone doesn't have to send any data to the server (apart from an initial hello) and then when mails come in the server can send directly to the mobile. Obviously with changing IP addresses this is impossible unless each time the IP changes the mobile tells the server, effectively you are not really pushing any more then it's more of a poll.
Also one more question on a non-development note, do providers charge for dropped packets or are they dropped normally before their routers so they simply never see them?
BTW I will be releasing the software I'm working on when done so don't fear
Thanks
bump ?
I guess not much known about GPRS / Blackberry workings ?
You can use WAP push to get in touch with the client on a Pocket PC Phone Edition. Have a look in the Phone API at msdn. I think you'll find something there...
Thanks! Totally forgot about checking MSDN ;P
This is possible, I do something similar. But it's difficult.
The IP assigned to your device is in private address space, using NAPT to contact Internet. Therefore you cannot contact the device IP in any way.
You can however open a connection from the XDA to any host on the Internet using TCP. Once this connection is open, it will remain open indefinitely. Or about 30 minutes if no data is transferred.
Once you have an open TCP connection, you can push data down the tunnel in either direction with very low latency. It is up to you to find a suitable protocol to run over your open tunnel.
Several things also need checking:
- Send some data every few minutes to keep connection open.
- Watch for stale GPRS connections. If this happens, remake the connection.
- Packets do get lost. Ensure all packets checked, resend if needed. You can use the TCP 'ACK' packet, or use your own acknowledgement protocol.
If you get it working, it works surprisingly well.
Hope this is of some use,
Ben Clewett.

Bluefire VPN over 3G

HI there,
Has anyone experienced an issue whereby bluefire or similar contivity VPN client connects seamlessly over WIFI and 3G however will only allow RDP or VNC over WIFI.
I am currently running bluefire and am able to authenticate through 3G but thats it, I have no other functionality.
Any help would be great!
Thx
I've seen it where specific ports are blocked on the 3G providers network, but given that you're establishing a vpn tunnel, that should be irrelevent, as all the traffic should be tunneled via the VPN. I wonder if the Device isn't picking up the new route to send the traffic via the VPN, and is instead sending it via the 3g connection to a non-existant device.
Does your VPN-endpoint give you any logs to show if its actually receiving the traffic from the device? Are you able to ping anything within the remote network (assuming ping is allowed) from the device?
One thing I have noticed is that if you have a 3G connection open, then establish a wifi connection, the routing table doesn't seem to update to use the wifi connection and you actually have to kill the 3G session. I wonder if something like that is happening here - the 3g session establishes a default route, the VPN session then comes up but the device doesn't realise to send traffic via the VPN session. Or are you getting any traffic through the 3G/VPN connection?
I have the option to turn on verbose logging. I ll give that a go and see if it highlights anything really obvious.

ICS & VPN with WM6

My searches on the web haven't yielded much help or information so I thought I would come to the experts...
I have a Treo 750 that I just "upgraded" to WM6 2 days ago. I noticed that DUN has gone away and was replaced by ICS. After configuring my laptop to use that instead of DUN I connected and was surfing the web. My problem now is VPN. I travel frequently (luckily I'm in the office until Jan.) and regularly used my phone to connect to the corporate network via VPN. I also work with a lot of other companies and have VPN access to their systems as well. Basically now I can open my Cisco VPN client, connect to a VPN gateway, authenticate, get assigned all the appropriate IP information, but cannot communicate on the network. What gives? Is there a solution to this? If not, what the heck was MS thinking when they did this!? My phone is basically useless for one of the major reasons I bought it...
Any help is appreciated!
thanks!
Ok, further searches found that DUN can be added back into WM6 via a cab that was posted here at the XDA forums. I installed it and the DUN service is now visible again. I unpaired by phone and laptop, re-paired, and included DUN. Now when I try to connect, I get the DUN connection box after the bluetooth connection is initiated but when I click DIAL I get the DIALING... prompt, followed by Error 678: The remote computer did not respond.
Anybody get this working on a Treo 750? Thoughts, ideas suggestions?
What is the ip address you are getting via the cisco vpn client
It maybe that it is in the same subnet as the ip address assigned to the pc from the wm6 ics. The ICS gives the address 192.168.0.1. and if your Cisco is also giving a 192.168 address then you will have two routes for the 192 address range thus giving you the problem when accessing hosts.
If this is the problem Im pretty sure you can change the address allocated via the ICS using a registry editor. If not you may be able to get work to use a different range for you on the cisco vpn.
Our corporate network is 172.x.x.x so it's nowhere near the 192.168.0.x assigned by the phone. When I look at the route in the VPN client I see 192.0.0.0, 10.0.0.0, and 172.0.0.0 so I am assuming 192 is my laptop, 10 is the phone, and 172 is the corporate network.
I'm guessing NATing is the problem. I've been reading that if I use a different APN (isp.cingular instead of wap.cingular) there is no NATing. I've tried both, and I've tried turning off and on the "force AT&T" proxy setting to no avail.
Tried the DUN cab hack that is floating around for WM6 also. The service is active again and I can also add Modem Link back in and my laptop sees my Treo as a modem but when I dial I get an error stating the remote computer did not respond. I'm guessing along with going from WM5 to WM6 AT&T also updated the radio so the old communications protocols don't work anymore?
Hello Sir,
I have exactly the same problem... I have successfully connected via VPN, however unable to communicate with any devices on that network... Then what is the use of VPN on the phone? I've tried searching online for answers, but no luck... People are having the same problem but no one knows how to solve it... I'll try and trouble shoot this problem more as soon as my exams are done...
Hi
Working successfully for me. I am using Imate jasjam wm6. Pc using cisco client connecting via ics on phone. I have telstra 3g connection tested ok on both telstra.internet (Nated ip) and telstra.extranet (real ip).
You are correct it may be an nat issue. Can you check that your transparent tunnelling is on as follows: right click on your connection entry in cisco client and select modify then transport tab. Check that enable transport tunneling is enabled ipsec over udp(Nat/pat).
The other thing to check is that the cisco vpn server aslo has transport over Nat on as well.
Also are you sure your corporate ip range is 172 or is that the range given by the cisco vpn to clients.
Transport tunneling is on (always was). I'll have to check with our network admin and check on the VPN server setting...I guess as long as I have connectivity back to the office, I don't need it that badly for all the customers I need to connect to at various times.
Yep, positive on the corporate IP. Right now it is 172.28.1.87 and I'm in the office.
Thanks for the help so far. Got any other suggestions on how I can troubleshoot further?
One other thought...should I modify the registry on the phone to assign a different IP address to my laptop? Would that help?
Same Problem
MX. I am having the exact same issue but with Securemote VPN. I've looked through the registry and found the assigned address, but I'm wary of changing anything until I can find some more information.
Anyone out there ever change the DHCP configuration for their phone?
Somewhat related question?
Im attempting to route my connection on my mobile through a laptop acting as a wan bridge, then uplinking it into the router. The issue Im having is that XP and WM6 both use the same IP Block. Ive read and read and cant find much to tell me how to change the WM6 IP BLock to something like 192.168.2.1 rather than the default 192.168.0.1
Does anyone have any pointers? Ive looked through the registry. There MUST be a simple way to change a default.
To clarify my setup, I am using ICS Via USB into a UMPC laptop running XP. The UMPC is set to share that same connection back out over Ethernet. The ethernet runs into my WAN Uplink on the router and then back out via wifi/rj-45
This setup works as I have done it using Wifi with other networks, and I can chose the "Lan3" to share under the advanced settings on the UMPC. The reason I dont just share out via Wifi from the start is that Wifi on my Kaiser and Raphael both make the device to hot to charge, thusly killing the battery within a couple hrs of sharing. If I share via USB , it stays pretty cool and still charges.
Anyone have any pointers?
I have already tried tricking XP into using the Lan on another block but as soon as you try to share the USB lan, it reverts back to the 192.168.0.1
The only way I can imagine is a registry modification or a program change in ICS.
Thanks Much!

PPTP VPN, Connection working, Exeption Rules DON'T for wanted Applications

Hi there,
I still have Problems connecting my Xperia via VPN to my Network.
The VPN-Server is runnning @win2003 Enterprise, the client is WM6.1.(original rom from SE).
I tend to claim that my configuration is mostly OK, because I can connect to the VPN if I use Opera, or if I establish the Connection manually.
( I can open e.g. owa)
I've got some exeptions (german: Ausnahmen) defined for hosts on my network.
PLEASE CORRECT ME IF I'M WRONG:
When I run a software and try to connect to a URL which is on the exeptions-list the device should establish the VPN-Tunnel and the traffic (just from this app)should be routed through the Tunnel.
This works fine If i use Opera, but not if I use different Software, like Remote-Desktop or wmirc or jmirc.
I'm trying this for a week now and still havn't found a solution.
Help would be greatly appreciated!
Best regards!
Win****

Categories

Resources