[Desire Android Development] Kremlin987:
OK, great! I'll try it out with a 3rd-party toggle (I've always had success with the original Wired Tether app from google code), and let you know how it goes.

Actually, I am still having problems with wired tether dropping out whenever I receive an MMS, and I haven't been able to work it out yet. A reboot fixes the problem, but it seems like the wireless interface itself gets corrupted somehow and the system can no longer talk to it properly. Unfortunately, I'm not near an AP so I can't try to connect to it after receiving an MMS, but the Wireless Tether (AP mode) doesn't work.

I get this in my logcat:

W/NetworkStats( 208): found non-monotonic values; saving to dropbox
I/WifiAp ( 282): Setting: true
I/WifiAp ( 282): Async Setting: true
D/ToolboxWidget( 282): updateWidgetView
D/SoftapController( 139): Softap fwReload - Ok
D/SoftapController( 139): Softap driver start: 0
E/SoftapController( 139): Softap set - failed: -1
E/WifiStateMachine( 208): Exception in softap start java.lang.IllegalStateException: Error communicating to native daemon to start softap
E/SoftapController( 139): Softap already stopped
D/SoftapController( 139): Softap driver stop: 0
D/SoftapController( 139): Softap fwReload - Ok
D/SoftapController( 139): Softap fwReload - Ok
D/SoftapController( 139): Softap driver start: 0
D/SoftapController( 139): Softap set - Ok
D/Tethering( 208): InitialState.processMessage what=4
D/Tethering( 208): sendTetherStateChangedBroadcast 0, 0, 0
W/NetworkStats( 208): dropping UID delta from unknown iface: iface=wlan0 uid=0 set=DEFAULT tag=0x0 rxBytes=0 rxPackets=0 txBytes=196 txPackets=3 operations=0
W/NetworkStats( 208): found non-monotonic values; saving to dropbox
D/Tethering( 208): sendTetherStateChangedBroadcast 1, 0, 0
W/NetworkStats( 208): dropping UID delta from unknown iface: iface=wlan0 uid=0 set=DEFAULT tag=0x0 rxBytes=0 rxPackets=0 txBytes=76 txPackets=1 operations=0
W/NetworkStats( 208): found non-monotonic values; saving to dropbox
D/SoftapController( 139): Softap startap - Ok
D/NetworkManagementService( 208): rsp <213 02:1a:11:fc:db:4d 0.0.0.0 0 [up broadcast running multicast]>
D/CommandListener( 139): Setting iface cfg
D/CommandListener( 139): Trying to bring up wl0.1
D/Tethering( 208): Tethering wl0.1
D/Tethering( 208): InitialState.processMessage what=2
D/NetworkManagementService( 208): flags <[up broadcast running multicast]>
D/Tethering( 208): sendTetherStateChangedBroadcast 0, 0, 0
D/Tethering( 208): Tethered wl0.1
D/Tethering( 208): sendTetherStateChangedBroadcast 0, 1, 0
D/Tethering( 208): TetherModeAliveState.processMessage what=1
D/Tethering( 208): TetheredState.processMessage what=12
E/NatController( 139): IP rule -4 rule add from 192.168.43.0/24 table 60 got 512
E/NatController( 139): IP route route add 192.168.43.0/24 dev wl0.1 table 60 got 512
W/NetworkStats( 208): dropping UID delta from unknown iface: iface=wl0.1 uid=0 set=DEFAULT tag=0x0 rxBytes=0 rxPackets=0 txBytes=76 txPackets=1 operations=0
D/ToolboxWidget( 282): updateWidgetView
E/NatController( 139): Error setting forward rules
E/NetworkManagementService( 208): enableNat got Exception com.android.server.NativeDaemonConnectorException: Cmd {nat enable wl0.1 rmnet0 2 fe80::/64 192.168.43.0/24} failed with code 400 : {Nat operation failed (No such device)}
E/Tethering( 208): Exception enabling Nat: java.lang.IllegalStateException: Unable to communicate to native daemon for enabling NAT interface
E/WifiStateMachine( 208): Tethering reports wifi as untethered!, shut down soft Ap
D/CommandListener( 139): Setting iface cfg
D/CommandListener( 139): Trying to bring up wlan0
D/CommandListener( 139): broadcast flag ignored
D/Tethering( 208): sendTetherStateChangedBroadcast 0, 0, 1
D/NetworkManagementService( 208): rsp <213 90:21:55:64:a8:11 0.0.0.0 0 [up broadcast running multicast]>
D/NetworkManagementService( 208): flags <[up broadcast running multicast]>
E/WifiStateMachine( 208): Error resetting interface wlan0, :java.lang.IllegalStateException: Unable to communicate with native daemon to interface setcfg - com.android.server.NativeDaemonConnectorException: Cmd {interface setcfg wlan0 0.0.0.0 0 [up broadcast running multicast]} failed with code 501 : {Flag unsupported}
D/Tethering( 208): Untethering wl0.1
E/Tethering( 208): Tried to Untethered an errored iface :wl0.1, ignoring
E/WifiStateMachine( 208): Untether initiate failed!
W/NetworkStats( 208): found non-monotonic values; saving to dropbox
D/dalvikvm( 208): JIT code cache reset in 3 ms (1048540 bytes 36/0)
D/dalvikvm( 208): GC_CONCURRENT freed 2006K, 40% free 13216K/21827K, paused 3ms+14ms
W/NetworkStats( 208): dropping UID delta from unknown iface: iface=wl0.1 uid=0 set=DEFAULT tag=0x0 rxBytes=0 rxPackets=0 txBytes=64 txPackets=1 operations=0
D/ToolboxWidget( 282): updateWidgetView
W/NetworkStats( 208): found non-monotonic values; saving to dropbox
W/NetworkStats( 208): found non-monotonic values; saving to dropbox
E/WifiStateMachine( 208): Failed to get tether update, force stop access point
D/Tethering( 208): InitialState.processMessage what=4
D/Tethering( 208): sendTetherStateChangedBroadcast 0, 0, 0
W/Netd ( 139): No subsystem found in netlink event
D/NetlinkEvent( 139): Unexpected netlink message. type=0x11
D/SoftapController( 139): Softap service stopped: 0
D/Tethering( 208): sendTetherStateChangedBroadcast 1, 0, 0
W/NetworkStats( 208): dropping UID delta from unknown iface: iface=wl0.1 uid=0 set=DEFAULT tag=0x0 rxBytes=0 rxPackets=0 txBytes=132 txPackets=2 operations=0
W/NetworkStats( 208): dropping UID delta from unknown iface: iface=wlan0 uid=0 set=DEFAULT tag=0x0 rxBytes=0 rxPackets=0 txBytes=56 txPackets=1 operations=0
W/NetworkStats( 208): found non-monotonic values; saving to dropbox
W/NetworkStats( 208): found non-monotonic values; saving to dropbox
D/SoftapController( 139): Softap driver stop: 0
D/SoftapController( 139): Softap fwReload - Ok
W/Netd ( 139): No subsystem found in netlink event
D/NetlinkEvent( 139): Unexpected netlink message. type=0x11
D/ToolboxWidget( 282): updateWidgetView

