k5prog
k5prog copied to clipboard
Need one extra Line to work on macOS:
Hi :-)
Great work from your side!! To get this program running on Mac (Silikon) you need one extra line code. Otherwise you get an error:
"k5_receive: bad magic number" or "error 22 Invalid argument"
Function"int openport(char *port,speed_t speed)"
..... cfmakeraw(&my_termios); cfsetospeed(&my_termios, speed); <-Needed for MacOS cfsetispeed(&my_termios, cfgetospeed(&my_termios)); ....
Cheers DO9JN
Thanks, it is also needed on Intel Mac
macos version: 14.4.1 (23E224) Xcode Version 15.3 (15E204a) gcc version 13.2.0 (Homebrew GCC 13.2.0)
PS: only /dev/cu.usbserial-xxxx work, not the /dev/tty.usbserial-xxxx
Hello, tried and tested. First it failed, then I compared the code.
The actual line that needs to be added is the third one:
.....
cfmakeraw(&my_termios);
cfsetospeed(&my_termios, speed);
cfsetispeed(&my_termios, cfgetospeed(&my_termios)); <-- This is the actual line that needs to be added.
....
Hello, tried and tested. First it failed, then I compared the code.
The actual line that needs to be added is the third one:
..... cfmakeraw(&my_termios); cfsetospeed(&my_termios, speed); cfsetispeed(&my_termios, cfgetospeed(&my_termios)); <-- This is the actual line that needs to be added. ....
Confirmed that this patch works in macOS 14.4.1