phunkyg / ReaControl24

Control24 digital control surface protocol middleware
GNU General Public License v3.0
7 stars 6 forks source link

Default Network device is not an Ethernet device #2

Closed phunkyg closed 4 years ago

phunkyg commented 6 years ago

C:\ReaControl24-1.1.2>python control24d.py Traceback (most recent call last): File "control24d.py", line 650, in main() File "control24d.py", line 632, in main SESSION = C24session(opts, networks) File "control24d.py", line 555, in init self.thread_pcap_loop = Sniffer(self) File "control24d.py", line 262, in init c24session.pcap_sess.setfilter(filtstr) File "pcap.pyx", line 288, in pcap.pcap.setfilter OSError: ethernet addresses supported only on ethernet/FDDI/token ring/802.11/ATM LANE/Fibre Channel

phunkyg commented 6 years ago

Help text would narrow this down: python control24d.py -h

SubersSS commented 6 years ago

C:\ReaControl24-1.1.2>python control24d.py -h Usage: control24d.py [options]

control24d Communication Daemon part of ReaControl24 Copyright (c)2018 Phase Walker This program comes with ABSOLUTELY NO WARRANTY; This is free software, and you are welcome to redistribute it under certain conditions; see COPYING.md for details.

Options: -h, --help show this help message and exit -d, --debug logger should use debug level. default = off / INFO level -o LOGDIR, --logdir=LOGDIR logger should create dir and files here. default = ./logs -n NETWORK, --network=NETWORK Ethernet interface to the same network as the Control24. Default = {2961E4F3-E86E- 4C37-9BB7-1F30C6FF0C0B} -l LISTEN, --listen=LISTEN listen on given host:port. Default = 169.254.67.69:9123

lazlooose commented 5 years ago

is there a solution to this problem? I am getting it too trying to get this working on windows 10.

lazlooose commented 5 years ago

