Skip to content

Conversation

@navhaxs
Copy link

@navhaxs navhaxs commented Dec 17, 2016

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 🍾 🍰 👍

@CapitalF
Copy link
Owner

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.

@navhaxs navhaxs changed the title trivial change for osx osx support Dec 17, 2016
@navhaxs
Copy link
Author

navhaxs commented Dec 17, 2016

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
Copy link
Author

navhaxs commented Dec 17, 2016

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants