Jump to content


Photo

usb-rndis-lite use your phone internet on your enigma box

usb-rndis-lite enigma2 internet phone

  • Please log in to reply
13 replies to this topic

#1 athoik

  • PLi® Core member
  • 8,458 posts

+327
Excellent

Posted 3 February 2013 - 20:58

Hello Everybody,


If someone needs to use the internet phone via usb cable the following are the steps needed.

1. Install kernel-module-usbnet, kernel-module-rndis-host, kernel-module-rndis-wlan and reboot

opkg install kernel-module-usbnet
opkg install kernel-module-rndis-host
opkg install kernel-module-rndis-wlan
reboot

2. Plug the usb cable and choose internet sharing on the phone

dmesg | grep usb
[ 3772.954000] usb 1-1: USB disconnect, device number 6
[ 3773.364000] usb 1-1: new high-speed USB device number 7 using ehci-brcm
[ 3773.526000] rndis_host 1-1:1.0: usb0: register 'rndis_host' at usb-ehci_hcd-1, RNDIS device, ee:11:bb:33:ff

3. Activate the new interface and get ip through dhcp

ifconfig usb0 up
udhcpc -i usb0
udhcpc (v1.19.4) started
Sending discover...
Sending select for 192.168.42.138...
Lease of 192.168.42.138 obtained, lease time 43200
/etc/udhcpc.d/50default: Adding DNS 192.168.42.129


Enigma2 box now has internet though the phone.

The above tests performed on dm800se using latest build (OpenPLi-3.0-beta-dm800se-20130203.zip)


Users on the OpenPLi 2.1 must do a lot of job to get this done. Must configure the following on the kernel:

CONFIG_USB_USBNET=y
CONFIG_USB_NET_CDCETHER=y

And complile usb-rndis-lite driver.

Finally, it would be nice to be able to configure usb0 internface from Enigma2. Any ideas how to do that?


More information:

http://www.synce.org/oldwiki/index.php/Connecting_your_Windows_Mobile_2005_device_via_USB_%28usb-rndis-lite%29
http://wiki.maemo.org/USB_networking
http://wiki.openmoko.org/wiki/USB_Networking#USB_Networking_support
https://bbs.archlinux.org/viewtopic.php?id=72902

Wavefield T90: 0.8W - 1.9E - 4.8E - 13E - 16E - 19.2E - 23.5E - 26E - 33E - 39E - 42E - 45E on EMP Centauri DiseqC 16/1
Unamed: 13E Quattro - 9E Quattro on IKUSI MS-0916

Re: usb-rndis-lite use your phone internet on your enigma box #2 pieterg

  • PLi® Core member
  • 32,766 posts

+245
Excellent

Posted 3 February 2013 - 21:19

doesn't it show up in e2 already?
usb0 is not blacklisted:

Network.py:
    def isBlacklisted(self, iface):
        return iface in ('lo', 'wifi0', 'wmaster0', 'sit0', 'tun0')


Re: usb-rndis-lite use your phone internet on your enigma box #3 athoik

  • PLi® Core member
  • 8,458 posts

+327
Excellent

Posted 4 February 2013 - 07:29

You are right! It showed up after restaring Enigma2.

Attached File  Network.jpg   45.98KB   58 downloads

So any interface (like usb0) created after starting Enigma2 won't show up in the Network list. Is that normal?
Wavefield T90: 0.8W - 1.9E - 4.8E - 13E - 16E - 19.2E - 23.5E - 26E - 33E - 39E - 42E - 45E on EMP Centauri DiseqC 16/1
Unamed: 13E Quattro - 9E Quattro on IKUSI MS-0916

Re: usb-rndis-lite use your phone internet on your enigma box #4 daddelfalk

  • Senior Member
  • 489 posts

+17
Neutral

Posted 4 February 2013 - 07:48

HI,

yes, it its. As nobody listens (monitoring) netlink add/remove events.

Re: usb-rndis-lite use your phone internet on your enigma box #5 athoik

  • PLi® Core member
  • 8,458 posts

+327
Excellent

Posted 4 February 2013 - 13:55

Hello,

It is more clear now :).

If there is an easy way to update Interfaces on Network Manager without adding lot of extra load it would be nice to have.

I was looking the Network.py and we are initializing Network class once as iNetwork.

iNetwork = Network()

So every time we get are calling the getAdapterList function we are getting cached results. Correct?

If we add a button (like refresh Interfaces) on NetworkManager that is calling the getInterfaces on iNetwork, then the interface list would updated without restart of Enigma2, or restart of Enigma2 is the only way to get fresh data?

Once again thanks for the answers.
Wavefield T90: 0.8W - 1.9E - 4.8E - 13E - 16E - 19.2E - 23.5E - 26E - 33E - 39E - 42E - 45E on EMP Centauri DiseqC 16/1
Unamed: 13E Quattro - 9E Quattro on IKUSI MS-0916

Re: usb-rndis-lite use your phone internet on your enigma box #6 MiLo

  • PLi® Core member
  • 14,045 posts

+298
Excellent

Posted 4 February 2013 - 14:32

E2 should just listen to netlink events (and then the command parsing can go away as well, no need to parse ASCII output from a tool if you can get the information directly from the kernel).

This can also be used to inform the user directly when (un)plugging cables, or when the wifi collapses etc.

I think I have some skeleton code for that somewhere. Might be easy enough to port to E2.

Similar to the code for the USB keyboards (you can plug and unplug a USB keyboard any time, no need to restart either).
Real musicians never die - they just decompose

