I am hoping there is a straight forward solution to this;
I've read this thread on turning on and off the usb OTG using GPIO commands:
The concept is really clever and I was hoping to use it as part of my Octoprint 3D printing setup so that I can turn off printer when not in use. The only catch is that the method requires modifying the ./bin/orangepione.bin file which isn't present on my version of Armbian (Buster).
TL;DR according to the post I need to
1. convert ./bin/orangepione.bin to FEX,
2. edit the file by adding "usb_drv_vbus_gpio = port:PL02<1><0><default><0>",
3. convert it back to bin,
4. use the commands "echo 0 > /sys/class/gpio/gpio354/value" or "echo 1 > /sys/class/gpio/gpio354/value" to turn off/on the pin and thus usb.
Is there an equivalent file where I could modify the line "usb_drv_vbus_gpio =" which would allow me to control pin PL2?
Alternatively is it possible to control pin PL2 using the WiringOP? I am currently using it to control a relay however while looking into it I could not find any reference to PL2.
I'm fairly new to Linux and Armbian so any guidance at all would be very much appreciated.
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
Question
Fionn
Hi all,
I am hoping there is a straight forward solution to this;
I've read this thread on turning on and off the usb OTG using GPIO commands:
The concept is really clever and I was hoping to use it as part of my Octoprint 3D printing setup so that I can turn off printer when not in use. The only catch is that the method requires modifying the ./bin/orangepione.bin file which isn't present on my version of Armbian (Buster).
TL;DR according to the post I need to
1. convert ./bin/orangepione.bin to FEX,
2. edit the file by adding "usb_drv_vbus_gpio = port:PL02<1><0><default><0>",
3. convert it back to bin,
4. use the commands "echo 0 > /sys/class/gpio/gpio354/value" or "echo 1 > /sys/class/gpio/gpio354/value" to turn off/on the pin and thus usb.
Is there an equivalent file where I could modify the line "usb_drv_vbus_gpio =" which would allow me to control pin PL2?
Alternatively is it possible to control pin PL2 using the WiringOP? I am currently using it to control a relay however while looking into it I could not find any reference to PL2.
I'm fairly new to Linux and Armbian so any guidance at all would be very much appreciated.
Link to comment
Share on other sites
4 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.