Closed Bug 751460 Opened 12 years ago Closed 12 years ago

Support WiFi Tethering

Categories

(Firefox OS Graveyard :: General, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(blocking-kilimanjaro:+, blocking-basecamp:+)

RESOLVED DUPLICATE of bug 735547
blocking-kilimanjaro +
blocking-basecamp +

People

(Reporter: vchang, Assigned: vchang)

References

Details

Adding wifi tethering support to b2g backend. Also require APIs for enable/disable Tethering. Depending on if we need to export more network configuration to user, we may have APIs for nat, ipforward, dnsmasq, softap.... Actually, netd in android deals with network stuff very well.
Blocks: 735172
Assignee: nobody → vchang
Below are commands that Android talking to netd to start/stop tethering.

1. Start tethering
"softap fwreload wlan0 AP"
"softap start wlan0"
"softap set wlan0 wl0.1 hotspot456 open null 6 0 8"
"softap startap"
"interface getcfg wlan0"
"interface setcfg wlan0 192.168.43.1 24 [up]"
"tether interface add wlan0"
"ipfwd enable"
"tether start 192.168.43.2 192.168.43.254"
"tether dns set 10.177.0.34 10.180.12.172"
"nat enable wlan0 rmnet0 2 fe80::/64 192.168.43.0/24"

2. Stop tethering
"interface getcfg wlan0"
"interface setcfg wlan0 0.0.0.0 0 [up broadcast running multicast]"
"softap stopap"
"softap stop wlan0"
"softap fwreload wlan0 STA"
"nat disable wlan0 rmnet0 0" 
"tether interface remove wlan0"
"tether stop"
"ipfwd disable"

I tried on SGS2-ICS, and can run an Wifi AP and let PC to connect Wifi.  Havn't configured 3G to test whole tethering yet.
One thing need to mention, sending "softap startap" directly to netd seems has some problems.  I have to replace it with the real shell command "/system/bin/hostapd -B -e /data/misc/wifi/entropy.bin /data/misc/wifi/hostapd.conf" to really start the AP.  This is something need to check.
The patches related to the wifi tethering are attached in Bug 735547-support USB tethering.
blocking-basecamp: --- → ?
blocking-basecamp: ? → +
blocking-kilimanjaro: --- → +
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.