How to Run Virtual Ethernet Over USB in VoCore2

fmm
 
Posts: 13
Joined: Tue Dec 03, 2019 4:07 pm

How to Run Virtual Ethernet Over USB in VoCore2

Tue Dec 03, 2019 4:34 pm

Hello World!

I want to use the the USB port as virtual Ethernet (e.g. where Android device can perform tethering to the VoCore2), so how can I do that?
Hence, it seems that some modules and commands were not found in OpenWrt! (e.g. g_ether, lsusb, fdisk, lsblk, usbdevices, blkid, ...).

Thanks in advance, and here is the "ifconfig" output:
Code: Select all
root@OpenWrt:/# ifconfig
apcli0    Link encap:Ethernet  HWaddr BA:D8:12:01:86:44
          inet6 addr: fe80::b8d8:12ff:fe01:8644/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

br-lan    Link encap:Ethernet  HWaddr B8:D8:12:61:86:45
          inet addr:192.168.61.1  Bcast:192.168.61.255  Mask:255.255.255.0
          inet6 addr: fdea:5211:e4a2::1/60 Scope:Global
          inet6 addr: fe80::bad8:12ff:fe61:8645/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:19926 errors:0 dropped:0 overruns:0 frame:0
          TX packets:19864 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:1434932 (1.3 MiB)  TX bytes:1919022 (1.8 MiB)

eth0      Link encap:Ethernet  HWaddr B8:D8:12:61:86:45
          inet6 addr: fe80::bad8:12ff:fe61:8645/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:368 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:104172 (101.7 KiB)
          Interrupt:5

eth0.1    Link encap:Ethernet  HWaddr B8:D8:12:61:86:45
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:88 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:11767 (11.4 KiB)

Vonger
 
Posts: 825
Joined: Sun Oct 19, 2014 6:00 am

Re: How to Run Virtual Ethernet Over USB in VoCore2

Wed Dec 04, 2019 2:06 am

What is virtual ethernet ... I guess it require an addition USB 2 Ethernet chip.

fmm
 
Posts: 13
Joined: Tue Dec 03, 2019 4:07 pm

Re: How to Run Virtual Ethernet Over USB in VoCore2

Wed Dec 04, 2019 9:16 am

Hello dear Vonger,

Thanks for the fast reply.
I mean the sharing of a mobile device's Internet connection with VoCore via USB, without the use of Ethernet port of WiFi.
So VoCore2 will get an IP address and internet access all over the USB (e.g. USB Tethering from iPhone/Android to VoCore2).

Thanks again for the quick replies, highly appreciated.

Vonger
 
Posts: 825
Joined: Sun Oct 19, 2014 6:00 am

Re: How to Run Virtual Ethernet Over USB in VoCore2

Wed Dec 04, 2019 11:46 am

Please let me know if I understand correctly

connect to vocore usb port to phones usb port, then create a virtual ethernet on vocore

I am not sure about that.
vocore2 only support usb host mode, so only if phone is in gadget then it will detect that.
You can do this test, if your phone connect to a linux computer, then the linux computer is able to access internet through phone, then it will also work on vocore2, just need to install/compile same driver.
If that way can not work with desktop computer, I am afraid it won't work.

fmm
 
Posts: 13
Joined: Tue Dec 03, 2019 4:07 pm

Re: How to Run Virtual Ethernet Over USB in VoCore2

Wed Dec 04, 2019 1:00 pm

Hello dear Vonger,

Exactly, I need the VoCore2 to be as a USB host.
I did exactly what you suggested before, I enabled the Tethering mode in my mobile, and I connected it via USB to a Linux computer and it worked, and it works also in Windows, and the mobile appear as a LAN in both.
While that didn't work on VoCore2 :(

I feel like I am missing something and the VoCore2 can do it, can you please try it very quickly and see.
Activate USB Tethering in the mobile, and connect it to VoCore2 and see if that works.

Many thanks ,,

fmm
 
Posts: 13
Joined: Tue Dec 03, 2019 4:07 pm

Re: How to Run Virtual Ethernet Over USB in VoCore2

Wed Dec 04, 2019 2:57 pm

