Host USB serial and RAWHID usage

wwatson

Well-known member
I have been experimenting with communications between two Teensy T41's using USB serial and the SerialTransfer library. One T41 is setup as master sending and receiving packets through SerialTransfer from the USB host port to another T41 acting as a USB device. This is all working well so far but would like to explore RAWHID as an option. I another thread @KurtE brought RAWHID to my attention . So I decided to start this thread. My goal is to setup a T41 with a RA8876 based TFT as a USB display device. With my current setup I want to be able to bypass the SPI driver on the host T41 and construct a packet with the parameters that would normally go to host SPI but send them to the the T41 USB slave device to be decoded and sent to the RA8876 SPI port, then the USB slave device sends back a response packet to the Master T41. I have the decoder part working. So far just reading the RA8876 status reg and sending it back to the master T41.

I would like to try the same thing using RAWHID. One thing is for sure, The SerialTransfer library is rock solid. I have yet to have a transfer failure of any kind with it. I will post my modified version of it on GitHub once I find the one with modified SerialTransfer sketches.

Any info or examples of RAWHID comms between two Teensy,s is appreciated:)
 
Last edited:
Sounds like fun!

KurtE did RawHID Device transmit work moving to 512 byte packets out to Host that he noted in that 'offtopic' post.

For Host receive grep of usbHost_t36 shows examples with RawHID references that might have usable 'crumbs':
\arduino-1.8.19\hardware\teensy\avr\libraries\USBHost_t36\examples\HIDDeviceInfo\HIDDumper.cpp:
\arduino-1.8.19\hardware\teensy\avr\libraries\USBHost_t36\examples\USBHost_viewer\USBHost_viewer.ino:

and in a couple of the examples RawHID is noted for: Mouse, MouseBT, KeyboardBT, Digitizer, Joystick.

KurtE and mjs513 may have added these or more on github
 
Sounds like fun!

KurtE did RawHID Device transmit work moving to 512 byte packets out to Host that he noted in that 'offtopic' post.

For Host receive grep of usbHost_t36 shows examples with RawHID references that might have usable 'crumbs':
\arduino-1.8.19\hardware\teensy\avr\libraries\USBHost_t36\examples\HIDDeviceInfo\HIDDumper.cpp:
\arduino-1.8.19\hardware\teensy\avr\libraries\USBHost_t36\examples\USBHost_viewer\USBHost_viewer.ino:

and in a couple of the examples RawHID is noted for: Mouse, MouseBT, KeyboardBT, Digitizer, Joystick.

KurtE and mjs513 may have added these or more on github

Thanks, That points me in the right directions:) I found this https://github.com/KurtE/RawHid. I think this is what @Kurte referred to in the off topic post.
 
Sorry, other distractions.

Yes - if I remember correctly (year plus ago) - that github project was where I had done some rawhid host code to test the rawhid 512 stuff.

There is an Open PR on core: https://github.com/PaulStoffregen/cores/pull/629
That has what I needed to change in core to support it.

I am not seeing whee I have the USBHost code right now. Looks like it should have been in fs integration branch... Will look again to see what was in it
There are breadcrumbs in the forum thread mentioned in the github project mentioned.
 
Sorry, other distractions.

Yes - if I remember correctly (year plus ago) - that github project was where I had done some rawhid host code to test the rawhid 512 stuff.

There is an Open PR on core: https://github.com/PaulStoffregen/cores/pull/629
That has what I needed to change in core to support it.

I am not seeing whee I have the USBHost code right now. Looks like it should have been in fs integration branch... Will look again to see what was in it
There are breadcrumbs in the forum thread mentioned in the github project mentioned.

Thanks, Others distractions are sometimes needed to clear the head:) I downloaded your RawHid repo and I'll start there...
 
Back
Top