Giter Club home page Giter Club logo

Comments (6)

rolandjitsu avatar rolandjitsu commented on August 30, 2024 1

No worries. I might not be able to use WiFi Direct for what I'm trying to do anyway. But thanks for trying to help.

from react-native-wifi-p2p.

kirillzyusko avatar kirillzyusko commented on August 30, 2024

@io-pan First of all I would like to recommend trying to detect S6 from S9 and S9 from S6 (without wifi-printer). These devices support WiFi direct mode, so you can try to enable this mode on one device, and try to find from another. And then switch role. Also I don't recommend using getAvailablePeers, since I added this method as temporary. Best approach for detecting devices is using subscription methods, like subscribeOnPeersUpdates. Callback, that passes into this methos will always call, when info about available peers has changed. I know, that it works with delay, but it's not my blame. I've only written bridge between native code and JS.
And in fact, yes, I've also faced with this problem. I have Xiaomi Redmi Note 5 Pro (android 8.1) and Prestigio 4500T (android 4.2). And 4500T can see Note 5 Pro, but on Note 5 Pro I can't see my 4500T. And I don't know a reason of such behaviour.

from react-native-wifi-p2p.

rolandjitsu avatar rolandjitsu commented on August 30, 2024

@kirillzyusko I am having the same problem ... Subscriptions also give me an empty list of devices. Running on an Google Pixel 3, latest Android.

from react-native-wifi-p2p.

kirillzyusko avatar kirillzyusko commented on August 30, 2024

@rolandjitsu What is the second device, which you are trying to find? Are you sure, that WiFi direct mode is enabled on both devices?

from react-native-wifi-p2p.

rolandjitsu avatar rolandjitsu commented on August 30, 2024

The second device is a Raspberry Pi 3 configured using wpa_supplicant. Using Android's Wifi Direct search (it's in the phone's settings) I can see the device.

This libs is discovering but it doesn't show me the devices.

from react-native-wifi-p2p.

kirillzyusko avatar kirillzyusko commented on August 30, 2024

@rolandjitsu I got it. You know I have faced with the same problem. When I have been testing my library, I've found, that I could detect my new phone from my old, but not vice versa. And from Android settings I was able to see, and there everything worked as expected. To be honest I don't know why it happened. And also I don't know even reason. Maybe I did a mistake in my code. But I don't so think, since I just copied official documentation and pasted it. And during my testing I thought it is only my specific problem. But you are not the first user, who reported me similar issue. Really I don't know even a cause of such behaviour. And I think, unfortunately, I can't help here :(

from react-native-wifi-p2p.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.