I am trying to set up a Orange Pi Zero to use as a small NAT/ Bridge Device. I want to use an Android phone in USB tether mode to give its 4g connection to an interface on the opi zero then use a network bridge to join the 4g connection to the lan port, also the opi zero is gonna run a small section of code on the USB interface that changes the TTL of all packets through the interface. On my linux mint box the script looks like
pkexec sysctl net.ipv4.ip_default_ttl=65 && echo 65 | pkexec tee /proc/sys/net/ipv4/ip_default_ttl
but i am running into issues with the very first part, that is getting my phone native USB tether to be recognized as an interface in the kernel. I understand that a kernel module, I believe g_ether, needs to be installed to get this functionality. All the posts I have seen use this module to make the opi run as the HOST and not the client. Also i am new to modifying the kernel in this way so if someone knows how to do it on this distro it would be greatly appreciated.
System info:
ARMBIAN 5.65 stable Ubuntu 18.04.1 LTS 4.14.84-sunxi
Output of lsusb of the phone when in tether mode
Bus 003 Device 004: ID 0e8d:2004 MediaTek Inc.
Couldn't open device, some information will be missing
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 224 Wireless
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x0e8d MediaTek Inc.
idProduct 0x2004
bcdDevice ff.ff
iManufacturer 2
iProduct 3
iSerial 4
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 75
bNumInterfaces 2
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xc0
Self Powered
MaxPower 500mA
Interface Association:
bLength 8
bDescriptorType 11
bFirstInterface 0
bInterfaceCount 2
bFunctionClass 224 Wireless
bFunctionSubClass 1 Radio Frequency
bFunctionProtocol 3 RNDIS
iFunction 19
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 224 Wireless
bInterfaceSubClass 1 Radio Frequency
bInterfaceProtocol 3 RNDIS
iInterface 17
** UNRECOGNIZED: 05 24 00 10 01
** UNRECOGNIZED: 05 24 01 00 01
** UNRECOGNIZED: 04 24 02 00
** UNRECOGNIZED: 05 24 06 00 01
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x82 EP 2 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0008 1x 8 bytes
bInterval 9
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 10 CDC Data
bInterfaceSubClass 0 Unused
bInterfaceProtocol 0
iInterface 18
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x01 EP 1 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0