1. Download our Official Android App: Forums for Android!

Samsung Galaxy as a router wifi

Discussion in 'Android Apps & Games' started by gianpaolof, Mar 25, 2011.

  1. gianpaolof

    gianpaolof Lurker
    Thread Starter
    Rank:
    None
    Points:
    5
    Posts:
    4
    Joined:
    Mar 25, 2011

    Mar 25, 2011
    4
    0
    5
    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
     

    Advertisement

  2. gianpaolof

    gianpaolof Lurker
    Thread Starter
    Rank:
    None
    Points:
    5
    Posts:
    4
    Joined:
    Mar 25, 2011

    Mar 25, 2011
    4
    0
    5
    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());
    }
     
  3. Szadzik

    Szadzik Android Expert
    Rank:
    None
    Points:
    223
    Posts:
    5,413
    Joined:
    Feb 15, 2010

    Feb 15, 2010
    5,413
    715
    223
    Male
    FAS Admin
    Maybe, and I mean maybe, your phone cannot work as a hotspot and a client at the same time?
     
  4. gianpaolof

    gianpaolof Lurker
    Thread Starter
    Rank:
    None
    Points:
    5
    Posts:
    4
    Joined:
    Mar 25, 2011

    Mar 25, 2011
    4
    0
    5
    Hi Szadik,
    I think you are right. In your opinion, is there a definitive test I can do to show my boss that this configuration won't ever work?

    regards
    Gianpaolo
     
  5. gianpaolof

    gianpaolof Lurker
    Thread Starter
    Rank:
    None
    Points:
    5
    Posts:
    4
    Joined:
    Mar 25, 2011

    Mar 25, 2011
    4
    0
    5
    SOLVED: my fault: the ip address of the embedded device was out of range with respect to the address given by the mobile phone and so the could not talk.

    thanks a lot
     

Share This Page

Loading...