• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Samsung Galaxy as a router wifi

gianpaolof

Lurker
Mar 25, 2011
4
0
Hello!
I've been looking through the net but could not find an answer to my problem.
Hope someone can help me here.

1)I have Samsung Galaxy (2.2) configured as a Router WiFi to which I connect an embedded device. So far, no problem.
After that, I'd like to have the 2 guys (phone and device) talking over the just created WiFi link. So, on the Samsung I've installed a simple apk that does a HttpGet towards the device. HttpGet fails ("network is unreachable").
2)If I connect the Samsung and the device to an external WiFi access point, everything works.

So, my question: configuration 1) is feasible?

best regards
Gianpaolo
 
Hello
this is the logcat of my app. Highlighted in green the trace of my app:

03-29 11:13:59.031: DEBUG/AndroidHttpClient(5969): onStart
03-29 11:13:59.031: DEBUG/AndroidHttpClient(5969): onResume

03-29 11:13:59.153: ERROR/AxT9IME(2558): WordSymbInit: 1
03-29 11:13:59.223: INFO/ActivityManager(2465): Displayed activity iot.android.httpclient/.AndroidHttpClientActivity: 2637 ms (total 2637 ms)
03-29 11:13:59.696: DEBUG/dalvikvm(2558): GC_EXTERNAL_ALLOC freed 3092 objects / 162456 bytes in 67ms
03-29 11:13:59.746: INFO/AxT9IME(2558): This Action is set with 'IME_FLAG_NO_ENTER_ACTION'
03-29 11:14:00.172: DEBUG/Tethering(2465): TetherModeAliveState.processMessage what=4
03-29 11:14:00.180: DEBUG/Tethering(2465): TetherModeAliveState.processMessage what=4
03-29 11:14:00.188: DEBUG/Tethering(2465): TetherModeAliveState.processMessage what=4
03-29 11:14:00.289: DEBUG/Tethering(2465): TetherModeAliveState.processMessage what=4
03-29 11:14:00.309: DEBUG/ConnectivityService(2465): ConnectivityService FeatureUser expire(0, enableHIPRI, android.os.Binder@483543e8), created 60002 mSec ago
03-29 11:14:00.309: DEBUG/ConnectivityService(2465): stopUsingNetworkFeature for net 0: enableHIPRI
03-29 11:14:00.309: DEBUG/ConnectivityService(2465): ignoring stopUsingNetworkFeature as dup is found
03-29 11:14:00.375: DEBUG/ConnectivityService(2465): ConnectivityService FeatureUser expire(0, enableHIPRI, android.os.Binder@4816ce08), created 60001 mSec ago
03-29 11:14:00.375: DEBUG/ConnectivityService(2465): stopUsingNetworkFeature for net 0: enableHIPRI
03-29 11:14:00.375: DEBUG/ConnectivityService(2465): ignoring stopUsingNetworkFeature as dup is found
03-29 11:14:00.461: DEBUG/Tethering(2465): TetherModeAliveState.processMessage what=4
03-29 11:14:00.551: DEBUG/ConnectivityService(2465): ConnectivityService FeatureUser expire(0, enableHIPRI, android.os.Binder@483759f0), created 60001 mSec ago
03-29 11:14:00.551: DEBUG/ConnectivityService(2465): stopUsingNetworkFeature for net 0: enableHIPRI
03-29 11:14:00.551: DEBUG/ConnectivityService(2465): ignoring stopUsingNetworkFeature as dup is found
03-29 11:14:00.701: DEBUG/Tethering(2465): TetherModeAliveState.processMessage what=4
03-29 11:14:00.862: DEBUG/Tethering(2465): TetherModeAliveState.processMessage what=5
03-29 11:14:00.906: DEBUG/ConnectivityService(2465): ConnectivityService FeatureUser expire(0, enableHIPRI, android.os.Binder@482c6ab0), created 60001 mSec ago
03-29 11:14:00.906: DEBUG/ConnectivityService(2465): stopUsingNetworkFeature for net 0: enableHIPRI
03-29 11:14:00.906: DEBUG/ConnectivityService(2465): ignoring stopUsingNetworkFeature as dup is found
03-29 11:14:00.938: DEBUG/Tethering(2465): MultiplePDP regex = null
03-29 11:14:00.942: DEBUG/Tethering(2465): chooseUpstreamType(true), dunRequired =false, iface=null
03-29 11:14:00.942: DEBUG/ConnectivityService(2465): startUsingNetworkFeature for net 0: enableHIPRI
03-29 11:14:00.945: DEBUG/ConnectivityService(2465): getMobileDataEnabled returning true
03-29 11:14:00.949: DEBUG/Tethering(2465): notifying tethered with iface =null
03-29 11:14:00.949: DEBUG/Tethering(2465): TetherModeAliveState.processMessage what=5
03-29 11:14:00.949: DEBUG/ConnectivityService(2465): special network already connecting
03-29 11:14:00.988: DEBUG/Tethering(2465): MultiplePDP regex = null
03-29 11:14:00.988: DEBUG/Tethering(2465): chooseUpstreamType(false), dunRequired =false, iface=null
03-29 11:14:00.988: DEBUG/Tethering(2465): notifying tethered with iface =null
03-29 11:14:00.988: DEBUG/Tethering(2465): TetherModeAliveState.processMessage what=5
03-29 11:14:01.024: DEBUG/Tethering(2465): MultiplePDP regex = null
03-29 11:14:01.028: DEBUG/Tethering(2465): chooseUpstreamType(true), dunRequired =false, iface=null
03-29 11:14:01.028: DEBUG/Tethering(2465): notifying tethered with iface =null
03-29 11:14:01.028: DEBUG/ConnectivityService(2465): startUsingNetworkFeature for net 0: enableHIPRI
03-29 11:14:01.028: DEBUG/ConnectivityService(2465): getMobileDataEnabled returning true
03-29 11:14:01.028: DEBUG/ConnectivityService(2465): special network already connecting
03-29 11:14:01.031: DEBUG/Tethering(2465): TetheredState.processMessage what=12
03-29 11:14:01.031: DEBUG/Tethering(2465): TetheredState.processMessage what=12
03-29 11:14:01.035: DEBUG/Tethering(2465): TetheredState.processMessage what=12
03-29 11:14:01.060: DEBUG/Tethering(2465): TetherModeAliveState.processMessage what=4
03-29 11:14:01.060: DEBUG/Tethering(2465): renewing mobile connection - requeuing for another 40000ms
03-29 11:14:01.060: DEBUG/ConnectivityService(2465): startUsingNetworkFeature for net 0: enableHIPRI
03-29 11:14:01.060: DEBUG/ConnectivityService(2465): getMobileDataEnabled returning true
03-29 11:14:01.060: DEBUG/ConnectivityService(2465): special network already connecting
03-29 11:14:01.176: DEBUG/Tethering(2465): TetherModeAliveState.processMessage what=5
03-29 11:14:01.215: DEBUG/Tethering(2465): MultiplePDP regex = null
03-29 11:14:01.215: DEBUG/Tethering(2465): chooseUpstreamType(false), dunRequired =false, iface=null
03-29 11:14:01.215: DEBUG/Tethering(2465): notifying tethered with iface =null
03-29 11:14:01.219: DEBUG/Tethering(2465): TetheredState.processMessage what=12
03-29 11:14:01.977: VERBOSE/InputDevice(2465): ID[0]=0(0) Dn(0=>1)
03-29 11:14:01.981: VERBOSE/WindowManager(2465): Dsptch > Window{48252f50 iot.android.httpclient/iot.android.httpclient.AndroidHttpClientActivity paused=false}
03-29 11:14:01.981: INFO/PowerManagerService(2465): Ulight 1->3|0
03-29 11:14:01.981: INFO/PowerManagerService(2465): Setting target 2: cur=20.0 target=116 delta=6.4 nominalCurrentValue=20
03-29 11:14:01.981: INFO/PowerManagerService(2465): Scheduling light animator!
03-29 11:14:02.133: VERBOSE/WindowManager(2465): Dsptch > Window{48252f50 iot.android.httpclient/iot.android.httpclient.AndroidHttpClientActivity paused=false}
03-29 11:14:02.133: VERBOSE/InputDevice(2465): ID[0]=0(0) Up(1=>0)
03-29 11:14:02.153: DEBUG/AndroidHttpClient onClick(5969): START
03-29 11:14:02.153: DEBUG/AndroidHttpClient getRequest(5969): START

