Hi,
following problem.
I have setup a Teensy LC as USB Joystick + Serial device with:
in usb_desc.h.
Basically it is working fine but I found a strange behavior when using it under Linux:
The device is not polled unless I attach a program that actually uses a joystick (like jstest-gtk).
I can use the serial device (I use it to send text commands to it to set a digital output and to get short responses as acknowledgements).
But I can use the serial device also only if some program that uses the Joystick is attached.
It seems that otherwise the Teensy doesn't get polled.
Is there something wrong with my configuration or something wrong with linux?
following problem.
I have setup a Teensy LC as USB Joystick + Serial device with:
Code:
#elif defined(USB_SERIAL_JOYSTICK)
#define VENDOR_ID 0x16C0
#define PRODUCT_ID 0x0487
#define DEVICE_CLASS 0xEF
#define DEVICE_SUBCLASS 0x02
#define DEVICE_PROTOCOL 0x01
#define MANUFACTURER_NAME {'M','a','z','i','a','c'}
#define MANUFACTURER_NAME_LEN 6
#define PRODUCT_NAME {'A','r','c','a','d','e',' ','J','o','y','s','t','i','c','k',' ','E','n','c','o','d','e','r'}
#define PRODUCT_NAME_LEN 23
#define EP0_SIZE 64
#define NUM_ENDPOINTS 4
#define NUM_USB_BUFFERS 30
#define NUM_INTERFACE 2
#define CDC_IAD_DESCRIPTOR 1
#define CDC_STATUS_INTERFACE 0
#define CDC_DATA_INTERFACE 1 // Serial
#define CDC_ACM_ENDPOINT 1
#define CDC_RX_ENDPOINT 2
#define CDC_TX_ENDPOINT 3
#define CDC_ACM_SIZE 16
#define CDC_RX_SIZE 64
#define CDC_TX_SIZE 64
#define JOYSTICK_INTERFACE 4 // Joystick
#define JOYSTICK_ENDPOINT 4
#define JOYSTICK_SIZE 12 // 12 = normal, 64 = extreme joystick
#define JOYSTICK_INTERVAL 1
#define ENDPOINT1_CONFIG ENDPOINT_TRANSMIT_ONLY
#define ENDPOINT2_CONFIG ENDPOINT_RECEIVE_ONLY
#define ENDPOINT3_CONFIG ENDPOINT_TRANSMIT_ONLY
#define ENDPOINT4_CONFIG ENDPOINT_TRANSMIT_ONLY
in usb_desc.h.
Basically it is working fine but I found a strange behavior when using it under Linux:
The device is not polled unless I attach a program that actually uses a joystick (like jstest-gtk).
I can use the serial device (I use it to send text commands to it to set a digital output and to get short responses as acknowledgements).
But I can use the serial device also only if some program that uses the Joystick is attached.
It seems that otherwise the Teensy doesn't get polled.
Is there something wrong with my configuration or something wrong with linux?