c4ev3 / ev3duder

The LEGO® EV3 Downloader/UploaDER.
http://c4ev3.github.io/ev3duder/doc/html/globals_func.html
GNU General Public License v3.0
34 stars 12 forks source link

fix(bt-unix): set serial port to raw mode #28

Closed JakubVanek closed 4 years ago

JakubVanek commented 4 years ago

Before this change, using /dev/rfcommN for BT serial on Linux wouldn't work as the kernel would send additional escape sequences. This fixes the problem by disabling almost all processing in the termios structure.

Fixes https://github.com/c4ev3/ev3duder/issues/27

I am marking this as draft only because I don't have a way of testing this on macOS, which is affected by this change too. I have tried to follow the POSIX spec closely, but one never knows.

JakubVanek commented 4 years ago

I have pushed a V2 of this that does not rely on static data and uses a handle structure instead (credits to tcp.c authors).