Internet Key

Post Reply
unclegas
Posts: 11
Joined: Wed Sep 07, 2016 6:24 pm
languages_spoken: english
ODROIDs: c2
Has thanked: 0
Been thanked: 0
Contact:

Internet Key

Unread post by unclegas » Wed Sep 07, 2016 6:28 pm

Hello! I have a odroid c2 and i want to connect a internet key by vodafone. is it possible?

User avatar
odroid
Site Admin
Posts: 30282
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 3 times
Been thanked: 26 times
Contact:

Re: Internet Key

Unread post by odroid » Wed Sep 07, 2016 7:15 pm

I heard some 3G/4G internet dongles worked on C2 Ubuntu.

unclegas
Posts: 11
Joined: Wed Sep 07, 2016 6:24 pm
languages_spoken: english
ODROIDs: c2
Has thanked: 0
Been thanked: 0
Contact:

Re: Internet Key

Unread post by unclegas » Wed Sep 07, 2016 8:00 pm

I use Android 5.1.......

phaseshifter
Posts: 3252
Joined: Fri May 08, 2015 9:12 am
languages_spoken: english
ODROIDs: U-2,U3+,,XU-3,,XU3-LITE,,XU-4
C1+,,C-2,,,
N-1,,N-2 @15 V D.C ,,...other odroid acc`s as well
Has thanked: 10 times
Been thanked: 20 times
Contact:

Re: Internet Key

Unread post by phaseshifter » Wed Sep 07, 2016 11:59 pm

usb routers are not expensive i would look at getting one you will have some added security with the routers firewall and connection via Ethernet..
most usb routers will accept a wide variety of usb dongles...i ran that way when i first setup my odroids until i got a adsl line
Build It And They Will Come...Be Bold And Mighty Forces Will Come To Your Aid..!!!

joerg
Posts: 864
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2
Location: Germany
Has thanked: 0
Been thanked: 4 times
Contact:

Re: Internet Key

Unread post by joerg » Thu Sep 08, 2016 12:07 am

Look here, this modem E3372h-153 is working in my car: http://forum.odroid.com/viewtopic.php?f=113&t=16489
I guess any Huawei modem with Hilink firmware would work the same.

unclegas
Posts: 11
Joined: Wed Sep 07, 2016 6:24 pm
languages_spoken: english
ODROIDs: c2
Has thanked: 0
Been thanked: 0
Contact:

Re: Internet Key

Unread post by unclegas » Thu Sep 08, 2016 10:11 pm

Wow... It's too difficoult for me.... Is there a guide step to step?

joerg
Posts: 864
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2
Location: Germany
Has thanked: 0
Been thanked: 4 times
Contact:

Re: Internet Key

Unread post by joerg » Fri Sep 09, 2016 1:19 am

It's not so difficult. But you need to put some lines of code inside a linux style editor to make it work. If you don't like to do that you should follow recommendation from phaseshifter.
Anyway, I describe here how to do:

Open a terminal to your C2

Code: Select all

adb shell
root@odroidc:/ # 
Remount the filesystem to rw

Code: Select all

mount -o remount, rw /
Create and edit the script init-hilink.sh

Code: Select all

vi /system/bin/init-hilink.sh 
You are now in the editor vi.
Type key 'INS' to change to edit mode.
Copy paste the script

Code: Select all

#!/system/bin/sh
while true
    do
        if grep "down" /sys/class/net/usbnet0/operstate then
            /system/bin/dhcpcd usbnet0
            sleep 5
            /system/bin/route add default gw 192.168.8.1 dev usbnet0
            /system/bin/ndc resolver setdefaultif usbnet0
            /system/bin/ndc resolver setifdns usbnet0 8.8.8.8 8.8.4.4
        fi
        sleep 10
    done
Type key 'ESC' to return to command mode.
Type keys ':wq' to save and exit.

Make the file executable and change user

Code: Select all

chmod 755 /system/bin/init-hilink.sh 
chown root:shell /system/bin/init-hilink.sh 
Check if it is looking like this

Code: Select all

ls -l /system/bin/init-hilink.sh                              
-rwxr-xr-x root     shell         389 2016-09-08 17:49 init-hilink.sh
Edit the file init.odroidc2.rc

Code: Select all

vi init.odroidc2.rc
Scroll to the end and type key 'INS'
At the very last position you create a new line with key 'return'

Copy paste this to make the script autostart every reboot

Code: Select all

service hilink /system/bin/init-hilink.sh                                   
    class main                                                                 
    disabled                                                                   
    oneshot


on property:dev.bootcomplete=1                                                 
    start hilink  
Type 'ESC'
Type ':wq'

To reboot type

Code: Select all

reboot
Note, that editing the init.odroidc2.rc this way is best practice, because the rights are staying correct as 644. Edit of init.odroidc2.rc from somewhere else can change the rights and cause a boot loop!
This script is for USB modem with Hilink firmware.
You can configure this modem at any PC with browser.
After configured, connect it to the C2 and after some 15 - 20s it should show connected with the blue led.

unclegas
Posts: 11
Joined: Wed Sep 07, 2016 6:24 pm
languages_spoken: english
ODROIDs: c2
Has thanked: 0
Been thanked: 0
Contact:

Re: Internet Key

Unread post by unclegas » Fri Sep 09, 2016 7:53 pm

thankyou thankyou for your help.... (sorry for my english). I have some fear.... but i'll try

only another 2 questions: can I use the terminal to type tihs command line? Or must connect the board via usb?

And.... the led of the key is already on, in "blu mode" but the key is not recognized by the board. It's not connect if I turn off the wifi or disconnect the ethernet cable!

Ehm.... I can't understend about "phaseshifter"

joerg
Posts: 864
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2
Location: Germany
Has thanked: 0
Been thanked: 4 times
Contact:

Re: Internet Key

Unread post by joerg » Fri Sep 09, 2016 9:38 pm

The best, you connect the Odroid C2 via the small USB connector to your PC.
If you have Linux Ubuntu PC, you need to install adb tool.

Code: Select all

sudo apt-get install adb fastboot
If you are with Windows you need to install this universal driver from here:http://forum.xda-developers.com/showthr ... ?t=2588979

Once you have installed the driver and your C2 is connected, you open a terminal on your PC and type:

Code: Select all

adb shell
You should now have a connection to your C2.

BTW, what model is your internet key?

unclegas
Posts: 11
Joined: Wed Sep 07, 2016 6:24 pm
languages_spoken: english
ODROIDs: c2
Has thanked: 0
Been thanked: 0
Contact:

Re: Internet Key

Unread post by unclegas » Sat Sep 10, 2016 5:01 am

It's a Vodafone key... Hauawei k3765

joerg
Posts: 864
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2
Location: Germany
Has thanked: 0
Been thanked: 4 times
Contact:

Re: Internet Key

Unread post by joerg » Sat Sep 10, 2016 7:33 pm

As far I know, this K3765 don't has Hilink firmware. You cannot use this step for step guide I posted for a modem with old firmware. Only the Hilink part can be used on C2. The former part can be used only on C1. Maybe this is an option for you: http://forum.odroid.com/viewtopic.php?f ... pp#p157697

qlex
Posts: 72
Joined: Tue Jul 29, 2014 6:21 pm
languages_spoken: english, polish
ODROIDs: C1, C1+, C2, U3 (a lot of them!)
Has thanked: 0
Been thanked: 0
Contact:

Re: Internet Key

Unread post by qlex » Fri Mar 01, 2019 9:44 pm

joerg wrote:
Fri Sep 09, 2016 1:19 am

Code: Select all

            /system/bin/route add default gw 192.168.8.1 dev usbnet0
            /system/bin/ndc resolver setdefaultif usbnet0
            /system/bin/ndc resolver setifdns usbnet0 8.8.8.8 8.8.4.4
        fi
        sleep 10
    done
Hi joerg,
congrats on making so many perfect efforts to get the 4g dongles to work with odroid.

i'm currently trying out both c1 and c2 and got stuck again:

Above script is not automatically putting the interface up, so i tried typing in those commands manually.

While the add default gw worked
but both ndc resolver commands end up with:

Code: Select all

root@odroidc2:/ # /system/bin/ndc resolver setdefaultif usbnet0
500 0 Resolver unknown command
Any idea why? I'm on newest firmware for both c1 and c2 without any modifications apart from that init-hilink.sh script in /system/bin - haven't added any usb_modchange and other scripts, as my Huawei E3372h is in hilink state.

joerg
Posts: 864
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2
Location: Germany
Has thanked: 0
Been thanked: 4 times
Contact:

Re: Internet Key

Unread post by joerg » Sat Mar 02, 2019 3:45 am

@qlex: Can you please check in adb shell if you have this system property net.eth.iface:

Code: Select all

getprop net.eth.iface
If not, create it with the value usbnet0.

Code: Select all

setprop net.eth.iface usbnet0
You can restart only the Android UI to test it:

Code: Select all

am restart
If the patch for EthernetNetworkFactory.java is active, then it reads this property to bring up this interface. If the property is not there, then it takes eth0 as default.
You can put this property into build.prop to make it persistent.
The other stuff here with init-hilink.sh is not working on Marshmallow!

qlex
Posts: 72
Joined: Tue Jul 29, 2014 6:21 pm
languages_spoken: english, polish
ODROIDs: C1, C1+, C2, U3 (a lot of them!)
Has thanked: 0
Been thanked: 0
Contact:

Re: Internet Key

Unread post by qlex » Mon Mar 04, 2019 7:28 pm

@joerg

thanks ! your suggestion worked.

in buildprop file i replaced the eth0 with usbnet0 and i got it now persistent !

joerg
Posts: 864
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2
Location: Germany
Has thanked: 0
Been thanked: 4 times
Contact:

Re: Internet Key

Unread post by joerg » Mon Mar 04, 2019 8:16 pm

Fine that it works now.
@odroid: Maybe the wiki pages can be updated with this information?

User avatar
odroid
Site Admin
Posts: 30282
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 3 times
Been thanked: 26 times
Contact:

Re: Internet Key

Unread post by odroid » Tue Mar 05, 2019 9:41 am

Ok. We will buy a 4G modem and make a wiki page.

joerg
Posts: 864
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2
Location: Germany
Has thanked: 0
Been thanked: 4 times
Contact:

Re: Internet Key

Unread post by joerg » Tue Mar 05, 2019 1:52 pm

Sorry, I didn't meant the whole stuff here.
Only a sentence needed like: "To enable a Hilink 3G/4G modem, edit the build.prop and change the property net.eth.iface to usbnet0."
Only valid for C2 Android M.

User avatar
odroid
Site Admin
Posts: 30282
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 3 times
Been thanked: 26 times
Contact:

Re: Internet Key

Unread post by odroid » Tue Mar 05, 2019 2:27 pm

I've added a new entry to the Android release note.
https://wiki.odroid.com/odroid-c2/os_im ... em_support

Anyway, we've just ordered a Huawei LTE modem to test it by ourselves. ;)

Luke.go
Posts: 287
Joined: Mon May 30, 2016 1:55 pm
languages_spoken: english
Has thanked: 1 time
Been thanked: 2 times
Contact:

Re: Internet Key

Unread post by Luke.go » Mon Apr 15, 2019 10:56 am

@joerg,
Somebody there who tested it with e5885ls-93a?
I'm trying to use it but no luck.

when I try it with usb_modeswitch, I can't see /dev/ttyUSB* node, but can see wwan0 node.
->

Code: Select all

root@odroidc2:/sys/class/net # ls -l
lrwxrwxrwx root     root              1970-01-01 00:03 eth0 -> ../../devices/c9410000.ethernet/net/eth0
lrwxrwxrwx root     root              1970-01-01 00:03 ip6tnl0 -> ../../devices/virtual/net/ip6tnl0
lrwxrwxrwx root     root              1970-01-01 00:03 lo -> ../../devices/virtual/net/lo
lrwxrwxrwx root     root              1970-01-01 00:03 sit0 -> ../../devices/virtual/net/sit0
lrwxrwxrwx root     root              1970-01-01 00:03 tunl0 -> ../../devices/virtual/net/tunl0
lrwxrwxrwx root     root              1970-01-01 00:03 wwan0 -> ../../devices/dwc2_b/usb1/1-1/1-1.4/1-1.4:1.1/net/wwan0
please somebody help me! :cry:

Post Reply

Return to “Hardware and peripherals”

Who is online

Users browsing this forum: No registered users and 1 guest