Closed richna closed 3 years ago
Glad to hear you're finding the pimon driver/utility useful!
As for the fan shim, it should be on during power on, so that's fine. I'm sure you've already made sure the shim is attached correctly, however just for reference, it needs to match this: https://pinout.xyz/pinout/fan_shim
If the fan still won't change its power state, even though the control pin (BCM pin 18) changes its value, then I would suspect either a hardware issue or the contact between pin and shim is flaky. I've had a problem with that myself where I had to fiddle with the shim until it made contact properly. (I also had a problem with one of my RPis pins being broken, but hopefully that's not your case.)
Concerning editing the path, what you need to do is:
__init__.py
file ( https://github.com/thebel1/thgpio/blob/main/pyUtil/gpioLib/__init__.py )GPIO_DEVICE_PATH = '/dev/vmgfx32'
ls /dev/
in the ESXi shell and locate the vmgfx* device(s)/dev/vmgfx32
4.2. If you installed the GPIO driver second, the file should be /dev/vmgfx33
4.3. It just keeps counting up from there as far as I can tell__init__.py
file and set GPIO_DEVICE_PATH
to the correct device pathThe procedure is not ideal and I'm working on a way to avoid it.
Thanks for the suggestions and for updating the README. I tried setting the fan to off and then gently moving the shim. In a slightly different position the fan turned off so i toggled it back on using the script and it now switches on and off correctly. I think you're right that the shim isn't making perfect contact to the pin 18 in certain positions.
Thanks again for your help and for writing such useful utilities.
Glad you got it to work! Closing the issue.
Thankyou for writing both this utility and the pimon utility and I hope you don't mind me logging this issue.
I have both this util and thpimon installed. The pimon utility is working perfectly and incredibly useful for checking temperatures.
When I boot my Pi, the fan shim defaults to on. If i run the gpio_fanshim script, everything works as expected except the "fan" option which doesn't seem to toggle the fan. If i check the value of pin 18 manually using the other script i can see it changing from 0 to 1 but the actual fan continues to spin. Could this be a hardware issue with my shim or is it possible this is a bug?
As a side note, i was struggling to follow the instruction to change the "GPIO_DEVICE_PATH" as i didn't know how to find out the correct value. I noticed in another bug entry you mentioned this command "zcat /var/log/boot.gz | fgrep gpio" which helped me find the right entries for both utilities. Perhaps you could add that to the README incase someone else is helped by it.
Thanks again for your work on this.