Set both cfsetospeed and cfsetispeed#24
Conversation
|
Would cfsetspeed() work on MacOS? Setting input and output peed independently is not necessary. cfsetspeed() is supported in Linux and should also be in MacOS. |
Confirm, it works on macOS |
|
Another thing that works is initializing the struct to zero before setting any fields: I guess the root problem here is garbage on the stack being left inside the struct, so either be very sure to set every field or initialize it to 0. Initializing it might be a good idea anyway, uninitialized fields sneak around and cause insane bugs. |
Trying to run the executable on MacOS with a Baofeng cable results in:
Setting both the output and input baud rate fixes the problem.