I am looking for a solution to remotely power cycle embedded devices that are connected via a USB hub to a server. I have a software solution (usbreset.c) that was posted in several responses in stack overflow - rebooting the usb port. This works if the device is still alive, can be detected by the server, but, it just fails to communicate with the server. I have had to use it a few times. however, sometimes the device could hang or freeze on a gui page and there is no serial communication. This requires physically power cycling the device using it's on-off switch. Someone suggested raspberry-pi solution. But as per that solution, I would need one raspberry-pi per device. It's as if using a raspberry-pi to serve as a relay. This is expensive and cannot scale. Could relays work in this situation i.e. the power pins of each device connect to a relay. So, one relay per device. There are remote IP power cycle solutions. so via a web interface it is possible to check which device is offline and power cycle just that one. Such solutions are common in IT. However, is such a solution viable to remote power cycle embedded devices connected at the other end?
Asked
Active
Viewed 213 times
0
-
Just find something with a lot of outputs and have it toggle relays indeed. There will no doubt be existing industrial automation products which can do this - no need to reinvent the wheel. – Lundin Nov 04 '22 at 14:12
-
This is not a software development question, it is a system design question. Of course it is possible why would it not be? However it is an X-Y problem. You might want to consider why your embedded devices might "hang" and require resetting and fix that. Before implementing an external supervisor, you should probably consider implementing appropriate mitigation at the device. First level is to consider software quality and robustness, then local-supervisory system using a software / hardware watchdog combination - most MCUs have H/W watchdogs. Then consider external supervisory control. – Clifford Nov 05 '22 at 20:55
-
1... however if the power supply is via the USB power, simply dropping the power without the host being involved is probably a bad idea. https://acroname.com/industrial-managed-usb-hubs-and-switches – Clifford Nov 05 '22 at 21:02
-
As commented above, you question does not follow the standards for questions asked on this forum. This being said, the [ykush3](https://www.yepkit.com/product/300110/YKUSH3) may be the solution to your problem - I am using it for power-cycling an SBC powered-up by USB. – Frant Nov 06 '22 at 02:50