Sharing Internet using USB-C cable

The weak performance of the bundled antenna is an issue, but I’m also looking for a way to connect the uConsole to a network in an environment that doesn’t provide WiFi.
One of the ways is to share the internet on macOS via a USB-C cable, which I did as shown below, but in the end I was unable to make any connections on macOS.
If someone could point out where I went wrong, I would greatly appreciate it.

  1. modified /boot/config.txt from dtoverlay=dwc2,dr_mode=host to dtoverlay=dwc2

  2. append modules-load=dwc2,g_ether to /boot/cmdline

  3. add libcomposite to /etc/modules

  4. Add denyinterfaces usb0 to /etc/dhcpcd.conf

  5. sudo apt-get install dnsmasq

  6. create /etc/dnsmasq.d/usb file.

  7. Create /etc/network/interfaces.d/usb0 file
    auto usb0
    allow-hotplug usb0
    iface usb0 inet static

Then reboot, and usb0 interface is up and configured.
uConsole is connected with macOS via USB-C, but no interface appears nor system alert that shows like ‘new usb device found’.

PS1) if /boot/config.txt changed to dtoverlay=dwc2,dr_mode=peripheral, keyboard/mouse of uConsole does not work at all.

Maybe you need the Mac drivers? HoRNDIS: USB tethering driver for Mac OS X | Joshua Wise's domain

This is the driver used on the gameshell for USB ETH.

This guy just works. Dell usb3 gigabit Ethernet adapter.

1 Like

@Petrakis Thank you for your reply.
The latest version of driver is outdated and does not work on macOS 13.
And I built kext my own without signining & turned off system guard using csrutil in Safe Mode of macOS. BUT eventually I had to delete the kext because the whole macOS system stopped in networking. After delete the kext and reboot, everything work again.

@barry99705 Thank you for your suggestion. But I have only one Ethernet line for my macbook and I am trying to share its internet connection with uConsole. I’ll keep trying to make connection using USB-C.

1 Like

I thought the USB C port on the uConsole was power only. Does it even have data lines connected to it?

The USB C port has data lines connected to it, which go directly to the SODIMM port for the core.

From what I can tell, it’s listed as “power only” because not all cores connect that line. From what I can tell, data should connect on the R01 core, but not the CM4 core, but I don’t know if there’s any official statement or anybody’s who’s tested them across the board. It could also not be USB 3 speeds.

If you want to check for yourself, you can follow the USB0_DP and USB0_DM wires from the USB section of the Mainboard schematic through to the specific core you’re using.

1 Like

for the CM4

I saw somewhere in the forum, the usb-c does have some data lines with the pi4 but are missing some others… something about a CC1/CC2 pin to switch modes between host or device… and the default PiOS doesn’t do auto switching just in device mode…

here is some info on the pi forum

more of an argument about someone trying to make it work…

On the CM4 adapter, for the J1 (DDR2 SODIMM), there are:

  • Pin 160: USB0_DP
  • Pin 162: USB0_DM
  • Pin 165: USB_DP
  • Pin 167: USB_DM
  • Pin 168: USB_OTGID

On the actual Compute Module, there are:

  • Pin 101: USB_OTGID
  • Pin 103: USB_DM
  • Pin 105: USB_DP
  • No matches for USB0_DP or USB0_DM

On the Mainboard for J1 (the other side of the DDR2 SODIMM):

  • Pin 168: USB_OTGID is wired to ground through a 1K resistor.

On the Mainboard for US01 (the internal USB hub), there are:

  • USB_DP and USB_DM enter the USB hub labeled as DP0 and DM0, respectively.
  • Output as DP1/DM1 through DP4/DM4.

On the Mainboard for JS01 (the Type-c port), there are:

  • Pin B6: USB0_DP
  • Pin B7: USB0_DM

From what I can tell, this means it’s physically impossible to change the USB_OTGID value (which seems to be associated with the internal hub, anyways), or for the USB-C port data connection to reach the CM4.

1 Like

@Daniel_Segel @sedwca
My mistake. I meant USB-A port not C port.
Thank you guys for letting me know infos.

I did a few more tests and Android USB tethering worked fine with g_ether.
But uConsole could not connect with iPad Pro (refered here)

PS2: When I deleted horndis kext, the USB 10/100/1000 LAN adapter that I had long ago deleted from macOS Network Preferences reappeared in the list.