Re: usb-rndis-lite use your phone internet on your enigma box #7 athoik

  • PLi® Core member
  • 8,458 posts

+327
Excellent

Posted 4 February 2013 - 15:01

Wow!

It would be great to have notifications on screen "like" the Ubuntu does ( https://wiki.ubuntu.com/NotifyOSD ).

Searching for netlink and python there is some code on the net.

http://fossies.org/linux/misc/iotop-0.5.tar.gz:a/iotop-0.5/iotop/netlink.py
https://gist.github.com/1488608

I am sure that implementing the above on E2 will "level up" the user experience. ;)
Wavefield T90: 0.8W - 1.9E - 4.8E - 13E - 16E - 19.2E - 23.5E - 26E - 33E - 39E - 42E - 45E on EMP Centauri DiseqC 16/1
Unamed: 13E Quattro - 9E Quattro on IKUSI MS-0916

Re: usb-rndis-lite use your phone internet on your enigma box #8 athoik

  • PLi® Core member
  • 8,458 posts

+327
Excellent

Posted 4 February 2013 - 19:36

For those who don't know about netlink (like me) here is a good post (examples written in C++):

Communicating with the Kernel via Netlink, Part I

Communicating with the Kernel via Netlink, Part II
Wavefield T90: 0.8W - 1.9E - 4.8E - 13E - 16E - 19.2E - 23.5E - 26E - 33E - 39E - 42E - 45E on EMP Centauri DiseqC 16/1
Unamed: 13E Quattro - 9E Quattro on IKUSI MS-0916

Re: usb-rndis-lite use your phone internet on your enigma box #9 athoik

  • PLi® Core member
  • 8,458 posts

+327
Excellent

Posted 5 February 2013 - 19:28

Here is a working script in python printing the interfaces using netlink:

http://partiallystap...ools/netlink.py

Edited by athoik, 5 February 2013 - 19:28.

Wavefield T90: 0.8W - 1.9E - 4.8E - 13E - 16E - 19.2E - 23.5E - 26E - 33E - 39E - 42E - 45E on EMP Centauri DiseqC 16/1
Unamed: 13E Quattro - 9E Quattro on IKUSI MS-0916

Re: usb-rndis-lite use your phone internet on your enigma box #10 sympathy4all

  • Member
  • 11 posts

0
Neutral

Posted 7 February 2013 - 14:28

Hello the great team,
I Have the 3.3.1 of kernel but when i run the commands I get :

Unknown package 'kernel-module-usbnet'.
Collected errors:
* opkg_install_cmd: Cannot install package kernel-module-usbnet.



Re: usb-rndis-lite use your phone internet on your enigma box #11 athoik

  • PLi® Core member
  • 8,458 posts

+327
Excellent

Posted 10 February 2013 - 00:54

Hello the great team,
I Have the 3.3.1 of kernel but when i run the commands I get :

Unknown package 'kernel-module-usbnet'.
Collected errors:
* opkg_install_cmd: Cannot install package kernel-module-usbnet.


What image are you using?
Wavefield T90: 0.8W - 1.9E - 4.8E - 13E - 16E - 19.2E - 23.5E - 26E - 33E - 39E - 42E - 45E on EMP Centauri DiseqC 16/1
Unamed: 13E Quattro - 9E Quattro on IKUSI MS-0916

Re: usb-rndis-lite use your phone internet on your enigma box #12 sympathy4all

  • Member
  • 11 posts

0
Neutral

Posted 13 February 2013 - 19:16

What image are you using?


I'm using a recent openRSI for azbox based on OpenPLi image 3.0

Attached is a snapshot of the image and kernel version

Attached Files


Edited by sympathy4all, 13 February 2013 - 19:18.


Re: usb-rndis-lite use your phone internet on your enigma box #13 athoik

  • PLi® Core member
  • 8,458 posts

+327
Excellent

Posted 13 February 2013 - 20:03


What image are you using?


I'm using a recent openRSI for azbox based on OpenPLi image 3.0

Attached is a snapshot of the image and kernel version


Dear sympathy4all,

If you take a look on the defconfig of dm800se you will find the following:

...
CONFIG_USB_USBNET=m
...
CONFIG_USB_NET_CDCETHER=m
...

How the above values are configured on openRSI? Do you have a link of defconfig?

You can ask on openRSI support to enable them as modules (=m) or directly on kernel (=y).

Edited by athoik, 13 February 2013 - 20:04.

Wavefield T90: 0.8W - 1.9E - 4.8E - 13E - 16E - 19.2E - 23.5E - 26E - 33E - 39E - 42E - 45E on EMP Centauri DiseqC 16/1
Unamed: 13E Quattro - 9E Quattro on IKUSI MS-0916

Re: usb-rndis-lite use your phone internet on your enigma box #14 sympathy4all

  • Member
  • 11 posts

0
Neutral

Posted 2 April 2013 - 14:08

 


What image are you using?


I'm using a recent openRSI for azbox based on OpenPLi image 3.0

Attached is a snapshot of the image and kernel version

 


Dear sympathy4all,

If you take a look on the defconfig of dm800se you will find the following:

...
CONFIG_USB_USBNET=m
...
CONFIG_USB_NET_CDCETHER=m
...

How the above values are configured on openRSI? Do you have a link of defconfig?

You can ask on openRSI support to enable them as modules (=m) or directly on kernel (=y).

 

Thank you so much.

I tried to get get answers from the http://www.opensat4all.com forum but got nothing.

 

:)





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users