-
Notifications
You must be signed in to change notification settings - Fork 20
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
Not working on asuswrt/merlinwrt #8
Comments
I do not think this has anything to do with the router but something to do
with the OS. It works fine on my laptop running Manjaro but has the same
problem running (IIRC) Linux Mint. Or maybe that's Ubuntu Mate. (Same
laptop, dual boot.) It also runs on my file server running Debian Jessie.
I'm working on the same functionality using Go and it has the same problem
so it's not even a language issue but probably relates to the network stack
or a library shared between Go and Python. The discovery function depends
on UDP broadcast so when I get around to it, that's the first place I'll
look.
…On Wed, Dec 7, 2016 at 7:30 AM, siborg ***@***.***> wrote:
Thanks for the module it's excellent and it does what is says on the tin!
It works fine on my desktop but fails to work in python3 environment on my
home router (running asuswrt/mertinwrt) with entware. The module installs
fine with easy-install but when trying to run the simple on/off switch
operation it fails the mac discovery with the following errors:
Traceback (most recent call last):
File "/opt/bin/spoff", line 3, in <module>
displays = S20("192.168.1.89")
File "/opt/lib/python3.5/site-packages/orvibo-1.1.1-py3.5.egg/orvibo/s20.py", line 137, in __init__
File "/opt/lib/python3.5/site-packages/orvibo-1.1.1-py3.5.egg/orvibo/s20.py", line 187, in _discover_mac
orvibo.s20.S20Exception: Couldn't discover 192.168.1.89
The actual script I am running is trivial:
#!/opt/bin/python3 from orvibo.s20 import S20, discover displays =
S20("192.168.1.89") if displays.on == False: print("Switching monitors
extension on") displays.on = True else: print("Switching monitors studio
extension off") displays.on = False
It probably has to do with the platform:
Kernel is 2.6.36.4 and is is running on arm-hf
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#8>, or mute the
thread
<https://github.com/notifications/unsubscribe-auth/ADLOfqIpngzfiGBAfC7BspT8JLjAVkC4ks5rFrT7gaJpZM4LGl88>
.
--
'03 BMW F650CS - hers
'98 Dakar K12RS - "BABY K" grew up.
'93 R100R w/ Velorex 700 (MBD starts...)
'95 Miata - "OUR LC"
polish visor: apply squashed bugs, rinse, repeat
Beautiful Sunny Winfield, Illinois
|
Make sure your firewall allows you to receive UDP broadcasts on port 10000. That's the most likely reason for failure. |
I will double check. I am actually having problems running it on the firewall/router. However, with directly attached interfaces on the LAN, it should not matter. If it tries broadcast on all interfaces(including WAN) then the firewall possibly might be the issue. |
I can confirm it is the firewall. Although I cannot disable it as it is my home router. I have modified lines 75 and 292 in s20.py within the egg package to use my LAN broadcast address rather than 255.255.255.255. After this modification, the code runs without an issue. |
Good to know. A more robust change would be to have |
I am not really a programmer. Just got a bit of intuition that's all but I'll see what can be done. No promises though. |
Finding broadcast addresses in Python (and w/out hacks such as having to edit /etc/hosts) is not so trivial. It turns out that someone has written a module that can do that. The module is 'netifaces' and I am wondering how the 'boss' here would feel about adding that dependency to this project? I also found another cool thing (totally unrelated to this issue) about the Orvibo. If you google the name it uses to identify itself you can find a data sheet for the WiFi chip (High Flying) and that names a bunch of AT commands. There is one you can use to alter the default ID. My Asus router adds these IDs to it's DNS lookup tables and I can then access these devices by name instead of IP address. (I don't have the link handy - main development machine is down at the moment.) |
If I got a PR that used |
I think it could be implemented in a much simpler way. You can either use private IP address classes (as per RFC1918) and their appropriate netmask (so for Class A 255.0.0.0.0, Class B 255.255.0.0 and for Class C 255.255.255.0) or, keep 255.255.255.255 but add an optional netmask parameter to the s20 class. |
Thanks for the module it's excellent and it does what is says on the tin! It works fine on my desktop but fails to work in python3 environment on my home router (running asuswrt/mertinwrt) with entware. The module installs fine with easy-install but when trying to run the simple on/off switch operation it fails the mac discovery with the following errors:
The actual script I am running is trivial:
#!/opt/bin/python3 from orvibo.s20 import S20, discover displays = S20("192.168.1.89") if displays.on == False: print("Switching monitors extension on") displays.on = True else: print("Switching monitors studio extension off") displays.on = False
It probably has to do with the platform:
Kernel is 2.6.36.4 and is is running on arm-hf
The text was updated successfully, but these errors were encountered: