Toggle USB power on/off by console on Opal gl-sft1200

Anyone know, if the GLinet router Opal gl-sft1200 supports toggle power on/off of USB port by software/console?

I found this:

And also the tool hub-ctrl:

Anyone know if they work on Opal gl-sft1200 router?

I need this to write a watchdog script for a 4G usb modem which I use on the USB port, to reset it by console, toggle it off and on again.

@admon

You’ve got a Opal kicking around, don’t 'ya? Do you have a DMM/USB volt tester?

0300cdb50609a862c4788d9d1e35b90f

Nope, I don’t own something like that.

I switch off an external USB-device by a WLAN USB-switch, but I am also interested in switching off the power of the USBport of Opal.
Imho this can only work, if the appropriate hardware is present inside the Opal - a switch to turn off the power of the USBport controlled by a microcontroller port.

1 Like

Can you please tell me which device you use, where to get it from? I am interested in both ways.

Either a way to use console of the router itself, to toggle USB power on/off, or use a USB ralay you put between the USB port and the USB device, and then either have a way to send a signal to the USB relay via console or WIFI which has also a http API. Something like:

http://relayip/toggleUSBPowerOnOff

I found this device, but I am not sure if it will work, there is no word if it has a http api you could use via curl:

https://de.aliexpress.com/item/1005005455060381.html

This is the device I use to switch USB-powered devices: Delock 11828 Delock WLAN EASY-USB

1 Like

How does it work in detail, does it have a http api? how much does it cost? but it has usb data passthrough right?

Have a look here: Delock Produkte 11828 Delock WLAN EASY-USB Smart Schalter MQTT

1 Like

Thank you very much it seems to do what I was looking for:

Zusätzliche Funktionen
Für die Verwendung mit IFTTT oder anderen Anwendungen können Sie Web Befehle verwenden.
http://(SwitchIP)/cm?cmnd=Power%20TOGGLE
http://(SwitchIP)/cm?cmnd=Power %20On
http://(SwitchIP)/cm?cmnd=Power%20off
http://(SwitchIP)/cm?&user=admin&password=put_password_here&cmnd=Power%20On

Would be nice to know if the initial way would work on the Opal though, toggle usb port power by the router itself.

Dear @WolfP I ordered one of the Delock 11828, it comes with Tasmota 7.2.0, and it arrived yesterday, but it doesnt work. No USB device behind it works. If you connect the usb device dirrectly it works. I thought it had proper USB data pass through?

When I toggle it on this comes:

[173628.149881] usb 1-1-port4: Cannot enable. Maybe the USB cable is bad?
[173629.125647] usb 1-1-port4: Cannot enable. Maybe the USB cable is bad?
[173629.132508] usb 1-1-port4: attempt power cycle
[173630.421304] usb 1-1-port4: Cannot enable. Maybe the USB cable is bad?
[173631.397083] usb 1-1-port4: Cannot enable. Maybe the USB cable is bad?
[173631.403959] usb 1-1-port4: unable to enumerate USB device
[173637.951418] usb 1-1-port4: Cannot enable. Maybe the USB cable is bad?
[173669.459582] usb 1-1-port4: Cannot enable. Maybe the USB cable is bad?
[173670.435296] usb 1-1-port4: Cannot enable. Maybe the USB cable is bad?
[173670.442226] usb 1-1-port4: attempt power cycle
[173671.731023] usb 1-1-port4: Cannot enable. Maybe the USB cable is bad?
[173672.706745] usb 1-1-port4: Cannot enable. Maybe the USB cable is bad?
[173672.713488] usb 1-1-port4: unable to enumerate USB device

And Windows also says the last usb device cant be recognized. I tested with different simple USB 2.0 flash devices, none work behind the Delock 11828.

Do you still own your 11828? can you maybe export your config file for me or tell me what your template looks like, mine is:

{“NAME”:“Delock 11828”,“GPIO”:[0,0,0,17,0,0,0,0,0,158,21,0,0],“FLAG”:0,“BASE”:53}

I am sorry to hear that. This switch works with my AVM Fritzbox 7590 without any problems. And there seem to be other people having connected a USB-storage by using this switch. Can you try the switch using it with a notebook? Maybe Opal is the problem.

Edit: I see, you tried it using Windows. Maybe the switch is DOA (Dead on Arrival)

1 Like

I have tried it now on Brume 2 and also on my Windows laptop, not working. Windows saying “doesnt recognize last USB device”, OpenWRT shows the above dmesg output. Also the device is crashing randomly when browsing the WebInterface, becomes slower and slower doing so and then crashes. I also noticed you can plug in the usb in both ways, I have never seen this before, that is totally against the usb norm and maybe break the usb of the device you plug it in. Can you maybe share your template string please with me.

There is something wrong with your switch. It shouldn’t be possible to insert it in both ways.
I never looked at the template, just inserted the switch into the USB-port of the 7590, connected it to WLAN, startet tasmota and it worked.

You can. It has some weird usb port like this:

Ironically also this cable is made by the same company : https://www.voelkner.de/products/768715/Delock-USB-Kabel-USB-2.0-USB-A-Stecker-USB-A-Buchse-1.00m-Schwarz-beidseitig-verwendbarer-Stecker-vergoldete-Steckkontakte.html

You can stick it in both sides. If you look closely though, both sides are not 100% the same width, maybe 1mm smaller, yet you can stick them in both sides, totally breaking the usb norm for USB A.

Can you please copy your template string here so I can confirm it is identical.

1 Like

I’m sorry but I don’t have access to the switch in the moment, therefore I can’t send you the template string now.
But I’m quite sure that the switches are identical.
When I’m back home I try to insert the USB-plug the other way round.