Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple Network Interfaces #29

Open
ahorseman opened this issue Jun 28, 2020 · 2 comments
Open

Multiple Network Interfaces #29

ahorseman opened this issue Jun 28, 2020 · 2 comments

Comments

@ahorseman
Copy link

Hello,

first of all thank you for this great piece of work!

I have a small question regarding systems with multiple interfaces. I run my broadlink devices on a separate network, such that they have no access to the internet. This means I have two ethernet devices in my machine - one to the outside world and one for the internal network.

Is there a way to tell the discoverDevices method (and essentially the whole library) to use only one of the to network interfaces? I haven't found yet a way to do so, but might have just overseen it.

Thanks a lot for any enlightenment.

@a1aw
Copy link
Owner

a1aw commented Aug 27, 2020

Currently, BLDevice does not provide a way to bind the DatagramSocket to a specific network interface, and the socket instance is not exposed. It is possible to do that with an API change providing a way to bind a SocketAddress to the socket. Maybe I will make a contribution to make this working.

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

No branches or pull requests

2 participants