Not able to find devices on the network
shubham-srivastava-goku opened this issue · 3 comments
shubham-srivastava-goku commented
I am trying to get all devices on the network.
Here is my code:
//imported the lib
const Client = require('react-native-ssdp').Client;
//In componentDidMount, created the client and started search.
componentDidMount() {
var client = new Client();
client.on('response', function (headers, statusCode, rinfo) {
console.log('Got a response to an m-search.', rinfo);
});
client.search('ssdp:all');
}
Below is windows ssdp result[Same network as mobile]:
Please guide me if I'm doing something wrong.
Thanks in advance.
jsdario commented
Which version / OS / Platform are you on?
Are you on Android? If so try to run adb logcat
. You may filter your app output if you wish. There might be some insights there.
shubham-srivastava-goku commented
@jsdario I checked logcat
too, didn't get anything. It says bound to address 0.0.0.0 port 0
. After this no logs came.
Here is the log for more insight.
07-24 09:12:16.192 7384-7417/? D/ApplicationLoaders: ignored Vulkan layer search path /data/app/com.android.chrome-2/lib/arm:/data/app/com.android.chrome-2/base.apk!/lib/armeabi-v7a for namespace 0xb4111090
07-24 09:12:16.200 7384-7417/? I/WebViewFactory: Loading com.android.chrome version 67.0.3396.87 (code 339608702)
07-24 09:12:16.279 7384-7417/? I/cr_LibraryLoader: Time to load native libraries: 6 ms (timestamps 5012-5018)
07-24 09:12:16.287 7384-7417/com.ssdptest I/chromium: [INFO:library_loader_hooks.cc(36)] Chromium logging enabled: level = 0, default verbosity = 0
07-24 09:12:16.287 7384-7417/com.ssdptest I/cr_LibraryLoader: Expected native library version number "67.0.3396.87", actual native library version number "67.0.3396.87"
07-24 09:12:16.558 7384-7416/com.ssdptest I/ReactNativeJS: Running application "SSDPTest" with appParams: {"rootTag":1}. __DEV__ === true, development-level warning are ON, performance optimizations are OFF
07-24 09:12:16.699 7384-7416/com.ssdptest I/ReactNativeJS: 'socket-0', 'binding, address:', '0.0.0.0', 'port:', 0
07-24 09:12:16.713 7384-7416/com.ssdptest I/ReactNativeJS: 'socket-0', 'bound to address:', '0.0.0.0', 'port:', 0
07-24 09:12:49.059 7384-7389/com.ssdptest I/art: Do partial code cache collection, code=30KB, data=30KB
07-24 09:12:49.060 7384-7389/com.ssdptest I/art: After code cache collection, code=30KB, data=30KB
vanelo commented
@shubham-srivastava-goku
How did you solve this 'socket-0', 'binding, address:', '0.0.0.0', 'port:', 0
?