raw hid on linux

Status
Not open for further replies.

cmason

Well-known member
Has anyone successfully used the hid_listen RAW hid serial console on linux? I'm trying to get it to work on a raspberry pi and hot having much luck. It works great on my mac.

I've tried the stock 1.0.2-beta 9 code with -DUSB_HID and this test program.
Code:
#include <stdlib.h>

#include "avr_functions.h"
#include "elapsedMillis.h"
int main(void)
{
    pinMode(13, OUTPUT);

	bool blink = 0;
	while(1) {
    	Serial.println("hello");
    	Serial.flush();
    	digitalWrite(13, blink);
    	blink = !blink;
    	delay(1000);
    }
}

This gives this lsusb output but the hid_listen executable just says waiting... forever. The same hid_listen program compiled on the mac results in the expected hello output.

I do have CONFIG_HIDRAW=y in the kernel config. Are there other config options I need?

If someone can confirm if this works on regular desktop x86 linux, it would be most helpful.

Thanks,

-c
 
When you plug the Teensy in, does a new /dev/hidraw# device file appear?

Did you install the udev rules? Or just run hid_listen as root, so it always has permission to access the device.
 
Status
Not open for further replies.
Back
Top