Next time it happens, I can try to go in via adb shell and see what processes are running, what the interface looks like (assuming ifconfig etc. are available). Data still works even when tethering doesn't (phone's browser can load pages, etc.) so it looks to be a problem with the wireless network interface.

I'm running stock (Drewis) kernel, Smartassv2 governor, stock a2sd (y/y/y), I may have installed the modified dhclient to get around the wifi issue, but this also happened even with stock dhclient since version 0.8, so I don't think that's causing the issue for me. My APN is a combined TYPE default,supl,mms - that shouldn't cause problems normally but it might be a clue for debugging purposes.

Going to check out USB tether now :D

Edit: Actually, when I checked the APN settings to write this post, it caused the tethering system to error out and then not re-enable. The pertinent logcat lines:

I/ActivityManager( 209): Displayed com.android.settings/.ApnSettings: +1s330ms
I/ApnPreference( 1797): ID: 1023 :true
I/ActivityManager( 209): START {act=android.intent.action.EDIT dat=content://telephony/carriers/1023 cmp=com.android.settings/.ApnEditor} from pid 1797
I/ActivityManager( 209): Displayed com.android.settings/.ApnEditor: +453ms
W/NetworkStats( 209): dropping UID delta from unknown iface: iface=wl0.1 uid=0 set=DEFAULT tag=0x0 rxBytes=70 rxPackets=1 txBytes=122 txPackets=1 operations=0

I/power ( 209): *** set_screen_state 0
D/SurfaceFlinger( 143): About to give-up screen, flinger = 0xc8e918

D/ConnectivityService( 209): ConnectivityChange for mobile: DISCONNECTED/DISCONNECTED
D/ConnectivityService( 209): Attempting to switch to wifi
D/ConnectivityService( 209): Attempting to switch to BLUETOOTH_TETHER
E/ConnectivityService( 209): Exception trying to remove a route: java.lang.IllegalStateException: Unable to communicate with native dameon to add routes - com.android.server.NativeDaemonConnectorException: Cmd {interface route remove rmnet0 default 126.243.11.145 32 0.0.0.0} failed with code 400 : {Failed to remove route from default table (No such process)}

The data connection then came back (ConnectivityChange for mobile: CONNECTED/CONNECTED) but the tether was broken.

I'll have to test USB tether some more (on a fresh reboot) but when I tried using it immediately after, it connected, and I was able to use DNS, but I couldn't get any data flow. It could just be the old version of USB tether that I was testing, or the phone needing a reboot though, so i'll try those things next.