Tethering control

The Tether Manager listens for commands on the /pps/services/tethering/control object. If we want to observe responses from the tetherman service, we need to force the shell to keep the file descriptor open (because this is a server object). In the following example, we use the exec command to do this, then direct the response messages to stderr. After this, we send a start command to start a tethering session:

# (exec 3<>/pps/services/tethering/control && cat >&3 && sleep 1 && cat <&3)<<END
msg::start
id::123
dat::{"lantype":"wlanap","lancfg":{"gateway_address":"192.168.0.15",
    "gateway_subnet":"255.255.255.0","dhcp_lease_time":120},"wantype":"bridge",
    "profile":{"ssid":"car_Hotspot","security_type":"wpa_mixed","passphrase":"openseseme",
    "max_num_sta":5,"privacy":true,"block_conn":false}}
END

For a full description of the contents of this object, see the entry for /pps/services/tethering/control in the PPS Objects Reference.