-
Under both physical machine and Proxmox VM, I have the same issue. The following is under a physical machine (Intel J4125 mini PC).
|
Beta Was this translation helpful? Give feedback.
Replies: 17 comments 16 replies
-
Building without libserialport does not help.
|
Beta Was this translation helpful? Give feedback.
-
Just wondering if you can help to see if you are able to reproduce the issue or not. Thanks. I have only done some simple tests using avrdude-test-script under FreeBSD 14.0. FreeBSD 14 x86_64 virtual machine or Intel J4125 Mini PC physical machine
|
Beta Was this translation helpful? Give feedback.
-
Very old reports of similar issue is for Solaris 10/11i back in 2008. So it is probably not relevant. |
Beta Was this translation helpful? Give feedback.
-
No issues under NetBSD 9.3.
|
Beta Was this translation helpful? Give feedback.
-
No issues under OpenBSD 7.4 either (Intel N4500 mini PC, physical machine).
|
Beta Was this translation helpful? Give feedback.
-
Does the problem occur with USB serial adapters other than the CH340 series? If you can use another serial adapter, the problem is most likely with the CH340 series driver. In some cases, reducing the speed may improve the situation. If other serial adapters also do not work, there may be an issue with the USB passthrough feature between the physical PC and the guest operating system. |
Beta Was this translation helpful? Give feedback.
-
The latest tests are done with physical machine and not virtual machine. I will see if I can test with another USB to Serial adapter. CH340 driver support should be quite mature for FreeBSD 14.0 (latest Release version). And FreeBSD is supposed to have better driver support than OpenBSD/NetBSD. |
Beta Was this translation helpful? Give feedback.
-
If I can chip in: the only difference between serialupdi and urclock is the
These flags are defined in here: https://github.com/avrdudes/avrdude/blob/main/src/libavrdude.h#L797-L799 Then, in turn, these are translated to OS-specific flags here: https://github.com/avrdudes/avrdude/blob/main/src/libavrdude.h#L797-L799 Difference between the two modes is SERIAL_NO_CSTOPB/SERIAL_CSTOPB and SERIAL_NO_PARITY/SERIAL_PARENB, which translates to: if (cflags & SERIAL_CSTOPB) {
termios.c_cflag |= CSTOPB;
} else {
termios.c_cflag &= ~CSTOPB;
} and if (cflags & (SERIAL_PARENB | SERIAL_PARODD)) {
termios.c_cflag |= PARENB;
} else {
termios.c_cflag &= ~PARENB;
}
if (cflags & SERIAL_PARODD) {
termios.c_cflag |= PARODD;
} else {
termios.c_cflag &= ~PARODD;
} Maybe one of these is not recognized correctly by FreeBSD implementation of serial interface? |
Beta Was this translation helpful? Give feedback.
-
I modified the libserialport example and it seems to me Same with the build-in example I carry out the tests with another virtual machine running FreeBSD 13.2 Release this time. It was the same when I tested with the physical machine running FreeBSD 14.0 Release.
|
Beta Was this translation helpful? Give feedback.
-
No issues with an FTDI USB to Serial Converter (this is not a USB to TTL converter so I can not use it).
|
Beta Was this translation helpful? Give feedback.
-
Okay, it seems to me FreeBSD really does not like CH340.
Please help to check if you can set |
Beta Was this translation helpful? Give feedback.
-
It seems to me only serialupdi uses
|
Beta Was this translation helpful? Give feedback.
-
Anyway, I do not think this is an avrdude serialupdi issue. I will close this and transfer to a discussion. |
Beta Was this translation helpful? Give feedback.
-
FreeBSD ch340 driver does not seem to support parity bits and stop bits settings.
OpenBSD -- similar to NetBSD but with will error out with a certain revision of CH340 https://github.com/openbsd/src/blob/master/sys/dev/usb/uchcom.c
NetBSD -- seems to be most updated
|
Beta Was this translation helpful? Give feedback.
-
Just wondering if you can confirm this as well. Thanks. |
Beta Was this translation helpful? Give feedback.
-
Are you sure that WaveShare 21442 works? According to your usbconfig, the PID is 0x55d3, it doesn't support for uchcom(4):
|
Beta Was this translation helpful? Give feedback.
-
Wiki updated. |
Beta Was this translation helpful? Give feedback.
This issue is with FreeBSD CH340 driver and not avrdude.