Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Orange Pi Lite Micro USB port
#11
go in root mode (sudo su) and try the commands below , checking dmesg output

"echo 0 > /sys/bus/platform/devices/sunxi_usb_udc/otg_role"
"echo 1 > /sys/bus/platform/devices/sunxi_usb_udc/otg_role"
"echo 2 > /sys/bus/platform/devices/sunxi_usb_udc/otg_role"

also worth cheching if g_ether module is not loaded to avoid it expecting a serial connection (lsmod)
Reply
#12
Ok, so.. I had to change the syntax of the commands. I did this instead:
echo "0" > /sys/bus/platform/devices/sunxi_usb_udc/otg_role

When I did the command for echo "0", plugging and unplugging things did not give any new lines in dmesg.
When I did the command for echo "2", plugging and unplugging things did not give any new lines in dmesg.
When I did the command for echo "1", I was able to use the micro usb port completely.

Given that, I think what I need to do is the following:
sudo nano /etc/systemd/system/serial-getty@ttyGS0.service.d/10-switch-role.conf

insert the text below

[Service]
ExecStartPre=-/bin/sh -c "echo 1 > /sys/bus/platform/devices/sunxi_usb_udc/otg_role"

Ctrl X to exit, Y to save

I gave it a shot and it doesn't quite work.

When I boot up, the micro port is not functioning. When I escape emulationstation with F4, I cna check the contents of otg_role and it appears to have a 1 in the file. however, lsusb has no device for anything plugged into the port.
Here's where it's odd. If I do a sudo nano and edit otg_role, retype the 1, then save it, the port begins to work normally again.
Reply
#13
Update:

When I last left this, my 10-switch-role.conf file had two lines in it. (I left the original entry in the file which was to echo 2 into otg-role.) Since using 1 worked, I decided to eliminate the first Service entry and just have the entry for 1. Now the port works completely normally when the system boots.

Thanks for your help in debugging this.
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  Orange pi lite retrorangepi 4.1 won't boot Merlin3D 6 4,916 11-11-2018, 08:23 PM
Last Post: Doogie10
Big Grin Picked Up my Orange pi plus 2 after a while Brottus 1 1,056 07-02-2018, 08:22 PM
Last Post: alexkidd
  how to fix screen black bar at bottom AV orange pi zero jamespoo 4 2,253 05-28-2018, 12:15 PM
Last Post: jamespoo
  OrangePi Pc connect via micro usb saroninux 3 2,203 05-18-2018, 04:17 PM
Last Post: alexkidd
  RetrOrangePi 4.1 - Orange Pi Zero GPIO - Getting GPIO to work bharathram21391 15 6,872 05-15-2018, 04:58 PM
Last Post: alexkidd
  Included Firefox Browser Freezes the OPi lite DeJaVu 2 1,435 05-06-2018, 05:12 PM
Last Post: DeJaVu
  Trouble connecting bluetooth ps4 controllers to orangepi lite board Sternosaur 1 1,455 04-04-2018, 09:38 PM
Last Post: alexkidd
  Orange Pi Zero with - 4.1 Rpi - expand filesystem? popeye 6 3,338 03-23-2018, 09:44 AM
Last Post: popeye
Question Cannonball port not loading (Ropi 4.1) canadien 6 3,951 03-13-2018, 08:03 PM
Last Post: canadien
  Orange pi zero h3 512mb help Merlin3D 1 1,728 03-07-2018, 07:11 PM
Last Post: alexkidd

Forum Jump:


Users browsing this thread: 1 Guest(s)