gridfan icon indicating copy to clipboard operation
gridfan copied to clipboard

osx support

Open navhaxs opened this issue 8 years ago • 3 comments

Good news - your script works on macOS!

I only had to make a minor modification for the macOS version of stty.

The device file that worked was /dev/cu.usbmodem1461 (worth putting in readme). Don't really understand at the moment why using /dev/tty.usbmodem1461 was not working. I haven't investigated a way to set device file permissions on Mac, if even possible. Just used sudo:

bash-3.2# sudo ./gridfan -d /dev/cu.usbmodem1461 init

Trying to initialize communications with the controller.

  Please wait:

Success! Controller initialized.

bash-3.2# sudo ./gridfan -d /dev/cu.usbmodem1461 set fans all speed 0

Fan 1 successfully set to 0% speed.
Fan 2 successfully set to 0% speed.
Fan 3 successfully set to 0% speed.
Fan 4 successfully set to 0% speed.
Fan 5 successfully set to 0% speed.
Fan 6 successfully set to 0% speed.

bash-3.2# sudo ./gridfan -d /dev/cu.usbmodem1461 show all

Fan 1: 0 RPM
Fan 2: 0 RPM
Fan 3: 0 RPM
Fan 4: 0 RPM
Fan 5: 0 RPM
Fan 6: 0 RPM

Awesome! Nice work, @CapitalF 🍾 🍰 👍

navhaxs avatar Dec 17 '16 00:12 navhaxs

Thanks for letting me know. It may be a few weeks but I will check this out and merge in. I have a Mac here that I can test on.

The script was not designed for portability away from Linux, so I'm surprised it works. Mac is still on ancient BASH 3.x too, and I'm prone to use BASH 4 features without thinking about it.

The cu device is an old unix thing related to the tip and cu utilities. I think it stood for "call unix", and was basically a null modem kind of thing. It's a raw device, whereas the tty device has some settings designed for terminals that is probably mucking things up.

CapitalF avatar Dec 17 '16 02:12 CapitalF

Perhaps it is not as straight forward as I thought. After I rebooted, the GRID doesn't want to 'initialise', even after reconnecting the USB.

I'll be sure to post any useful findings.

navhaxs avatar Dec 17 '16 02:12 navhaxs

Figured out the problem. My initial test was working because I had screen /dev/cu.usbmodem1461 running in the background whilst executing the script.

See http://electronics.stackexchange.com/a/5175/87927

navhaxs avatar Dec 17 '16 21:12 navhaxs