Ubuntu detects the mobile onn USB and I get this new interface in "ifconfig":
Code: Select all
enp0s20f0u4: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.100  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 fe80::59ba:d3c8:d597:27ed  prefixlen 64  scopeid 0x20<link>
        ether 52:86:2f:d6:5a:a7  txqueuelen 1000  (Ethernet)
        RX packets 121  bytes 23470 (23.4 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 119  bytes 28889 (28.8 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0


While in VoCore2 the output of "ifconfig" is always the same!

Vonger
 
Posts: 825
Joined: Sun Oct 19, 2014 6:00 am

Re: How to Run Virtual Ethernet Over USB in VoCore2

Wed Dec 04, 2019 9:43 pm

Check ubuntu kernel log by call "dmesg", and then you will know which driver for such device is necessary, after that, compile same driver and upgrade, then vocore will work too.

fmm
 
Posts: 13
Joined: Tue Dec 03, 2019 4:07 pm

Re: How to Run Virtual Ethernet Over USB in VoCore2

Sun Dec 08, 2019 1:13 pm

Hello dear Vonger,

I really hope the OpenWrt is supporting the used drivers in Ubuntu.
After connecting the USB Network adapter, here are the outputs from both Ubuntu & OpenWrt:

Ubuntu:
Code: Select all
[  473.884974] usb 1-4: new high-speed USB device number 8 using xhci_hcd
[  474.034610] usb 1-4: New USB device found, idVendor=1546, idProduct=1146, bcdDevice= 1.00
[  474.034615] usb 1-4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  474.034619] usb 1-4: Product: MODEM-LTE
[  474.034622] usb 1-4: Manufacturer: u-blox
[  474.034624] usb 1-4: SerialNumber: 000000000100
[  474.044354] cdc_acm 1-4:1.2: ttyACM1: USB ACM device
[  474.064650] usbcore: registered new interface driver cdc_ether
[  474.067006] rndis_host 1-4:1.0 usb0: register 'rndis_host' at usb-0000:00:14.0-4, RNDIS device, c2:38:fc:72:b7:ac
[  474.067031] usbcore: registered new interface driver rndis_host
[  474.070979] rndis_host 1-4:1.0 enp0s20f0u4: renamed from usb0


VoCore2:
Code: Select all
[  250.415284] usb 1-1: new high-speed USB device number 2 using ehci-platform
[  250.625111] cdc_acm 1-1:1.2: ttyACM0: USB ACM device


Does that mean we are missing (usbcore & rndis_host 1-4) drivers in VoCore2 and we need to compile them?
If yes, can you please guide me how to do that?

Many thanks ,,

fmm
 
Posts: 13
Joined: Tue Dec 03, 2019 4:07 pm

Re: How to Run Virtual Ethernet Over USB in VoCore2

Sun Dec 08, 2019 1:57 pm

On Luci, while trying to install kmod-usb-net-rndis :

Code: Select all
Installing kmod-usb-net-rndis (4.14.131-1) to root...
Downloading http://downloads.openwrt.org/releases/18.06.4/targets/ramips/mt76x8/packages/kmod-usb-net-rndis_4.14.131-1_mipsel_24kc.ipk

Collected errors:
 * satisfy_dependencies_for: Cannot satisfy the following dependencies for kmod-usb-net-rndis:
 *    kernel (= 4.14.131-1-310e67ce48c0c3cc8b8d5e327035259a)
 * opkg_install_cmd: Cannot install package kmod-usb-net-rndis.

Vonger
 
Posts: 825
Joined: Sun Oct 19, 2014 6:00 am

Re: How to Run Virtual Ethernet Over USB in VoCore2

Mon Dec 09, 2019 1:18 am

If you need to install kmod, have to recompile the firmware(I did not find other good way), please follow github.com/vonger/vocore2 tutorial.
Then in "make menuconfig" Kernel modules =>kmod-usb-net=>kmod-usb-net-rndis
Form your log I guess it might be kmod-usb-net-cdc-ether

call "make" to make the firmware, and upgrade your vocore using bin/targets/ramips/mt76x8/openwrt-ramips-mt76x8-vocore2-squashfs-sysupgrade.bin

Next
Return to VoCore2/Lite/Ultimate

Who is online

Users browsing this forum: No registered users and 1 guest