LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 03-12-2021, 11:19 AM   #1
CVAlkan
Member
 
Registered: Nov 2012
Location: Northwest suburbs of Chicago
Distribution: Ubuntu & Mint LTS, Manjaro Rolling; Android
Posts: 242

Rep: Reputation: Disabled
USB Access in Wine (bidirectional)


I've recently purchased a very nice Chinese mechanical keyboard, a Durgod K-320 Corona, an excellent mechanical keyboard which works just fine with Linux.

When used under Windows, a downloadable program called the Durgod Zeus Engine (DZE) can be used to reconfigure keys, create text blocks and macros for assignment to particular keys, and similar functionality; one can then download these to a shadow profile on the keyboard itself.

There are, to be sure, some oddities with the DZE software, but I've been able to assign a few things, download them to the K-320, move the keyboard to a Linux machine, and use the (Fn+F12) hot key combination, which causes the shadow profile to become active; a small LED on the keyboard is lit to indicate that the secondary profile is active, and the remapped keys work as advertised.

But I don't want to traipse over to a Windows machine every time I want to create a new macro or whatever, and such mapping cannot be done on the keyboard itself (unlike my Kinesis FreeStyle Edge, which I think sets the standard for how programmable keyboards ought to work, but that's another discussion).

So I attempted to run the DZE using Wine on my Linux Mint 20/Cinnamon 4.6.7/5.4 kernel, and have had no luck whatsoever. When the DZE is started on Windows, it automagically detects the model of the keyboard and displays the appropriate set of screens. Under Wine, the program doesn't seem to see the keyboard at all. Just to eb clear, if I run "wine64 uninstaller" from the terminal, the keyboard works normally.

So I trolled the web for some solutions or at least some hints and found the usual collection of undated postings, obviously outdated postings, and even "official" postings (such as the Wine site itself) whose advice refers to locations that don't exist on my machine or similar.

Several postings indicate that I need to be in either the sys or dialout groups for access to com ports in wine, so after confirming that these groups already existed, I ran:
Quote:
sudo usermod -a -G sys,dialout frank
... and then, of course, rebooted. The DZE still could not see the keyboard.

So, if anyone has ideas, or a better understanding of Wine than I do (sadly, not a very high bar), here is what I've been able to locate so far:

Running lsusb shows the keyboard on the following line:
Quote:
Bus 003 Device 004: ID 2f68:0082 Hoksi Technology DURGOD Taurus K320
Running ls -l from the ~/.wine/dosdevices lists links for:
Quote:
lrwxrwxrwx 1 frank frank 10 Mar 2 06:28 c: -> ../drive_c
lrwxrwxrwx 1 frank frank 10 Mar 2 06:29 com1 -> /dev/ttyS0
lrwxrwxrwx 1 frank frank 8 Mar 2 06:28 d:: -> /dev/sr0
lrwxrwxrwx 1 frank frank 1 Mar 2 06:28 z: -> /
... as well as links from:
Quote:
lrwxrwxrwx 1 frank frank 10 Mar 2 06:29 com1 -> /dev/ttyS0
... through
Quote:
lrwxrwxrwx 1 frank frank 11 Mar 2 06:29 com32 -> /dev/ttyS31
There are no entries there (nor in /dev itself) similar to the ttyUSB* referred to in many posts.

My keyboard is at: /dev/usb/hiddev0

From the ~/.wine/dosdevices directory I removed the com1 link:
Quote:
rm -i com1
... and added a new one to my keyboard's device.
Quote:
ln -s /dev/usb/hiddev0 com1
Still no luck.

Poking around further, I found something interesting when running xinput list, whose output is listed below:

Quote:
$ xinput list
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ Conexant Hybrid TV (cx231xx) MCE IR no TX (2040:b123) id=10 [slave pointer (2)]
⎜ ↳ MOSART Semi. 2.4G RF Keyboard & Mouse id=13 [slave pointer (2)]
⎜ ↳ MOSART Semi. 2.4G RF Keyboard & Mouse Consumer Control id=14 [slave pointer (2)]
⎜ ↳ Hoksi Technology DURGOD Taurus K310 Consumer Control id=18 [slave pointer (2)]
⎜ ↳ Hoksi Technology DURGOD Taurus K310 Mouse id=20 [slave pointer (2)]
⎣ Virtual core keyboard id=3 [master keyboard (2)]
↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]
↳ Power Button id=6 [slave keyboard (3)]
↳ Video Bus id=7 [slave keyboard (3)]
↳ Video Bus id=8 [slave keyboard (3)]
↳ Power Button id=9 [slave keyboard (3)]
↳ Cypress Semiconductor HID Keypad id=11 [slave keyboard (3)]
↳ MOSART Semi. 2.4G RF Keyboard & Mouse id=12 [slave keyboard (3)]
↳ MOSART Semi. 2.4G RF Keyboard & Mouse System Control id=15 [slave keyboard (3)]
↳ Hoksi Technology DURGOD Taurus K310 id=16 [slave keyboard (3)]
↳ Hoksi Technology DURGOD Taurus K310 System Control id=17 [slave keyboard (3)]
↳ Hoksi Technology DURGOD Taurus K310 Keyboard id=19 [slave keyboard (3)]
↳ Conexant Hybrid TV (cx231xx) MCE IR no TX (2040:b123) id=21 [slave keyboard (3)]
↳ MOSART Semi. 2.4G RF Keyboard & Mouse Consumer Control id=22 [slave keyboard (3)]
↳ Hoksi Technology DURGOD Taurus K310 Consumer Control id=23 [slave keyboard (3)]
The Hoksi Durgod keyboard is listed on five lines, with separate entries for "System Control" and "Keyboard." This leads me to suspect that possibly I should be trying to connect the app to the "System Control" rather than the "Keyboard" but also leads me to the conclusion that I have no idea what I'm looking at and need some adult supervision. Concerning the line with "Hoksi Technology DURGOD Taurus K310 Mouse" I can confirm that I do not have a Durgod mouse, though I disconnected my USB mouse plug just in case my mouse was OEM'd from them; since the DZE permits assigning mouse key functions to keyboard keys, I'm guessing that mouse entry might have to do with that.

Unplugging the keyboard itself, and using the Kinesis standalone Number Pad (which I'm guessing is the Cypress Semiconductor HID Keypad and MOSART stuff) above to repeat the xinput command in the terminal, I get the following.

Quote:
$ sudo xinput list
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ Conexant Hybrid TV (cx231xx) MCE IR no TX (2040:b123) id=10 [slave pointer (2)]
⎜ ↳ MOSART Semi. 2.4G RF Keyboard & Mouse Consumer Control id=13 [slave pointer (2)]
⎜ ↳ MOSART Semi. 2.4G RF Keyboard & Mouse id=15 [slave pointer (2)]
⎣ Virtual core keyboard id=3 [master keyboard (2)]
↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]
↳ Power Button id=6 [slave keyboard (3)]
↳ Video Bus id=7 [slave keyboard (3)]
↳ Video Bus id=8 [slave keyboard (3)]
↳ Power Button id=9 [slave keyboard (3)]
↳ Cypress Semiconductor HID Keypad id=11 [slave keyboard (3)]
↳ Conexant Hybrid TV (cx231xx) MCE IR no TX (2040:b123) id=21 [slave keyboard (3)]
↳ MOSART Semi. 2.4G RF Keyboard & Mouse id=12 [slave keyboard (3)]
↳ MOSART Semi. 2.4G RF Keyboard & Mouse Consumer Control id=14 [slave keyboard (3)]
↳ MOSART Semi. 2.4G RF Keyboard & Mouse System Control id=22 [slave keyboard (3)]
In the /dev/input/by-id directory, my machine has:
Quote:
$ ls -l
total 0
lrwxrwxrwx 1 root root 9 Mar 12 09:45 usb-Cypress_Semiconductor_HID_Keypad-event-kbd -> ../event9
lrwxrwxrwx 1 root root 10 Mar 12 09:45 usb-Hauppauge_Hauppauge_Device_4036205519-event-ir -> ../event15
lrwxrwxrwx 1 root root 9 Mar 12 10:07 usb-Hoksi_Technology_DURGOD_Taurus_K320-event-if01 -> ../event5
lrwxrwxrwx 1 root root 9 Mar 12 10:07 usb-Hoksi_Technology_DURGOD_Taurus_K320-event-kbd -> ../event4
lrwxrwxrwx 1 root root 9 Mar 12 10:07 usb-Hoksi_Technology_DURGOD_Taurus_K320-if01-event-mouse -> ../event8
lrwxrwxrwx 1 root root 9 Mar 12 10:07 usb-Hoksi_Technology_DURGOD_Taurus_K320-if01-mouse -> ../mouse0
lrwxrwxrwx 1 root root 10 Mar 12 09:59 usb-MOSART_Semi._2.4G_RF_Keyboard___Mouse-event-if01 -> ../event14
lrwxrwxrwx 1 root root 10 Mar 12 09:59 usb-MOSART_Semi._2.4G_RF_Keyboard___Mouse-event-kbd -> ../event10
lrwxrwxrwx 1 root root 10 Mar 12 09:59 usb-MOSART_Semi._2.4G_RF_Keyboard___Mouse-if01-event-mouse -> ../event11
lrwxrwxrwx 1 root root 9 Mar 12 09:59 usb-MOSART_Semi._2.4G_RF_Keyboard___Mouse-if01-mouse -> ../mouse1
In the /dev/input/by-path directory, my machine has:
Quote:
$ ls -l
total 0
lrwxrwxrwx 1 root root 10 Mar 12 09:45 pci-0000:09:00.3-usb-0:2:1.0-event-ir -> ../event15
lrwxrwxrwx 1 root root 9 Mar 12 09:45 pci-0000:09:00.3-usb-0:3.2:1.0-event-kbd -> ../event9
lrwxrwxrwx 1 root root 10 Mar 12 09:59 pci-0000:09:00.3-usb-0:3.3:1.0-event-kbd -> ../event10
lrwxrwxrwx 1 root root 10 Mar 12 09:59 pci-0000:09:00.3-usb-0:3.3:1.1-event -> ../event14
lrwxrwxrwx 1 root root 10 Mar 12 09:59 pci-0000:09:00.3-usb-0:3.3:1.1-event-mouse -> ../event11
lrwxrwxrwx 1 root root 9 Mar 12 09:59 pci-0000:09:00.3-usb-0:3.3:1.1-mouse -> ../mouse1
lrwxrwxrwx 1 root root 9 Mar 12 10:07 pci-0000:09:00.3-usb-0:4:1.0-event-kbd -> ../event4
lrwxrwxrwx 1 root root 9 Mar 12 10:07 pci-0000:09:00.3-usb-0:4:1.1-event -> ../event5
lrwxrwxrwx 1 root root 9 Mar 12 10:07 pci-0000:09:00.3-usb-0:4:1.1-event-mouse -> ../event8
lrwxrwxrwx 1 root root 9 Mar 12 10:07 pci-0000:09:00.3-usb-0:4:1.1-mouse -> ../mouse0
As I said above, it's a great keyboard - built like a tank and a delight to type on, so it would be nice to use all of its capabilities, and I'd appreciate any assistance anyone can offer.

Frank
 
Old 03-13-2021, 12:39 PM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,719

Rep: Reputation: 5911Reputation: 5911Reputation: 5911Reputation: 5911Reputation: 5911Reputation: 5911Reputation: 5911Reputation: 5911Reputation: 5911Reputation: 5911Reputation: 5911
Kind of a duplicate post...
https://www.linuxquestions.org/quest...le-4175675234/

The keyboard is not a serial port and would not think that anything related line on thinking would work. wine has implemented direct HID support in its recent versions but that does not necessarily mean the DZE program can access the keyboard.

https://wiki.winehq.org/Hid

I take it you could never get david0's program to work.
 
Old 03-13-2021, 01:25 PM   #3
CVAlkan
Member
 
Registered: Nov 2012
Location: Northwest suburbs of Chicago
Distribution: Ubuntu & Mint LTS, Manjaro Rolling; Android
Posts: 242

Original Poster
Rep: Reputation: Disabled
Thanks for responding, and sorry for the apparent duplication. For some reason I was unable to locate the original post and, in any case, I still have a few other devices (e.g. Logitech remote control and various USB printers) that Wine seems unable to send anything to, so it seemed like it might be a more general question anyway, assuming there's a common cause (??).

And, no, I was unable to get davidO's script to work, and am reluctant to mess around with adding additional python versions since I have other python-based utilities that seem to be functioning and don't want to step off that ledge.

I guess I need to look into HID a bit further; keyboards are serial (with a small "s" and as opposed to parallel) devices, albeit traditionally uni-directional, though I know what you're saying. I had just assumed (using that bad word again) that, like many other protocols stuffed onto the USB connectors over the past decade, that this was yet another layer that piggybacked on to the connector.

My Kinesis Freestyle Edge, by the way, is also connected via a wired USB, and I've never had any issues running its software under Wine and saving the configuration to one of its profile layers (it actually supports lots of programming right from the keyboard, but some things are just easier using the Windows app). Its connection to the on-board profiles is probably "hard-wired" though, since the Windows program is stored and run from an internal drive within the keyboard which also holds the key mappings and macros.

Given that it's a very good keyboard at a reasonable price (for such things), I figured I would post to see if any one had figured out a solution yet.

Again, thanks for responding.

Frank
 
  


Reply

Tags
usb, wine



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Bidirectional data transfer using socket pgmming? ssg14j Programming 1 10-24-2005 08:06 AM
Bidirectional data transfer ssg14j Linux - Networking 1 10-24-2005 07:59 AM
where do i get a bidirectional popen pipe? Thinking Programming 9 10-21-2005 07:42 AM
unsymetric bidirectional transfer Soulstealer Linux - General 3 10-21-2005 04:04 AM
bidirectional piping w/ gpg and php yocompia Programming 0 04-20-2004 08:19 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06:42 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration