Skip to content

Add modprobe config to fix g_ether OTG ethernet on macOS/iPadOS#82

Closed
ju-leon wants to merge 1 commit intoOpenIPC:masterfrom
ju-leon:master
Closed

Add modprobe config to fix g_ether OTG ethernet on macOS/iPadOS#82
ju-leon wants to merge 1 commit intoOpenIPC:masterfrom
ju-leon:master

Conversation

@ju-leon
Copy link
Copy Markdown

@ju-leon ju-leon commented Mar 18, 2026

EEM mode is not supported by macOS or iPadOS. Setting use_eem=0 forces CDC Ethernet mode, which is compatible with both platforms.

This enables native streaming to Mac/iOS using the OTG port.

@henkwiedig
Copy link
Copy Markdown
Collaborator

sbc-gs does not use g_ether, a USB gadget is used.

I am suprised that this change does solve the issue for you, did you test this ?
My llm tells me we should rater user something like this:

diff --git a/board/common/overlay/usr/sbin/gadget b/board/common/overlay/usr/sbin/gadget
index 807a20d..79d55fb 100755
--- a/board/common/overlay/usr/sbin/gadget
+++ b/board/common/overlay/usr/sbin/gadget
@@ -81,17 +81,17 @@ uname -r > strings/0x409/manufacturer
 hostname -s > strings/0x409/product
 
 # 创建config1
-echo ">>>>>>>>>>>Create config1: ACM + Mass_Storage + NCM ......"
+echo ">>>>>>>>>>>Create config1: ACM + Mass_Storage + ECM (for macOS/iOS compatibility)......"
 mkdir -p configs/c.1/strings/0x409
 echo "0x80" > configs/c.1/bmAttributes
 echo 250 > configs/c.1/MaxPower
-echo "config1: ACM + Mass_Storage + NCM" > configs/c.1/strings/0x409/configuration
+echo "config1: ACM + Mass_Storage + ECM" > configs/c.1/strings/0x409/configuration
 
-# 创建NCM function
-echo ">>>>>>>>Create RNDIS ......"
-mkdir -p functions/ncm.usb0
-echo "$HOST_MAC" > functions/ncm.usb0/host_addr
-echo "$DEVICE_MAC" > functions/ncm.usb0/dev_addr
+# 创建ECM function (changed from NCM to ECM for macOS/iOS compatibility)
+echo ">>>>>>>>Create ECM for macOS/iOS compatibility......"
+mkdir -p functions/ecm.usb0
+echo "$HOST_MAC" > functions/ecm.usb0/host_addr
+echo "$DEVICE_MAC" > functions/ecm.usb0/dev_addr
 
 # 创建串口function
 echo ">>>>>>>>Create serial ......"
@@ -115,7 +115,7 @@ echo $MASS_FILE > functions/mass_storage.usb0/lun.0/file
 
 
 # 将对应function软连到c.1下面, 即启用该function,MAX 3 functions
-ln -s functions/ncm.usb0 configs/c.1/
+ln -s functions/ecm.usb0 configs/c.1/    # Changed from ncm.usb0 to ecm.usb0
 ln -s functions/acm.gs0 configs/c.1/
 ln -s functions/mass_storage.usb0 configs/c.1/
 # ln -s functions/ffs.adb configs/c.1/

This does work on linux. Can you verify on ios/Mac ? And maybe update your solution ?
Don't have hardware to test but out of curiosity: What applications do you use the stream to Apple devices ?

@ju-leon
Copy link
Copy Markdown
Author

ju-leon commented Mar 19, 2026

Tested on a RunCam WifiLink2 VRX. This fix allowed the devices to be discovered under macOS/iPad OS (both arm).

I’m certainly not an expert in this matter, I came across this solution based on this article:
https://medium.com/@donaldinos/usb-gadget-ethernet-on-radxa-zero-with-kali-linux-131352d90912

I’ll test your proposal on the weekend and come back to you!

Use-case:
Have a datalink from an iPad (running e.g. QGroundControl) to a UAV. Having a iPad as a ground station as VTX, telemetry and RC as an OpenSource alternative to what e.g. DJI offers with their drones (control, telemetry and video through the same link, connected to a tablet/phone on the ground)

@henkwiedig
Copy link
Copy Markdown
Collaborator

g_ether isn't even enabled in the buildroot image so how can this solve your issue.
What version of sbc-groundstation are you running ?
The buildroot snapshot or the old 2.0.0 beta or older ?

@henkwiedig
Copy link
Copy Markdown
Collaborator

Were you able to check this ?

@ju-leon
Copy link
Copy Markdown
Author

ju-leon commented Apr 5, 2026

Seems to work on the latest release out of the box -> closed

@ju-leon ju-leon closed this Apr 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants