Post Reply 
[newRPL] interested in RPN mode?
11-24-2019, 02:49 AM (This post was last modified: 11-24-2019 02:58 AM by ijabbott.)
Post: #33
RE: [newRPL] interested in RPN mode?
(11-24-2019 12:12 AM)Claudio L. Wrote:  A little more google and hp4x Linux driver is the culprit. I don't know why it's being loaded on your system automatically, perhaps some old rule or other package installed a rule. You can try rmmod ho4x to unload it, then unplug and plug the calc. Use dmesg again to see if now it loaded the right driver.

The hp4x USB serial driver has been part of the Linux kernel sources since the 2.6.12 kernel (released 2005-06-17), initially as its own module, but got merged into the usb_serial_simple module in the 3.12 kernel (released 2013-11-03). The device tables in the respective modules match the USB VID and PID of the HP calculator, so the module will be loaded automatically when a matching device is detected if the module is installed as part of the distro's kernel packages. It's the usb_serial_simple module in this case.

If you rmmod the usb_serial_simple module, it will get loaded again automatically when you plug the device in. You could blacklist the usb_serial_simple module (see modprobe.d(5) for details), but that would also prevent the module being loaded for some other simple USB serial devices. It is the easiest fix though.

UDEV rules could be added to run a commands "unbind" the device from the hp4x driver and "bind" it to the desired driver (hid-generic, I think?).

It's way past my bedtime, and this is completely untested, but try adding a UDEV rule along the lines of this:

Code:

ACTION=="bind", SUBSYSTEMS=="usb", DRIVER=="hp4x", ATTRS{idVendor}=="03f0", ATTRS{idProduct}=="0121", \
RUN+="/bin/bash -c 'echo $kernel > /sys/bus/usb-serial/drivers/hp4x/unbind'", \
RUN+="/bin/bash -c 'echo $kernel > /sys/bus/hid/drivers/hid-generic/bind'"

You may need to play around with it a bit. It assumes the hid-generic module is already loaded. Note the serial driver is still registered as "hp4x" for this device, even though it is now handled by the "usb_serial_simple" module.

— Ian Abbott
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: [newRPL] interested in RPN mode? - ijabbott - 11-24-2019 02:49 AM



User(s) browsing this thread: 11 Guest(s)