I am converting and old Raspberry Pi (old because 3B+) to OpenWRT. I used to be able to control the fan speed using PWM, but I could not find the way to do so with OpenWRT.
I have not been able to read the temperature from /sys/class/thermal and I have not been able to find how to install the command line GPIO to configure and invoke PWM.
I have the hardware part running (fan, transistor, cabling) running fine, I used it in an earlier project, that is the software that is causing my problem.
And I know that Raspberry Pi is supposed to run without fan, but in climates where temperature can climb to 40C, a fan is not a bad idea. And I know I could have the fan run permanently, but I like the idea of controlling the speed. it helps preserving the life of the fan.
I am looking for the same solution.
This feature would suit raspberry pi stored in the bottom of the box very well.
Has colleague @Olivier2553 found any solutions?
Why not just connect a fan and let it run? I think there's not going to be much difference. My pie runs it as I just told you. Since you are running the Raspberry in heaty climates, it is better to just let it run. (Note: by "connect" I mean connect the fan to the pi's 3v3 and gnd pins)
This was what I used for the rpi4 case/fan in boot/config.txt as @anon50098793 pointed out, it worked, I'm guessing it would work for other fans, you'd just need to change the PIN number/temp for your needs