2

Recent versions of Samsung devices (at least to my knowledge) are equipped with a rather unique feature called "WiFi Profile share" or just Wi-Fi Sharing.

My little understanding of this feature suggest that, a WiFi connection is "shared over WiFi" unlike traditional hotspot feature which shares mobile data (3g, 4g etc.)

I would like to know how this idea of rebroadcasting a WiFi connection works. In most desktop environments this is achieved through an implemenation of virtual wlan drivers, which then are used to rebroadcast/share a given connection through another SSID.

My question is how is this achieved in android through this feature (WiFi profile share)? Is a new interface apart from wlan0 created? Perhaps with Wi-Fi direct?

I understand it is not possible to have two concurrent wireless connections via the same interface (which is why WiFi functionality is disabled when mobile hospot is active)


The rationale of asking this question was that I wanted to achieve the same from my Android tablet to my beloved Symbian device (i.e Share Wi-Fi from my Android tablet to my Symbian device "over wi-fi" because the latter can't connect to captive portal wi-fi networks)

4

After a lot of digging the clue came from Wi-Fi Direct.

The concept explained

Wi-Fi direct is a wireless standard that allows creation of a connection between any two devices without a wireless access point (or going through a router).

Wi-Fi direct uses a Wi-Fi protected setup (WPS) protocol when connecting two devices.

  • Additional protocols have been created to make Wi-Fi direct more useful such as Universal Plug and Play, Zero Configuration and Device Profile for Web services.

  • More importantly when a p2p connection is formed over Wi-Fi, the device continues to maintain the uplink connection over any other network for internet connectivity on this device.

  • Wi-Fi direct uses a concept called software access points (Soft AP) which makes it possible for a device to act as both the access point that the Wi-Fi comes from and the client that uses it".

The Soft AP provides a version of Wi-Fi protected Setup with its push button or PIN based setup.

WiFi direct and IP address

In Android, the WiFiP2pMangerclass (provides the API for managing Wi-Fi peer-to-peer connectivity) assigns IP address to every Group Owner which is 192.168.49.1, and uses the 192.168.49.0/24 pool in DHCP to assign addresses to devices that join the Group Owner.

Wi-Fi direct is a single hop radio communication, however supports multi-hop radio communications, with intermediate Wi-Fi nodes as packet relays.

  • There is a little backdraw with this setup, as traffic wont be routed over multiple hops as they do have the same IP space. Now here comes the implementation of a tunneling proxy that allows passing requests and responses to the connected clients (which would foward the connection to connected clients)

Given my limited programming skills, this research has enlightened me, and allowed me to visualise how these great concepts have been incorporated into one of the the excellent application I have been looking for, to ease the burden of trying to tether a "wi-fi connection over wi-fi".


The workaround

To cut the long story short, I ended up getting an application using a similar concept NetShare tethering (no root) application as a solution to the problem addresed.

  • Apart from other "extra" features it offers, I was only interesting in this WLAN direct via proxy concept.

Now this application uses a vpn proxy to route traffic from device connected to Wi-Fi network to another client via a p2p connectivity.

  • Essentially, it uses a HTTP proxy to route traffic to the client and configuring the connection is fairly easy:

  • Go to connection settings of any device e.g PC, Iphone etc (but in this case used a Symbian device)

  • Add the wireless acess point if not done already, and input the Wi-Fi direct Group password.

  • Under advanced settings change proxy settings:

    Server: 192.168.49.1

    Port: 8282

    (remember to allow this port on firewall settings for other devices)

enter image description here

Remarks: While I couldn't get into whole detail of how Wi-Fi profile share in Samsung devices works, this research has helped me see a similar concept impemented in other ways to achieve the ultimate goal (Sharing a Wi-Fi connection over Wi-Fi or at least over Wi-Fi Direct)

Disclaimer: I am not affiliated with this application in any way, but it was an answer to my question hence why I explained my research.

References

  1. Share internet by using WiFi-direct Android
  2. How Wi-Fi Direct Works As A Gateway To The Internet Of Things
  3. Assigning Wifi Direct Group Owner's IP address in Android
  4. How to get each device's IP address in Wi-Fi Direct scenario?
  5. Wi-Fi Direct
  6. Multi-hop routing
  7. Proxy Server

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.