genlc icon indicating copy to clipboard operation
genlc copied to clipboard

can not open GLM adapter on Ubuntu 22.04

Open gahabana opened this issue 3 years ago • 2 comments

hi, if i try to run 'genlc discover' i get an error message Error: Opening USB device: unable to open device trying to do some problem determination went to ipython3 and did following:

import hid
hid_glm_adapter = hid.Device(0x1781, 0x0E39)

i get an error message HIDException: unable to open device ...

library installed as per read.me ... not sure what could be causing inabilitty to open GLM adapter.

Do you have any ideas how to fix this issue ?

thank you !

gahabana avatar Jun 14 '22 17:06 gahabana

hi again, i realised issue is simple access rights. did unusual 'sudo pip3 install ' and after that i could do 'sudo genlc discover' etc....

it does work however it seems to be 'inconsistent'.

on my machine Genelec adapter is '/dev/hidraw1' and here i have given it 'rw' access to user 'zh' and then tested it. btw same behaviour when running with sudo. usually 1st discover fails, 2nd one works, then once or twice all seems good, then i only see microphone....

Could you take a look at it - not sure if the issue is with 'timings' which cause strange behaviours or maybe it is known ... would be then great to have 'return' codes indicate what happened/was found then i could automate turning it on or off, setting volume or muting (which are the primary things i am interested in)... right now im running glm v4 in VM which consumes power, memory, cpu only to do those actions (for some reason when not running glm in virt machine speakers do not remember set volume though i can power them on and off but need to fiddle with RF remote all the time to get volume right). often on 1st run it does not discover the adapter. then it shows 3 speakers and microphone two time in a row but on a 3rd run it shows only glm/microphone.

here is the output:

zh@acus:~$ sudo /bin/setfacl -m u:zh:rw- /dev/hidraw1
zh@acus:~$ ll /dev/hidraw1
crw-rw----+ 1 root root 237, 1 Jun 15 06:00 /dev/hidraw1
zh@acus:~$ genlc discover
Found USB adapter: Genelec Gnet Adapter with serial #00000000011C
Error: Timeout communicating with the GLM adapter:
zh@acus:~$ genlc discover
Found USB adapter: Genelec Gnet Adapter with serial #00000000011C
[1] GLM Adapter
	serial #284
	software c-0;model-GLM Adapter;ver-1.2.3.4444;hw-0.0.64;build-2021.09.16.s
	bar code H99999F000
	microphone serial #201026
[2] 8330A
	serial #990979
	software ver-1.10.9.4460 build-2021.10.05.s
	bar code 8330apm1001181
[3] 7350A
	serial #1107794
	software ver-1.10.8.4406 build-2021.09.01.s
	bar code 7350APM61103048
[4] 8330A
	serial #990978
	software ver-1.10.9.4460 build-2021.10.05.s
	bar code 8330apm1001180
zh@acus:~$ genlc discover
Found USB adapter: Genelec Gnet Adapter with serial #00000000011C
[1] GLM Adapter
	serial #284
	software c-0;model-GLM Adapter;ver-1.2.3.4444;hw-0.0.64;build-2021.09.16.s
	bar code H99999F000
	microphone serial #201026
[2] 8330A
	serial #990979
	software ver-1.10.9.4460 build-2021.10.05.s
	bar code 8330apm1012181
[3] 7350A
	serial #1107794
	software ver-1.10.8.4406 build-2021.09.01.s
	bar code 7350APM61103048
[4] 8330A
	serial #990978
	software ver-1.10.9.4460 build-2021.10.05.s
	bar code 8330apm1012180
zh@acus:~$ genlc discover
Found USB adapter: Genelec Gnet Adapter with serial #00000000011C
[1] GLM Adapter
	serial #284
	software c-0;model-GLM Adapter;ver-1.2.3.4444;hw-0.0.64;build-2021.09.16.s
	bar code H99999F000
	microphone serial #201026
zh@acus:~$

gahabana avatar Jun 15 '22 07:06 gahabana

The correct solution would be a udev rule that sets the permissions and group. Create a file /etc/udev/rules.d/20-genelec-gnet-adapter.rules with the following content:

SUBSYSTEMS=="usb", ATTRS{idVendor}=="1781", ATTRS{idProduct}=="0e39", MODE="0660", GROUP="plugdev"

You should be in the group plugdev.

FaberFlorian avatar Mar 12 '23 09:03 FaberFlorian