This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Script reboot failing
#17
What is your LM hardware version (printed on the sticker on the side of the housing)?

Create an event script mapped to a binary object to control USB power power:
Code:
state = event.getvalue() and 'high' or 'low'
io.writefile('/dev/usbctrl', state)

Check System config > Status > System log, you should see that USB converter is disconnected when the port is powered down. Similar to this:
Code:
Jul 7 11:17:03 LogicMachine kern.info kernel: [11838588.128976] cp210x 1-1:1.0: device disconnected
Jul 7 11:17:03 LogicMachine kern.info kernel: [11838588.128729] cp210x ttyUSB0: cp210x converter now disconnected from ttyUSB0
Jul 7 11:17:03 LogicMachine kern.info kernel: [11838588.128345] usb 1-1: USB disconnect, device number 4
Reply


Messages In This Thread
Script reboot failing - by fbrun@domizy - 10.06.2024, 09:59
RE: Script reboot failing - by Daniel - 10.06.2024, 10:05
RE: Script reboot failing - by fbrun@domizy - 10.06.2024, 10:10
RE: Script reboot failing - by JMM - 24.06.2025, 14:21
RE: Script reboot failing - by Daniel - 24.06.2025, 14:42
RE: Script reboot failing - by JMM - 24.06.2025, 15:18
RE: Script reboot failing - by Daniel - 24.06.2025, 15:33
RE: Script reboot failing - by JMM - 24.06.2025, 15:48
RE: Script reboot failing - by Daniel - 24.06.2025, 15:53
RE: Script reboot failing - by JMM - 24.06.2025, 16:03
RE: Script reboot failing - by JMM - 24.06.2025, 17:28
RE: Script reboot failing - by admin - 25.06.2025, 07:17
RE: Script reboot failing - by JMM - 26.06.2025, 08:35
RE: Script reboot failing - by JMM - 04.07.2025, 10:09
RE: Script reboot failing - by Daniel - 04.07.2025, 12:42
RE: Script reboot failing - by admin - 07.07.2025, 11:20

Forum Jump: