Keyboard Shortcuts
ctrl + shift + ? :
Show all keyboard shortcuts
ctrl + g :
Navigate to a group
ctrl + shift + f :
Find
ctrl + / :
Quick actions
esc to dismiss
Likes
Search
USB experts? Question about serial devices, implementing multiple ports on QDX
Hi all So there was some discussion here about implementing a second serial port on QDX. This would allow some configuration and monitoring activities to take place on one serial port connected to a terminal emulator, while another serial port is connected to WSJT-X for CAT control.? Implementing a second serial port using microcontroller UARTs is a relatively straightforward proposition however, less useful than it would be to be able to have TWO serial ports across the USB cable. However, resource constraints mean that it appears difficult, perhaps impossible, to support TWO serial ports on USB - that's why I am asking if there are any USB experts on here.? Details - the serial port is the Communications Device Class Abstract Control Model (CDC ACM). The STM32F401 used has a USB peripheral supporting 4 pairs of endpoints. For non-USB experts... endpoints are like a USB communication channel between the PC and the device. In QDX these are used as follows: 0: USB control endpoint - this is always endpoint zero in any USB system 1: CDC Data in/out endpoint pair 2: CDC Command endpoint 3: Audio in/out endpoint pair The Composite device (thought of like a USB Hub) layer sits above that but does not use up any endpoints itself, it's just a wrapping. Since the STM32F401 has 4 pairs of endpoints and these are all used, it appears that implementation of a second serial port is impossible. But the world is full of tricks. There could be ways. Does anybody know? It is nice to dream that there might be some way to hack around in the code in the lowest layers of USB code and somehow fake something to look like there are more endpoints than there really are?? 73 Hans G0UPL |
Hello Ken > just an observation¡you kinda already have done this on the? > QLG2 gps module haven¡¯t you? ?a USB serial port and the? > gps data out (TTL) that I just recently ran a bluetooth serial? > dongle to. Maybe a bit of external interfacing might get? > around the requirement? Yes, the QLG2 implements a USB <-> Serial converter. Which you can use either for GPS data, or for any other purposes. So a QLG2 could be used as a converter for a QDX additional serial port implemented as a UART. That's a plan B. But it's not as attractive as being able to connect two serial devices to two QDX serial ports over the same existing USB cable we have now.? 73 Hans G0UPL On Wed, Aug 24, 2022 at 9:25 AM KEN G4APB <lfoofui.nbz42@...> wrote:
|
¿ªÔÆÌåÓý
Two ideas, both software heavy.
Option 2 sounds easier to me but still quite some work.
Andy
From: [email protected] <[email protected]> on behalf of Hans Summers <hans.summers@...>
Sent: Tuesday, August 23, 2022 10:48 PM To: [email protected] Notification <[email protected]> Subject: [QRPLabs] USB experts? Question about serial devices, implementing multiple ports on QDX ?
Hi all
So there was some discussion here about implementing a second serial port on QDX. This would allow some configuration and monitoring activities to take place on one serial port connected to a terminal emulator, while another serial port is connected to
WSJT-X for CAT control.?
Implementing a second serial port using microcontroller UARTs is a relatively straightforward proposition however, less useful than it would be to be able to have TWO serial ports across the USB cable. However, resource constraints mean that it appears
difficult, perhaps impossible, to support TWO serial ports on USB - that's why I am asking if there are any USB experts on here.?
Details - the serial port is the Communications Device Class Abstract Control Model (CDC ACM). The STM32F401 used has a USB peripheral supporting 4 pairs of endpoints. For non-USB experts... endpoints are like a USB communication channel between the PC
and the device. In QDX these are used as follows:
0: USB control endpoint - this is always endpoint zero in any USB system
1: CDC Data in/out endpoint pair
2: CDC Command endpoint
3: Audio in/out endpoint pair
The Composite device (thought of like a USB Hub) layer sits above that but does not use up any endpoints itself, it's just a wrapping.
Since the STM32F401 has 4 pairs of endpoints and these are all used, it appears that implementation of a second serial port is impossible. But the world is full of tricks. There could be ways. Does anybody know? It is nice to dream that there might be
some way to hack around in the code in the lowest layers of USB code and somehow fake something to look like there are more endpoints than there really are??
73 Hans G0UPL
|
Hello Andy Yes, both ideas would work BUT both would stray away from one of the core principles of QDX: which is that I would use existing USB device drivers so that no special software or drivers would be needed on USB for the user to install. I think it would be a non-starter because the disadvantages would outweigh the somewhat tenuous advantages... 73 Hans G0UPL On Wed, Aug 24, 2022 at 9:55 AM Andy <mm0fmf@...> wrote:
|
¿ªÔÆÌåÓý
Indeed. Moving from the standard drivers is a serious move that will open up lots and lots of "opportunities" that you don't want to have to debug and support! It's way of doing what your want, but fraught with issues.? A last resort probably.
Andy
From: [email protected] <[email protected]> on behalf of Hans Summers <hans.summers@...>
Sent: Wednesday, August 24, 2022 12:14 AM To: [email protected] <[email protected]> Subject: Re: [QRPLabs] USB experts? Question about serial devices, implementing multiple ports on QDX ?
Hello Andy
Yes, both ideas would work BUT both would stray away from one of the core principles of QDX: which is that I would use existing USB device drivers so that no special software or drivers would be needed on USB for the user to install. I think it would be
a non-starter because the disadvantages would outweigh the somewhat tenuous advantages...
73 Hans G0UPL
On Wed, Aug 24, 2022 at 9:55 AM Andy <mm0fmf@...> wrote:
|
You probably know this already but I am learning¡.
A single USB host controller can allow?up to 127 connected devices. A connected USB hub counts as a USB device address, and every device connected to it goes towards the maximum allowed addresses for that one host controller. A single USB device can allocate up to 32 endpoints. So there must be a way of doing it. 73 Ken g4apb? |
¿ªÔÆÌåÓýcan allocate up to 32 endpoints
Andy
From: [email protected] <[email protected]> on behalf of KEN G4APB <lfoofui.nbz42@...>
Sent: Wednesday, August 24, 2022 1:58 AM To: [email protected] <[email protected]> Subject: Re: [QRPLabs] USB experts? Question about serial devices, implementing multiple ports on QDX ?
You probably know this already but I am learning¡.
A single USB host controller can allow?up to 127 connected devices. A connected USB hub counts as a USB device address, and every device connected to it goes towards the maximum allowed addresses for that one host controller. A single USB device can allocate up to 32 endpoints. So there must be a way of doing it. 73 Ken g4apb? |
¿ªÔÆÌåÓýWhat's the purpose of:2: CDC Command endpoint in this scenario? ?If it's just setting parameters of the data channel, can you set those to some reasonable defaults and use that channel for something else? Just brainstorming! 73, Willie N1JBJ
|
I saw an idea on Google. Have the QDX report as a hub with two devices on it? Colin - K6JTH On Wed, Aug 24, 2022 at 6:37 AM Rob Giuliano via <kb8rco=[email protected]> wrote: I am definitely no USB expert, nor am I an STM32 expert. --
Colin Kaminski - K6JTH https://www.qsl.net/k6jth/ |
Rob, I've seen the triple Serial to USB thing before. The "Blue pill" uses the STM32F103. For whatever reason, although a considerably less well endowed device than the F401, in almost every way, in the particular area of its USB peripheral endpoint count it is superior, the F103 having 8 endpoints compared to 4 on the F401.? 73 Hans G0UPL http://qrp-labs.com https://www.buymeacoffee.com/g0upl -------- Original message -------- From: Colin Kaminski <colinskaminski@...> Date: Wed, Aug 24, 2022, 5:03 PM To: [email protected] Subject: Re: [QRPLabs] USB experts? Question about serial devices, implementing multiple ports on QDX
|
to navigate to use esc to dismiss