03-29 11:14:02.199: DEBUG/AudioHardwareALSA(2358): ALSA OPEN mode 0,device 2
03-29 11:14:02.199: INFO/AudioHardwareALSA(2358): Try to open ALSA PLAYBACK device AndroidPlayback_Speaker_normal
03-29 11:14:02.227: INFO/AudioHardwareALSA(2358): Initialized ALSA PLAYBACK device AndroidPlayback_Speaker_normal
03-29 11:14:02.227: DEBUG/AudioHardwareALSA(2358): Set PLAYBACK PCM format to S16_LE (Signed 16 bit Little Endian)
03-29 11:14:02.227: DEBUG/AudioHardwareALSA(2358): Using 2 channels for PLAYBACK.
03-29 11:14:02.227: DEBUG/AudioHardwareALSA(2358): Set PLAYBACK sample rate to 44100 HZ
03-29 11:14:02.227: DEBUG/AudioHardwareALSA(2358): Buffer size: 2048
03-29 11:14:02.227: DEBUG/AudioHardwareALSA(2358): Latency: 46439
03-29 11:14:02.297: INFO/PowerManagerService(2465): Light Animator Finished curIntValue=116
03-29 11:14:02.332: DEBUG/getRequest(5969): Network unreachable
03-29 11:14:02.332: DEBUG/AndroidHttpClient getRequest(5969): END
03-29 11:14:02.332: DEBUG/AndroidHttpClient onClick(5969): END



This is the code of the getRequest() where the exception is thrown:

try{
HttpResponse response = client.execute(request);
txtResult.setText(HttpHelper.request(response));

}catch(Exception ex){
txtResult.setText(ex.getMessage());
Log.d("getRequest", ex.getMessage());
}
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones