Page 1 of 1
How does the ACM chip on the USB controller work?
Posted: Mon Feb 01, 2021 11:09 am
by austanss
I'm interested in creating a method of real-hardware testing with my OS. If I encounter errors, I can check serial monitor when virtualizing. When testing on real hardware, although I do have an RS-232 port, I do not have a method of monitoring it. Yet, I have an Arduino that uses ACM to communicate over serial. I programmed it to act as a serial loopback cache. It works.
I am wondering how the ACM chip on the USB controller works.
Mainly, how it maps to a virtual serial port.
Does it a) map directly to a serial port that you can simply outb to, or b) wait on the USB controller to be configured, requiring a USB driver?
There is a very sparse amount of information on ACM, I hope someone here knows a thing or two.
I am willing to write a USB driver, may it be necessary.
Re: How does the ACM chip on the USB controller work?
Posted: Mon Feb 01, 2021 12:08 pm
by austanss
I can't find hardly any information on ACM and writing a driver on the whole of the Internet.
Re: How does the ACM chip on the USB controller work?
Posted: Mon Feb 01, 2021 2:16 pm
by iansjack
If it's a USB device then you are going to have to write a USB driver. It would probably be easier to write the basic driver, getting it to work with keyboards, mice, and storage devices first. Then you can look into the particulars of your UART.
Re: How does the ACM chip on the USB controller work?
Posted: Mon Feb 01, 2021 2:30 pm
by austanss
There is virtually no information on ACM on the whole of the internet.
Re: How does the ACM chip on the USB controller work?
Posted: Mon Feb 01, 2021 3:16 pm
by iansjack
Re: How does the ACM chip on the USB controller work?
Posted: Mon Feb 01, 2021 4:34 pm
by austanss
I obtained the oldest Linux kernel source with ACM to minimize bloat (v2.5.0)
Re: How does the ACM chip on the USB controller work?
Posted: Mon Feb 01, 2021 10:11 pm
by Octocontrabass
The USB ACM specification is here (in PSTN120.pdf). That document doesn't cover the USB host controller, which you need to write a driver for before you can write the ACM driver.
Re: How does the ACM chip on the USB controller work?
Posted: Wed Feb 03, 2021 4:41 am
by rdos
iansjack wrote:If it's a USB device then you are going to have to write a USB driver. It would probably be easier to write the basic driver, getting it to work with keyboards, mice, and storage devices first. Then you can look into the particulars of your UART.
Actually, keyboards & mice are extremely complicated (HID protocol) unless you use the boot protocol, which most mainstream OSes will not use since it is too limited. For USB discs, there is information lacking on how the transport layer works (behind pay-walls), and so those are complicated too. I think the CDC driver is a lot less complex, and everything is documented in the USB standard. Another possibility if you want a USB serial driver is to use FTDI based converts (practically all commercial products are based on FTDIs protocol). The FTDI protocol is rather simple too.
Re: How does the ACM chip on the USB controller work?
Posted: Wed Feb 03, 2021 1:47 pm
by eekee
rizxt wrote:When testing on real hardware, although I do have an RS-232 port, I do not have a method of monitoring it.
Any old laptop with with a docking station (or base) should do, running FreeDOS, Linux, 9front... pretty-much anything. I guess some of the newer docking stations might not have RS-232. Alternatively, old laptop plus a USB-serial dongle, but depending on the dongle's chipset you might need Linux or a commercial OS. You'll also want a "null modem" cable - it has some wires exchanged between the ends.
@OCB: Thanks for the link