adhoc in 4.0 API or still need hacks ? - Android Q&A, Help & Troubleshooting

Hello.
I am a CS student. I have a project to write a communication library for android using wifi card. Library should allow transfer of objects between the phones. (in short words I need TCP or at least UDP).
What I would do on a laptop:
switch to adhoc mode, put each laptop on different static IP. use TCP/UDP for communication.
I have a problem doing the same on Android as it does not natively support adhoc.
My question:
I need my library to work on EVO 4G phone (currently on Android 2.3). I will of course need to root it. But what would you recommend after the rooting ?
Exploring teather libraries (http://code.google.com/p/android-wifi-tether/) or flashing it to 4.0 ? Will I get an API that allows me to use the card in adhoc mode or I will still need to dig that teather libs ?
The communication I need should be using wifi card when there is no AP present and android phones may get in range and out of range of each other.
I am pretty new to Android development. The language I use for the library is JAVA.
Any links/suggestions/thoughts are very welcome.
Thanks in advance.

A bit of clarification.
I don't need any routing protocol for adhoc. What I mean is if I have 3 nodes that are in range of each other I need them to be able to send packets only to each other.
I don't need the dynamic route discovery algorithms.
In case the current topology is <node a> ---- <node b> ---- <node c> (node A is not in wifi range of node C). In this case node A and C can't communicate.

Questions or Problems Should Not Be Posted in the Development Forum
Please Post in the Correct Forums & Read the Forum Rules
Moving to Q&A

Related

VPN Client implementation specific to application

I wanted to implement the application specific VPN client in android, that is vpn connection once established should be only available to our application and rest of the apps in android device should make use of normal internet connection.
To elaborate my need more, i have an application already which connects to corporate email, files and other data from internet normally but for some security reason we need it to be go through tunnel within our application and access everything within via tunnel basically want we are looking here is security while accessing company corporate network.
Since we are new to something like this we don't have a hint on how to start what protocols to use etc (we are assuming ipsec l2tp for now), any information, hint or redirects to useful resource will be really helpful.
And between we are just looking to send and receive data over tunnel, there is nothing more or need to control computer on the network all we need is to route data through corporate firewall and should support multiple vpn servers such as cisco, microsoft etc. Can any one say how complex or how feasible to implement it.
If your goal is just for establishing a secure connection and not controlling other computers or resource on network how about going with SSL encryption.
You are asking about complexity and i assume you are naive with this technology, as per my knowledge its quite a complex and may account to as big as your present application, Here are few pointers as you may look into: Split tunneling, Low level Network protocols, feasibility of implementation depends on size of your team and their expertise level in socket programming and remember your attempting to accomplish something which is already built into most of the OS and more complex. one of our dev team worked on split tunneling for months finally gave up since client settled for non PPTP application
__________________
Dave
Current Device: Samsung Galaxy Nexus
Fed up of bricking devices

[Q] Simultaneous WiFi (no-data) & 3G (data)

Hi there everyone,
I'm wondering if on an android device there's a way to force it to keep open a wifi connection that is not used for data, for example to a Seagate Goflex Satellite (WiFi HDD) or eye-fi (WiFi SDHC) while also being simultaneously connected to 3G for data. Obviously connecting to 2 wifi connections is out of the question, but thought maybe somewhere out there is someone who 's found a way to do what I'm looking at.
Thanks.
Please use the Q&A Forum for questions &
Read the Forum Rules Ref Posting
Moving to Q&A
lufc said:
Please use the Q&A Forum for questions &
Read the Forum Rules Ref Posting
Moving to Q&A
Click to expand...
Click to collapse
Thanks
Bump
Bump - anyone have any idea?
Thanks.
No-one has any ideas?
Even I am hunting for the same.
Check these links
http://mobisocial.stanford.edu/news...together-by-hacking-connectivityservice-java/
https://gist.github.com/CyanogenMod...a/com/android/server/ConnectivityService.java
I am not sure if it will work though! Coz I find this reply more convincing..
Pallas Says:
April 13, 2012 at 5:58 am
are you sure the packets are going thru both interfaces?
I think it doesn’t work, simply because you would need two default gateways, leading to some hard problems:
- how does the system choose where to send the packets?
- for outgoing packets: unless the two connections have both statically assigned public IP addresses, which is very unlikely, you will end up with two differently NATed paths, and the client will refuse packets coming from two different ip addresses on the same connection.
- for incoming packets: to let the client send packets to both interfaces, you would need to send them from both interfaces with different source ip addresses: it will not work, the client will get confused. and anyway you would need support at the application level.
to solve all this, you’d need to:
- make an ad-hoc application which understands all this and can send chuncks to both interfaces, then merge all the returning chunks. you’d need support at the application level: for example you’d need http byte range support on both client and server
- divide “equally” the single specific connections thru the two gateways. this may work but it’s pretty hard if you do not have access to advanced routing and traffic shaping at the kernel level. may be possible on a phone with custom compiled aosp rom and modified kernel

Different options to avoid 3 Mobile UK tethering block.

Hi everyone,
I am trying to get my head around on what can be done to bypass the tethering filter on 3UK.
Below are different scenarios I have come up with and would like any volunteers who could try out any of the following for me. Of course I will be doing these myself as and when time permits but its always helpful to have others view on it too.
Please and I say please, do not turn this thread into Right and Wrongs of tethering or Terms and conditions of 3 mobile contracts. Please keep your views to yourself regarding if its lawful or unlawful or ethical or unethical or whatever you seem to come up with. I would like this to be a productive thread, instead of random comments on tethering.
Option 1: Use SSH Tunnel * Should I use SSH tunnel on my phone and use my PC to connect to it to use internet. Is there a reverse option?
Option 2: Use OpenVPN Install OpenVPN on your pc, and connect your phone to your pc using default VPN function on your phone in my case GT-I9100 comes with VPN function. You could also try to reverse this method and install OpenVPN on your phone and use your PC to connect to it. *
Option 3: Use the above two together in combination As the heading says, use SSH tunnel to connect to your OpenVPN.
Option 4: Use a proxy on your pc and connect to your phone or reverse, install proxy app on your phone and point your pc web browser to that proxy address. You could use the SSH tunnel here to connect too.
So, tools at hand are vpn with any encryption available, ssh tunnel, proxy server.
Tools to ignore - TOR (onion), garlic based TOR like, changing User Agent on web browsers or paid VPN.
3 UK has two APN settings, three.co.uk for mobiles (NATd ip address) and 3internet (dongle users) has external IP address and I believe it’s an Open NAT or no NAT.
Please feel free to mix and match any options and also share your views on what is technically possible.
I hope to see something useful and learn a bit more. Even if we fail to achieve the desired results, it will still be enlightening to find the facts on how 3 detects tethering.
I
Code encode decode
Found on giff gaff forum useful info
Well, they have a few ways..TTL: In my opinion, the most likely telltale signal of tethering. For example, *iOS packets originate with a TTL of 64, so if they see anything else they know something is up. This is very easy to check, as the TTL is checked by each router as the packet is handled. (the address on the envelope - doesn't require opening the letter, to use an analog analogy)APN: Another possible sign of tethering is data being routed over the access point set up for the built-in tethering feature. But giffgaff does NOT have a separate APN for Tethering. Again, this is easy to check without deep packet inspection.User-agent: This is where carriers would need to get heavy-duty equipment and a willingness to be invasive to detect tethering. Your browser sends information about itself to remote web servers, and this information could be checked. I do not think giffgaff is doing this (to detect tethering at least,) as it is not proof of tethering since anyone can easily use another browser on your phone that reports a different User Agent.Web Sites Visited: Again, highly invasive, though it doesn't require DPI. If you're using the DNS servers of the carrier, they could look for requests for certain domain names like windowsupdate.com etc. This wouldn't be proof either, though.I would bet that they are using TTL. So tunneling the TCP/IP packets that way probably resets the TTL to the default of the WAN interface on the phone.
Code encode decode
Why do you have to make 2 threads for the same subject?
Well I wasn't sure at the time of writing first one if I had to go down the route of testing which the second one is for. So, the first one is literally to know if its happening to new contracts only and second is for testing different scenarios and finding how.
Hope this helps and if not then jog on.
Code encode decode
Invincible29 said:
Hope this helps and if not then jog on.
Click to expand...
Click to collapse
Less of the attitude please and more of the reading of forum rules. Stick to one thread for the same thing.
Thread closed, use the other one (it was created first).

Simulating WiFi device in emulator with mac80211_hwsim kernel module

I am looking to simulate an additional WiFi device in a rooted android emulator (to simulate a device my company makes). So far I have found the linux kernel module, mac80211_hwsim, which seems like it would help me create virtual networks like this. I believe this is also the mechanism that the emulator uses to create its fake wifi network already.
If this is in fact the right way forward, once I create some more channels for that kernel module, I want to be able to connect to a program on my local computer after connected to this other WiFi network (similar to how 10.0.2.2 maps to the host computer). (the redir command looks helpful on the emulator for this)
Does this sound reasonable and does anyone have some tips going forward? It's been challenging to find information that is relevant to Android in this area.

Simulating WiFi device in emulator with mac80211_hwsim kernel module

I am looking to simulate an additional WiFi device in a rooted android emulator (to simulate a device my company makes). So far I have found the linux kernel module, mac80211_hwsim, which seems like it would help me create virtual networks like this. I believe this is also the mechanism that the emulator uses to create its fake wifi network already.
If this is in fact the right way forward, once I create some more channels for that kernel module, I want to be able to connect to a program on my local computer after connected to this other WiFi network (similar to how 10.0.2.2 maps to the host computer). (redir emulator command looks helpful)
Does this sound reasonable and does anyone have some tips going forward? It's been challenging to find information that is relevant to Android in this area.

Categories

Resources