Closed JaCzekanski closed 3 years ago
Using /sys/class/tty
isn't compatible with macOS - as for now, I don't have any ideas about how to properly scan for serial devices.
A naive approach is to just scan /dev
for files starting with cu.
, but at least in my case, that includes unconnected serial devices like Bluetooth SPP endpoints.
Thanks, I don't think it should cause any issue. I think that install -t
creates the target directory if it doesn't exist, but quite frankly this is not important. I'll take your patch.
Regarding auto-detection, of course /sys/class/* will not work on macos. One discovery method per OS is needed. I have already identified the use of sysctl() for freebsd. Could you please issue sysctl -a|grep ^dev
on macos to see if it shares anything with freebsd just in case ?
By the way, regarding scanning /dev/cu*
or /dev/tty*
, it was in my original approach but I prefer to keep it as a last resort only, because I fear that just probing them by tring to open the devices will lead to errors or kernel messages on certain platforms.
Merged manually to remove a trailing space. Thanks!
make install
fails on macOS due to a non-GNU version ofinstall
command.Fix applied:
I hope this doesn't cause any issues on other *nix systems.