-
Notifications
You must be signed in to change notification settings - Fork 129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Resolve Mac OS setting Prolific Technology adapter #194
base: main
Are you sure you want to change the base?
Conversation
This resolves an issue where the baudrate would not be recognized on Mac OS. The adapter details for the faulty adapter are below: Device Descriptor Descriptor Version Number: 0x0200 Device Class: 0 (Composite) Device Subclass: 0 Device Protocol: 0 Device MaxPacketSize: 64 Device VendorID/ProductID: 0x067B/0x2303 (unknown vendor) Device Version Number: 0x0300 Number of Configurations: 1 Manufacturer String: 1 "Prolific Technology Inc." Product String: 2 "USB-Serial Controller" Serial Number String: 0 (none)
I think this issue is very important... |
…ort-rs and mio-serial. The problem comes with their baudrate fd mechanism is different compare to all others in macOS. Related issue : serialport/serialport-rs#194
Thank you for this PR @skmagiik! I finally managed to get some PL2303 devices and give the proposed changes a spin (on top of the current master (with 7ee2b5a/sirhcel/pr-194-prolific-baud). For me, just running the tests with a pair of FT232H Mini module and a PL2303 cable fails at several points:
My default test setup uses SiLabs CP2102N dongles and the changes makes some tests with a pair of them failing as well:
I will have a more in-depth look into this the next days. But at a first glance this looks like - besides the timing issue with the PL2303 - the changes are breaking baud rate setting via Could you please give the tests a spin in your setup @skmagiik or @pmnxis? |
Looking deeper into my results from #194 (comment) with an oscilloscope, I was surprised that I did see data output from the PL2303 cable (with a blue connector housing) only in rare cases. For example, running the example I did testing with macOS 10.15.3 on a M1 machine using the driver shipped with the OS. I learned that there is also a driver from Prolific distributed via the Mac AppStore and with this one, things look better: Some test cases are still failing (with timeouts) but baud rate setting and transmitting at the set speed (with sirhcel@51df58f) seems possible. Which version of macOS, which CPU architecture and witch device driver are you using @skmagiik and @pmnxis? |
@sirhcel Hello Thanks for looking on this issue , it would be very helpful. I am working on egui based serial-terminal on macOS/Linux/Windows. Some interesting thing is that the some of PL2303 is a counterfeited chip from China, and it's not clear how it will behave on a macOS depending on whether it's a counterfeited or legit. I'll try to get a good PL2303 and a cloned PL2303 and compare the differences. And may need check if all of prolific's products have different termios access. The code I forcibly modified with unsafe is a hotfix method used by prolific in macOS environments, but I'm not sure if it's a good method because I only tested it on PL2303HX. |
I have not booted up Windows yet, but running my test from above on Linux worked just fine.
I read about it. And was wondering what I have bought because of the strange behavior with the driver shipped with Sequoia. Sourcing PL2303 devices feels a bit challenging as my usual "purveyors of the court" do not list them. So i ended up buying some cables at Amazon. Let alone soucing individual ICs. Do you have a trusty source for PL2303 ICs or devices? How do you tell genuine and fake devices apart? Looking at the screenshots in #194 (comment): Where do you get this information about the assocated device driver from? |
It's decisivetactics's commercial software, Serial 2. |
This resolves an issue where the baudrate would not be recognized on Mac OS.
fixes #190
The adapter details for the faulty adapter are below:
Device Descriptor
Descriptor Version Number: 0x0200
Device Class: 0 (Composite)
Device Subclass: 0
Device Protocol: 0
Device MaxPacketSize: 64
Device VendorID/ProductID: 0x067B/0x2303 (unknown vendor)
Device Version Number: 0x0300
Number of Configurations: 1
Manufacturer String: 1 "Prolific Technology Inc."
Product String: 2 "USB-Serial Controller"
Serial Number String: 0 (none)
I tested with other adapters (mostly FTDI adapters) and baudrates and this has not provided me with any adverse side effects.