actually I realized that I had loaded the wrong python 2.7.15 version (Windows x86 MSI installer) instead of (Windows x86-64 MSI installer) so after uninstalling the old one and installing the new one I now get the error: when running python ocontrol24d.py from the administrator command prompt: Traceback (most recent call last): File "control24d.py", line 19, in from control24common import (DEFAULTS, COMMANDS, NetworkHelper, hexl, File "C:\Users\redarc\Downloads\ReaControl24-phunkyg(1)\ReaControl24-Release\control24common.py", line 11, in import netifaces ImportError: DLL load failed: %1 is not a valid Win32 application.

lazlooose commented 5 years ago

ok I fixed the import error by uninstalling the requirements and reinstalling them (pip) but now I am back to the previous error:

Traceback (most recent call last): File "control24d.py", line 650, in main() File "control24d.py", line 632, in main SESSION = C24session(opts, networks) File "control24d.py", line 555, in init self.thread_pcap_loop = Sniffer(self) File "control24d.py", line 262, in init c24session.pcap_sess.setfilter(filtstr) File "pcap.pyx", line 288, in pcap.pcap.setfilter OSError: ethernet addresses supported only on ethernet/FDDI/token ring/802.11/ATM LANE/Fibre Channel

lazlooose commented 5 years ago

SOLUTION: I figured out what was going on in my setup the defualt device was set to the npcap loopback adapter and not the ethernet adapter. I used the -n option (python control24d.py -n=2525246246) it said theat the network I inputed was not valid but it outputs all your adapters with the ids in the error message so I copied the one which said ethernet ( {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx} Ethernet ) out of the list and ran the command: python control24d.py --network={xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx} Ethernet and it worked now I get: desk detected :MAINUNIT 1.37 @.... !!!!

lazlooose commented 5 years ago

there seems to be an issue with the way it detects defaults because in order to get it to connect I had to use the option --connect=(with my local ip address and port) on control24osc.py because by default it is connecting to another IP which I don't recognize but control24d and control24osc.py seem to need to use that ip address to connect to the board.

and since reaper will only let me use my local ip address I set that one as connect and in the reaper dialog the other ip as listen and it works reaper is responding to the buttons. wierd though causebut when I had it working on my mac I didn't have to do any of that extra stuff.

lazlooose commented 5 years ago

upon further research the IP address they are using is the one for the npcap loopback adapter.

phunkyg commented 5 years ago

So the fix here would be to filter out the NPCAP loopback adapter as being a possible choice. Thanks for the hard work lazloose, I'll put this into a fix soon, that will pick the default adapter correctly. In the meantime, configuring from the command line is fine and dandy, that's why those options are there, for when the defaults can't be determined correctly.

phunkyg commented 5 years ago

Also noting the help text didn't return the list of adapters... bad assumption on my part?

lazlooose commented 5 years ago

yes, as SuberSS shows in his post the help option only returns the ID of the current default adapter.

lazlooose commented 5 years ago

...but the list does show up if you put in an invalid option for -n or --network

lazlooose commented 5 years ago

Also if you're wiorking on this the SIGINT command (Ctrl-c) doesn't work on control24d.py I can only kill it by closing the terminal window, possibly a bug?

phunkyg commented 5 years ago

I need to rebuild my windows test machine as I lost the damn password :( what a dolt.

Anyway, I just pushed a couple of small changes to the DEV_OtherDevices branch, including starting up a procontrolosc.py file. This is just a duplicate for now, but I will put any pro control related changes into that.

Now where did I put that windows disk...

phunkyg commented 5 years ago

So, The registry doesn't return much except the PciDeviceId for some adapters. I will put in a filter with an exclusion list under the common config, so these can be eliminated as they are found.

lazlooose commented 5 years ago

UPDATE: wierdly, after the most recent windows 10 update the defaults now correctly assign and I no longer need to use the options.

phunkyg commented 5 years ago

UPDATE: wierdly, after the most recent windows 10 update the defaults now correctly assign and I no longer need to use the options.

The default routine picks the first interface it finds with a 'proper' IP address, but I have no idea what order the netifaces library returns them in. It could be for some reason their 'natural' order gets changed by the update?

Either way I think an exclusion list is a good idea, then if any more of these crop up then there is a mechanism for ditching them. Thanks for the update though! Weird huh?

SubersSS commented 5 years ago

I'm also trying to substitute the right adapter, but it does not work. That's what gives:

C:\ReaControl24>python control24d.py --network = {A8AFEDEB-F715-4EAF-A9CE-63B4B3F428F7} Ethernet {A8AFEDEB-F715-4EAF-A9CE-63B4B3F428F7} Ethernet {2961E4F3-E86E-4C37-9BB7-1F30C6FF0C0B} Npcap Loopback Adapter {2FBA7BEA-BCCA-11E8-B48D-806E6F6E6963} Traceback (most recent call last): File "control24d.py", line 650, in main() File "control24d.py", line 624, in main 'network' optparse.OptionError: option network: Specified network does not exist. Known networks are listed to the output.

lazlooose commented 5 years ago

if you get the list output with all the network devices it's not seeing a valid --network option so maybe try: --network={A8AFEDEB-F715-4EAF-A9CE-63B4B3F428F7} Ethernet

without the spaces on either side of the =

SubersSS commented 5 years ago

Ok, I'll try. why not follow the path of Patrick-Gilles Maillot for Behringer x32? There is a minimum of gestures! Can create a utility to work the interface on the same type? For me, not a specialist in the field of programming is hard! Type, put all the libraries and programming environment, and the utility itself picks up.

lazlooose commented 5 years ago

I think the x32 is already OSC compatibible out of the box. however these units were not designed to work with OSC. That is only possible with the middleware here that translates the native protocol to OSC. So, it is not really the same situation from what I can tell.

SubersSS commented 5 years ago

Hi! Without spaces the console was defined. And it is possible in more detail about ip connection and port? How did you prescribe it?

phunkyg commented 4 years ago

Ok, I'll try. why not follow the path of Patrick-Gilles Maillot for Behringer x32? There is a minimum of gestures! Can create a utility to work the interface on the same type? For me, not a specialist in the field of programming is hard! Type, put all the libraries and programming environment, and the utility itself picks up.

Yes there is an intention to make a configuration app to enable easy choosing of the network adapter and such. Most of our effort went into trying to get the program to choose the right settings by default, but allow a user with a more complex stuff to set things by a command line.

To make it more friendly a GUI is one the plan.

phunkyg commented 4 years ago

Oh reading back over. this SSubers I notice you have an = sign in the command line.

The command line switches don't need an = sign just a space between the switch and value.

phunkyg commented 4 years ago

Trying a Windows test today, things seem a bit different to the instructions for NPCAP on Windows now. The intructions say 'do not install the loopback adapter' but the option is now 'do you only want to allow Administrators to use the loopback adapter'

This is a better option and acutally means you don't need an admin cmd prompt.

Will see if I can update the guide. In the meantime, have Windows testbed back in action now. should hopefully be able to re-create this and try to find a fix/exclusion of the loopback adapter if the instructions aren't followed.

phunkyg commented 4 years ago

Have added a filter to the networks list code to omit any in a list provided in the DEFAULTS in ReaCommon.py