Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 2 of 2

Thread: raw hid on linux

  1. #1

    raw hid on linux

    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

  2. #2
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,169
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •