Jerry: could you just use the standard Serial + Audio USB configuration on the primary microUSB port, then add an external USB-to-serial adapter plugged into the USBhost port & use that additional interface for your CAT control ??? Just a thought...
Mark J Culross
KD5RXT
toggle quoted message
Show quoted text
On Wed, Feb 19, 2025 at 5:54 PM, jerry-KF6VB
<jerry@...> wrote:
All,
? I have been working on CAT ( remote control ) for the T41.? I
re-architected it to a data-driven approach that is much cleaner and
will be easier to maintain and expand.
? I have the basics running:? read & set the frequency, read & set the
volume and mike gain, set the operation mode, make it transmit.? It is
an emulation of the Kenwood TS-2000.? There is a LOT of stuff that we
don't do yet.
? I have given the code to Jack.? I hope it winds up in the permanent
archive.
? Right now, I am getting nowhere fast with the next step:? piping audio
over the USB.? With that, we would be able to run digital modes with
nothing but a USB cable between the radio and a PC.
? USB function is selected by the "USB Type" pulldown at the Arduino
IDE.? There are various combinations of functions, but not the one that
we need:? two serial ports, plus audio.? One serial port for the teensy
uploads & Serial printf()s, a second serial port for CAT control, and an
audio port.
? The code that implements these USB functionalities is buried in the
Teensy "core" - the actual TeensyDuino code.? In my system this is
at:
c/Users/Jerry/AppData/Local/Arduino15/packages/teensy/hardware/avr/1.59.0/cores/teensy4.
The definitions of the USB choices are in usb_desc.h.? It's basically a
big array of #define's.? Lots of sets of #defines, each set in an #elif
section.
ANYWAY, I hijacked the "USB_TRIPLE_AUDIO" section and replaced the third
serial port with audio.
Big fail.? It compiles and loads, but then the "composite USB device"
does not start, there not only no audio, there are no serial ports.?
Without serial ports, I have to hit the button on the Teensy to upload
new code to it.? I'm at a bit of a loss as to how to troubleshoot it.
USB is pretty complicated...and no debugger.? Can't even do debug
printf's.? One possibility would be to hook up a not-USB serial
interface to a couple of
teensy pins.? Or do what I did once upon a time...find an unused I/O pin
and have it emit morse code.
The Teensy is limited to 8 USB "Endpoints".? That limits the number of
USB devices you can have active.? Two serial ports plus audio maxes it
out.? Which is too bad.? There's also a simulated disk drive, which
could come in handy.
Any USB experts out there?
? ? ? ? ? ? ? ? ? - Jerry, KF6VB