usb foot pedal driver
I have a sparc machine running solaris 10 and 2 Olympus usb foot pedals. The usb foot pedal models are RS24 and RS26. There are no Solaris drviers for the devices. I tried the detection tool on an XP Pro machine since I do not have an x86 machine. The tool does not detect the pedal even with Windows drivers installed.
I have read that other brands of foot pedals do not support Linux/Unix but should be compatible with their built in drivers. So I tried assigning a foot pedal to the hid driver. Nothing would happen when I press a pedal or cat the files in /dev/usb/7b4.202.
Then I tried assigning the foot pedal to a usb mouse driver from a site recommended by Sun. The driver would install but fail to attach. Still nothing would happen however there would be weird output when I cat the /dev/usb/7b4/202 files.
I know that foot pedals are used for audio and dictation so I would have to test them against that software. However my company would basically like to see changes in the state of the foot pedals to use them in their own software. I have no expereince in coding drivers so feedback with non-coding solutions would be appreciated.
[1171 byte] By [
bbucalona] at [2007-11-27 1:15:39]

# 1
Hello.
If this device really uses the HID driver reading the pedals should be easy: Simply open /dev/usb/hidxx and read the incoming bytes.
The device name /dev/usb/7b4.202 makes me think that the pedals are not handled by the HID driver but by the UGEN driver.
Using the UGEN driver is not very complicated however it needs knowledge in USB device programming because all operations (activating the device ...) must be done by the application instead of the OS.
To get more information you may read the help for UGEN (manpages, documentation etc.) and the USB 1.1 specification chapters 4.7-4.7.4 and 9.3-9.6. It's not much. (The USB 2.0 spec. is more confusing than 1.1.)
There is a tool (SniffUSB aka. USBsnoop) that can log the USB data transferred between the computer and a device under Windows XP (does not work under Vista). It is used by many Linux device drivers to get an idea about the protocol used by the device if they do not have a documentation.
Martin
# 2
Thanks for the reply. I have assigned the foot pedal to a usb mouse driver. Despite installing the driver successfully the device failed to attach. The driver came with a tester program in c which outputs mouse input (x, y, click and scroll). By using a binary in the /dev/usb/7b4.202 directory for the tester program, I managed to get incorrect but consistent output. When I press the left pedal it says the pedal scrolled 4 increments up. With the middle pedal 8 and the right, 2. From an application sense, my colleagues say this change of state may be sufficient for using the foot pedal in their software.
That is Unix possibly out of the way. Our software aims to be platform independant. So I installed the foot pedal driver on a Windows XP Pro machine. Would anyone know any sample programs to assign keyboard or mouse functionality to the foot pedals? If not would anyone know how the OS can differentitate between a change in state (left pedal tap, middle pedal tap, right pedal tap)?
# 3
Now I can not replicate what I did on the sparc machine. My company also has a Sun-Blade-100 but when I plug the foot pedal into the machine Solaris 10 will not pick up the device. A directory wasn't created in /dev/usb/. The device would not show in /var/adm/messages. Strangely the prtconf -v command picks up the device and prints its vendor id and product id. I have installed the driver but the OS can not detect the usb footpedal. I also tried prtdiag -v reported and the device does not show.
# 4
>> Now I can not replicate what I did on the sparc machine.
>> My company also has a Sun-Blade-100 but when I plug the foot pedal
>> into the machine Solaris 10 will not pick up the device.
>> A directory wasn't created in /dev/usb/.
Hello
"prtconf -D" will tell you which device driver has control over the foot pedals.
There are three possibilities for the Blade 100:
- The HID driver controls your device. The device name is /dev/usb/hidx.
- The UGEN driver is not configured to control "unknown" devices.
- The Blade 100 runs the "USBA 0.9" framework that does not have a UGEN driver.
In the first case you may decide yourself if you wish to use the HID driver or if you want to tell the system to use the UGEN driver instead.
In the second case you'll have to tell the system to use the UGEN driver.
The easiest way to do this is adding the line usba10_ugen "usb7b4,202"
to the /etc/driver_aliases file and rebooting the system. (This is true for Solaris 9. In OpenSolaris you just write "ugen" instead of "usba10_ugen". I do not know about Solaris 10).
In the third case (USBA 0.9) - typically the case for Solaris 9 and older - you'll have to upgrade from USBA 0.9 to USBA 1.0. This is a bit complicated and you may destroy your OS installation.
Martin
# 5
On another blade machine my colleague managed to get the OS to recognise the foot pedal. Both machines are SUNW, Sun-Blade-100s. He assigned it to the usb_mid driver. It comes up as device0 in /dev/usb. This is fine as in theory I should install my mouse driver again and the tester program should get some output.
However when I assign the usb_mid drvier on the other blade no file is created in the /dev/usb/ directory.
# 6
Ok what my colleague has done for one Blade machine I managed to do to the other. All I had to do was rem_drv usb_mid then add_drv -i '"usb7b4,202"' usb_mid. The foot pedal is detected. There is a file in the /dev/usb/ directory called device0. Those files are actually pointers to files in /devices/... . My next question is what driver do I assign to the foot pedals on the Blade machines so I get a directory call 7b4.202 in /dev/usb. That is because on the SUNW A70 machine it had that directory and it contained binary files that I used for the tester program.
Basically I want my company's Blade machines to repeat what happens on the A70. I want the usb foot pedal to create a directory named after its vendor and product id in the /dev/usb/ directory. This folder then contains the binary files needed for the c tester program.
# 7
Hello again.
>> rem_drv usb_mid
I would not have done that. This may have influenced your USB configuration in a very bad way. Maybe now some USB devices will not be working.
>> add_drv -i '"usb7b4,202"' usb_mid
The "usb_mid" driver is needed for devices that are handled by multiple drivers (e.g. a keyboard/mouse combination with only one USB plug is handled by the keyboard driver and by the mouse driver the same time). It cannot be used "stand alone" but it requires another driver.
I would try the following thing:
add_drv ugen
If Solaris says the driver is already installed it is OK. If Solaris says the driver cannot be found you have the "USBA 0.9" environment (see previous answer) - do not try to get your pedals working.
Next you must do is to replace the following line in /etc/driver_aliases:usb_mid "usb7b4,202"
by the following line:ugen "usb7b4,202"
then reboot the system; maybe the following two commands can be used to make the device work without rebooting:update_drv usb_mid
update_drv ugen
Now you should get the directory "/dev/usb/7b4.202". Under Solaris 9 this directory is not created automatically but only the link destinations in "/devices/..." are created.
Your next problem is how to work with the files in this directory. It is not as easy as simply opening "/dev/mouse" and reading some data. You'll have to send USB configuration commands etc.
Martin
# 8
Thanx heaps Martin. I know the terminology now. The files that I was refering to were endpoints. Anyway I assigned the foot pedal to the ugen driver and it created the endpoints in the /devices directory. Those files are what I need for the tester program. I had tried assigning the pedal to ugen driver before but I never knew the files were in the /devices directory. Strangely the file created is still device0 but as long as I can see the endpoints its ok. Once again thank you.
# 9
I know this is a Sun forum but I have seen a few posts regarding Windows. As stated earlier my company's software aims to be platform independant. Basically how do I repeat what I have done on Solaris in a Windows environment. The foot pedals have drivers and are proprietaary pedals to be used for Olympus audio devices and software. I know where Windows stores its drivers but where do the drivers read and write to? Where are the endpoints stored?
# 10
Hello.
On Windows the device files (equivalents to /dev/xxx) have names of the form \\.\xxxx (e.g. \\.\pedaldevice1). You require special tools to list these devices.
Using /dev/usb/xxx you do not access the USB device itself but you send data to the device driver. Each device must have a device driver. The driver uses special commands (see Solaris USB DDK) to access the USB device. This is the same in Windows.
Under Windows there is no direct equivalent to the "ugen" device driver.
If you wish to access an USB device under Windows "directly" (without having the special driver) you may use the "LIBUSB-WIN32" freeware tool. It works similar to "ugen". I don't think it works under Vista.
Martin
# 11
Thanx Martin for the post. I have a driver for the foot pedals on XP. However since the Olympus drivers are propriety pedals used for Olympus audio devices and software I am looking for a way to differentiate the states of pressing each pedal. I was wondering if anyone has links to raw input examples to access devices Windows. If not I may have to look into driver kits to develop a program to access input reports.
# 12
I managed to find some programs using raw input. Unfortunately examples of raw input are only of keyboards and mice. There is no low level information on how to use raw input for devices in general. The programs print out input data from the mice. So does anyone know how to manually assign drivers to devices? If I can get Windows to think the foot pedal is a mouse I can then use the raw input programs.