Skip to content
This repository has been archived by the owner on Dec 29, 2019. It is now read-only.

discoverNetworkServices not finding any, if left idle for 1-2 minutes #26

Open
abselt opened this issue Apr 25, 2017 · 6 comments
Open

Comments

@abselt
Copy link

abselt commented Apr 25, 2017

Everything works fine in all cases but not
when ClientApp starts and the HostApp starts after it by more than 1-2 minutes
-if it starts immediately it works fine-
despite ClientApp is still discovering i added a handler ever x seconds to check if isDiscovering and it is true but its like the service"device" wont be found, may be the services list is not refreshing please help with this

@abselt
Copy link
Author

abselt commented Apr 25, 2017

solved by moving manger.discoverServices(.. into a Handler run every 5sec the problem is both devices must making descovery method at the same time n order to connect to each other

@neatorobito
Copy link
Owner

That's odd since startNetworkService calls discoverServices. Nonetheless, would you mind submitting a pull request with the fix? Thank you for your work!

@abselt
Copy link
Author

abselt commented Apr 26, 2017

it's still unreliable sometimes on diveces rinning marshmillo it would't connect without recreating the client activity should I recreate Salut instance onFail of something

@abselt
Copy link
Author

abselt commented Apr 26, 2017

aha I just saw
wifiInfo.getMacAddress() in salut
once I was getting the mac address and after some stackoverflow search it appears that this wont work on marshmillo so i used another way and it works
so does the mac address in salut have a hand in establishing the connection does it effect?

@abselt
Copy link
Author

abselt commented Apr 26, 2017

another note that device.instanceName of discovered device print same as device.readableName

@neatorobito
Copy link
Owner

neatorobito commented Apr 26, 2017

Yup, try recreating the Salut instance. And yes, mac addresses have a hand in establishing a connection. Mac addresses are how the devices connect when not in a group. I didn't know that the API changed in Marshmallow. As for the second issue, I've found the line. Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants