{"id":4078,"date":"2025-07-03T16:49:56","date_gmt":"2025-07-03T15:49:56","guid":{"rendered":"https:\/\/m0aws.co.uk\/?p=4078"},"modified":"2025-07-04T08:31:15","modified_gmt":"2025-07-04T07:31:15","slug":"linux-wandering-usb-devices","status":"publish","type":"post","link":"https:\/\/m0aws.co.uk\/?p=4078","title":{"rendered":"Linux &#8211; Wandering USB devices"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">As I detailed in my <a href=\"https:\/\/m0aws.co.uk\/?p=3105\" target=\"_blank\" rel=\"noreferrer noopener\">QO-100 Satellite Ground Station Complete Build<\/a> article I use a Griffin Powermate VFO knob to control the receive VFO frequency when in split mode or needing to RIT a DX station to get on frequency with them. Since building the ground station this setup has worked perfectly and without error however, for the last couple of days every time I start my <a href=\"https:\/\/kubuntu.org\/\" target=\"_blank\" rel=\"noreferrer noopener\">Kubuntu Linux <\/a>PC the USB VFO knob appears on a different USB event queue.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For the last two years the VFO knob has always appeared on <strong><em>\/dev\/input\/event11<\/em><\/strong> but, after connecting a Pluto+ SDR transceiver to the PC via USB the VFO knob now appears randomly on the <strong><em>\/dev\/input\/events<\/em><\/strong> tree. This normally doesn&#8217;t cause any problems but, my <a href=\"https:\/\/www.node-red.dev\/\" target=\"_blank\" rel=\"noreferrer noopener\">Node-Red<\/a> QO-100 Ground Station Control Dashboard expects the device to always be on <strong><em>\/dev\/input\/event11<\/em><\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"2025\" height=\"2700\" src=\"https:\/\/m0aws.co.uk\/wp-content\/uploads\/2023\/06\/M0AWS-Griffin-Technology-Powermate-VFO-2025x2700.jpeg\" alt=\"Griffin Technology Powermate VFO\" class=\"wp-image-2203\" srcset=\"https:\/\/m0aws.co.uk\/wp-content\/uploads\/2023\/06\/M0AWS-Griffin-Technology-Powermate-VFO-2025x2700.jpeg 2025w, https:\/\/m0aws.co.uk\/wp-content\/uploads\/2023\/06\/M0AWS-Griffin-Technology-Powermate-VFO-225x300.jpeg 225w, https:\/\/m0aws.co.uk\/wp-content\/uploads\/2023\/06\/M0AWS-Griffin-Technology-Powermate-VFO-768x1024.jpeg 768w, https:\/\/m0aws.co.uk\/wp-content\/uploads\/2023\/06\/M0AWS-Griffin-Technology-Powermate-VFO-1152x1536.jpeg 1152w, https:\/\/m0aws.co.uk\/wp-content\/uploads\/2023\/06\/M0AWS-Griffin-Technology-Powermate-VFO-1536x2048.jpeg 1536w, https:\/\/m0aws.co.uk\/wp-content\/uploads\/2023\/06\/M0AWS-Griffin-Technology-Powermate-VFO-scaled.jpeg 1920w\" sizes=\"auto, (max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/><figcaption class=\"wp-element-caption\">Griffin Technology Powermate VFO<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Initially I tried to find a way to lock the USB VFO knob to \/<strong><em>dev\/input\/event11<\/em><\/strong> however, there doesn&#8217;t appear to be a way to do this as the event tree is built at boot time by <a href=\"https:\/\/en.wikipedia.org\/wiki\/Udev\" target=\"_blank\" rel=\"noreferrer noopener\">udev<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Digging deeper into udev I discovered that it&#8217;s possible to create a udev rule that is read at boot time, that will search for the device and then create a <strong><em>symlink<\/em><\/strong> to it with the same name each time making the USB VFO Knob appear as if it&#8217;s always in the same place. This is exactly what I need so I set about writing the udev rule.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To find out what event the USB VFO knob is currently on I ran <a href=\"https:\/\/manpages.ubuntu.com\/manpages\/trusty\/man1\/evtest.1.html\" target=\"_blank\" rel=\"noreferrer noopener\">evtest<\/a> on the Linux command-line and got the following output.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>No device specified, trying to scan all of \/dev\/input\/event*\nAvailable devices:\n\/dev\/input\/event0:      Sleep Button\n\/dev\/input\/event1:      Power Button\n\/dev\/input\/event2:      Power Button\n\/dev\/input\/event3:      Video Bus\n\/dev\/input\/event4:      Telink Wireless Receiver Mouse\n\/dev\/input\/event5:      Telink Wireless Receiver Consumer Control\n\/dev\/input\/event6:      Telink Wireless Receiver System Control\n\/dev\/input\/event7:      Telink Wireless Receiver\n\/dev\/input\/event8:      Kensington USB\/PS2 Orbit\n\/dev\/input\/event9:      PixArt USB Optical Mouse\n\/dev\/input\/event10:     USB PnP Audio Device\n\/dev\/input\/event11:     HDA Intel PCH Front Mic\n\/dev\/input\/event12:     HDA Intel PCH Rear Mic\n\/dev\/input\/event13:     HDA Intel PCH Line\n\/dev\/input\/event14:     HDA Intel PCH Line Out Front\n\/dev\/input\/event15:     HDA Intel PCH Line Out Surround\n\/dev\/input\/event16:     HDA Intel PCH Line Out CLFE\n\/dev\/input\/event17:     HDA Intel PCH Line Out Side\n\/dev\/input\/event18:     HDA Intel PCH Front Headphone\n\/dev\/input\/event19:     HDA Intel PCH HDMI\/DP,pcm=3\n\/dev\/input\/event20:     HDA Intel PCH HDMI\/DP,pcm=7\n\/dev\/input\/event21:     HDA Intel PCH HDMI\/DP,pcm=8\n\/dev\/input\/event22:     HDA Intel PCH HDMI\/DP,pcm=9\n\/dev\/input\/event23:     HDA Intel PCH HDMI\/DP,pcm=10\n\/dev\/input\/event24:     Griffin PowerMate\n\/dev\/input\/event25:     Realtek RTL2832U reference design\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This shows that currently the Griffin Powermate VFO knob is on event 24. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Having this information I now needed to use the <strong><em>udevadm<\/em><\/strong> command to obtain the Vendor and Product ID of the USB VFO knob.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>udevadm info -a \/dev\/input\/event24<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This returns a lot of information about the USB device, more than I was expecting but, upon close inspection I found the Vendor and Product IDs.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ATTRS{id\/product}==\"0410\"\nATTRS{id\/vendor}==\"077d\"<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Now that I have the Vendor and Product IDs I could start writing the udev rule.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Using the <strong><em>vi<\/em><\/strong> text editor on the command-line I created the necessary file in the<br> <strong><em>\/etc\/udev\/rules.d\/<\/em><\/strong> directory.rule<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>vi \/etc\/udev\/rules.d\/90-powermate.rules<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Into the file I wrote the following udev rule.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><sub>SUBSYSTEMS==\"input\", ATTRS{id\/product}==\"0410\", ATTRS{id\/vendor}==\"077d\", SYMLINK += \"powermate\"<\/sub><\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong><em>Note<\/em><\/strong>: That should all be on one line in the file not wrapped as shown above.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This one line rule sets the subsystem to input events, sets the Product and Vendor IDs to that of the Griffin Powermate USB VFO knob and then creates the symlink <strong><em>\/dev\/powermate<\/em><\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Once I&#8217;d completed the rule, I saved the file and exited the vi text editor.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Next I needed to use <strong><em>udevadm<\/em><\/strong> to get it to re-read the udev rules as if it were boot time and check that it created the symlink.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>udevadm control -R<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Once the <strong><em>udevadm<\/em><\/strong> command completed I used the <strong><em>ls<\/em><\/strong> command to see if the symlink had been created.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ls -la \/dev\/powermate\nlrwxrwxrwx 1 root root 13 Jul  3 15:32 \/dev\/powermate -&gt; input\/event24\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">As shown above the symlink had been created and I could now enter<strong><em> <\/em><\/strong><br><strong><em>\/dev\/powermate<\/em><\/strong> into my Node-Red code so that it always finds the VFO knob regardless of what event number it appears on.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Just to make sure it worked correctly at boot time, I shutdown my Kubuntu linux PC and started it from a cold boot. Sure enough the <br><strong><em>\/dev\/powermate <\/em><\/strong>symlink was created and pointed to the new event number in the \/dev\/input tree, problem solved!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I hope this information is useful to Linux users especially as it can be used for any USB input device.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It&#8217;s worth noting that you will need to be root user to run most of the commands or use sudo from your regular user account.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">More soon &#8230;.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>As I detailed in my QO-100 Satellite Ground Station Complete Build article I use a Griffin Powermate VFO knob to control the receive VFO frequency when in split mode or needing to RIT a DX station to get on frequency with them. Since building the ground station this setup has worked perfectly and without error &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/m0aws.co.uk\/?p=4078\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Linux &#8211; Wandering USB devices&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[287,132,208,4,409,410,171,38,179,135,206,326,110,215,463,53,464],"tags":[],"class_list":["post-4078","post","type-post","status-publish","format-standard","hentry","category-commandline","category-debian","category-evtest","category-ham-radio","category-kde","category-kde-plasma","category-kubuntu","category-linux","category-nodered","category-opensource","category-powermate","category-radio","category-station","category-ubuntu","category-udev","category-usb","category-vi"],"_links":{"self":[{"href":"https:\/\/m0aws.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/4078","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/m0aws.co.uk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/m0aws.co.uk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/m0aws.co.uk\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/m0aws.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4078"}],"version-history":[{"count":29,"href":"https:\/\/m0aws.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/4078\/revisions"}],"predecessor-version":[{"id":4108,"href":"https:\/\/m0aws.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/4078\/revisions\/4108"}],"wp:attachment":[{"href":"https:\/\/m0aws.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4078"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/m0aws.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4078"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/m0aws.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4078"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}