What's new

Help with RPi Zero OTG on the RT-AC68U? (merlin, modprobe)

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

refactored

New Around Here
Hello.

Hardware: RT-AC68U
Firmware: Merlin, 380.59

After reading this thread, I've managed to get a Raspberry Pi Zero running via OTG. Mostly it works, however I have to call:
Code:
echo Y > /sys/module/usbcore/parameters/old_scheme_first
before rebooting to get the device to be configured correctly and show on the network. Once rebooted, the value of "old_scheme_first" resets to "N" and rebooting again fails to configure things correctly.

Is there a way I can permanently set "old_scheme_first" somewhere in the Merlin FW? I've tried modifying /etc/modprobe.conf but it's a read-only file.

Thanks!
 
I've added the line to both services-start and init-start, but it's still not configuring things correctly during a cold boot; old_scheme_first reads as N once the router is up and running.

Manually setting old_scheme_first to "Y" then rebooting allows the Pi to be configured correctly, but it's hit-and-miss.

Edit

After some playing about, my init-start script looks like this:
Code:
#!/bin/sh

# Configure USB to use the old scheme first for finding the Pi-Hole
echo -n "Y" > /sys/module/usbcore/parameters/old_scheme_first

# Unbind and rebind all the USB ports, so the Pi can be found
for i in /sys/bus/pci/drivers/[uoex]hci_hcd/*:*; do
  echo "${i##*/}" > "${i%/*}/unbind"
  echo "${i##*/}" > "${i%/*}/bind"
done

# Replace hotplug2 rules with our own, and restart hotplug2
ln -sf /jffs/hotplug2.rules /etc/hotplug2.rules
killall hotplug2

This does work, but only after I ssh into the router and execute it manually. It does not have the desired effect when booting. Permissions are `-rwxr-xr-x`.

This code doesn't work if it's added to services-start.
 
Last edited:

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top