SlateDroid.com: Ubuntu driver for HG20F9 USB ethernet dongle - SlateDroid.com

Jump to content


  • 2 Pages +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

Ubuntu driver for HG20F9 USB ethernet dongle

#1 User is offline   linuxerwang 

  • Advanced Member
  • PipPipPip
  • Group: Jr. Member
  • Topics: 3
  • Posts: 42
  • Joined: 26-November 12

Posted 18 January 2013 - 04:45 AM

If you have a HG20F9 USB ethernet dongle, for example from ########### or dx.com:

http://<###########-addr>/itm/External-USB-Lan-RJ45-Ethernet-Network-Card-Adapter-10-100-Mbps-Laptop-PC-/170896745782?_trksid=p5197.m1992&_trkparms=aid%3D111000%26algo%3DREC.CURRENT%26ao%3D1%26asc%3D14%26meid%3D4958697353438599722%26pid%3D100015%26prg%3D1006%26rk%3D1%26sd%3D170896745782%26

http://dx.com/p/usb-...le-black-161542

then I have a good news for you. I compiled a driver for it. https://github.com/linuxerwang/HG20F9

This dongle is really low price, but with very high speed (100mbps). I tested it on Picuntu pre alpha 0.3 and the transfer speed can reach >11M bytes per second. DHCP works perfectly.

This post has been edited by linuxerwang: 18 January 2013 - 04:47 AM

0

#2 User is offline   aloksinha2001 

  • Developer
  • PipPipPip
  • Group: FW Developer
  • Topics: 12
  • Posts: 243
  • Joined: 14-November 12

Posted 18 January 2013 - 07:36 AM

View Postlinuxerwang, on 18 January 2013 - 04:45 AM, said:

If you have a HG20F9 USB ethernet dongle, for example from ########### or dx.com:

http://<###########-addr>/itm/External-USB-Lan-RJ45-Ethernet-Network-Card-Adapter-10-100-Mbps-Laptop-PC-/170896745782?_trksid=p5197.m1992&_trkparms=aid%3D111000%26algo%3DREC.CURRENT%26ao%3D1%26asc%3D14%26meid%3D4958697353438599722%26pid%3D100015%26prg%3D1006%26rk%3D1%26sd%3D170896745782%26

http://dx.com/p/usb-...le-black-161542

then I have a good news for you. I compiled a driver for it. https://github.com/linuxerwang/HG20F9

This dongle is really low price, but with very high speed (100mbps). I tested it on Picuntu pre alpha 0.3 and the transfer speed can reach >11M bytes per second. DHCP works perfectly.


Great - lets introduce it in our next release of PicUntu.

Alok
0

#3 User is offline   4nubis 

  • Newbie
  • Pip
  • Group: Jr. Member
  • Topics: 0
  • Posts: 4
  • Joined: 19-January 13

Posted 19 January 2013 - 01:26 AM

View Postlinuxerwang, on 18 January 2013 - 04:45 AM, said:

then I have a good news for you. I compiled a driver for it. https://github.com/linuxerwang/HG20F9


Is it possible to add the driver in the finless 1.6 for the mk808?
0

#4 User is offline   linuxerwang 

  • Advanced Member
  • PipPipPip
  • Group: Jr. Member
  • Topics: 3
  • Posts: 42
  • Joined: 26-November 12

Posted 19 January 2013 - 01:58 PM

View Post4nubis, on 19 January 2013 - 01:26 AM, said:

Is it possible to add the driver in the finless 1.6 for the mk808?


I believe so, as long as the kernel version is the same. There's a post mentioning about using adb to transfer a driver file to android, google it.
0

#5 User is offline   4nubis 

  • Newbie
  • Pip
  • Group: Jr. Member
  • Topics: 0
  • Posts: 4
  • Joined: 19-January 13

Posted 21 January 2013 - 06:49 AM

Now i installed ubuntu, but can you tell me how to install the driver?
0

#6 User is offline   Raymond Day 

  • Advanced Member
  • PipPipPip
  • Group: Jr. Member
  • Topics: 30
  • Posts: 183
  • Joined: 09-November 12

Posted 21 January 2013 - 06:14 PM

View Post4nubis, on 21 January 2013 - 06:49 AM, said:

Now i installed ubuntu, but can you tell me how to install the driver?


I order 1 they are like only $5 free shipping too. I guess to install it you would do this:

Quote

wget https://github.com/l...hive/master.zip
unzip master.zip
cd HG20F9-master
make
make install
modprobe HG20F9


But I am not sure I don't have on yet. But I will try this when I get it or I guess the next picuntu will come with it.

I tested out the commands some. To get the make to work some what I had to fix a link it was:

Quote

/home/andrew/UG802/rk3066-kernel


So I fixed it with 3 lines:

Quote

cd /lib/modules/3.0.8+
ln -f -s /home/ubuntu/rk3066-kernel build
ln -f -s /home/ubuntu/rk3066-kernel source


But the make still gets some errors. I guess because I don't have the USB to Ethernet yet to plug in.

-Raymond Day

This post has been edited by Raymond Day: 21 January 2013 - 06:36 PM

1

#7 User is offline   linuxerwang 

  • Advanced Member
  • PipPipPip
  • Group: Jr. Member
  • Topics: 3
  • Posts: 42
  • Joined: 26-November 12

Posted 22 January 2013 - 01:25 AM

View Post4nubis, on 21 January 2013 - 06:49 AM, said:

Now i installed ubuntu, but can you tell me how to install the driver?


You can simply download from github the HG20F9.ko and copy it to /lib/modules/3.0.8+/kernel/drivers/net/usb and run "sudo depmod -a".

Now plug in your device, wait for about 15 seconds, the light should flash and you are on!

You can also compile it yourself. Note that the kernel magic version must match, so you need to change the "EXTRAVERSION = +" $KERNEL/Makefile and "make modules" before you compile the HG20F9 driver. There might be better ways to handle the magic version and hope somebody would tell us. The way I am using (EXTRAVERSION = +) works for HG20F9 driver but the other drivers in the kernel source tree will have magic version 3.0.8++ and thus won't work.
1

#8 User is offline   Raymond Day 

  • Advanced Member
  • PipPipPip
  • Group: Jr. Member
  • Topics: 30
  • Posts: 183
  • Joined: 09-November 12

Posted 22 January 2013 - 04:45 AM

So then the commands would be:

Quote

wget wget https://github.com/l...hive/master.zip
unzip master.zip
mv HG20F9-master HG20F9.ko
cp -rpt HG20F9.ko /lib/modules/3.0.8+/kernel/driver/net/usb/
depmod -a


I will do that when I get mine.

-Raymond Day

This post has been edited by Raymond Day: 22 January 2013 - 05:59 PM

1

#9 User is offline   4nubis 

  • Newbie
  • Pip
  • Group: Jr. Member
  • Topics: 0
  • Posts: 4
  • Joined: 19-January 13

Posted 22 January 2013 - 05:44 AM

Raymond Day

when i do:
depmod -a

i get an error:
WARNING: Can't read module /lib/modules/3.0.8+/HG20F9-master/binaries-rk3066-3.0.8+/v1.0.0/HG20F9.ko: Invalid argument


linuxerwang

is the HG20F9.ko ok? Because it seems to be empty?
0

#10 User is offline   linuxerwang 

  • Advanced Member
  • PipPipPip
  • Group: Jr. Member
  • Topics: 3
  • Posts: 42
  • Joined: 26-November 12

Posted 22 January 2013 - 03:31 PM

View Post4nubis, on 22 January 2013 - 05:44 AM, said:

Raymond Day

when i do:
depmod -a

i get an error:
WARNING: Can't read module /lib/modules/3.0.8+/HG20F9-master/binaries-rk3066-3.0.8+/v1.0.0/HG20F9.ko: Invalid argument


linuxerwang

is the HG20F9.ko ok? Because it seems to be empty?



You copied in a wrong way. HG20F9.ko is a file, you need to put it into /lib/modules/3.0.8+/kernel/driver/net/usb/. Don't do the "HG20F9-master/binaries-rk3066-3.0.8+/v1.0.0". And then run "sudo depmod -a".

The driver is good. I tested it on rikomagic III and mk808.
0

#11 User is offline   linuxerwang 

  • Advanced Member
  • PipPipPip
  • Group: Jr. Member
  • Topics: 3
  • Posts: 42
  • Joined: 26-November 12

Posted 22 January 2013 - 03:34 PM

View Postlinuxerwang, on 22 January 2013 - 03:31 PM, said:

You copied in a wrong way. HG20F9.ko is a file, you need to put it into /lib/modules/3.0.8+/kernel/driver/net/usb/. Don't do the "HG20F9-master/binaries-rk3066-3.0.8+/v1.0.0". And then run "sudo depmod -a".

The driver is good. I tested it on rikomagic III and mk808.


Whoops, I know what happened. Looks the file failed to upload. Will upload again when I get a chance.
0

#12 User is offline   linuxerwang 

  • Advanced Member
  • PipPipPip
  • Group: Jr. Member
  • Topics: 3
  • Posts: 42
  • Joined: 26-November 12

Posted 22 January 2013 - 03:46 PM

View Postlinuxerwang, on 22 January 2013 - 03:34 PM, said:

Whoops, I know what happened. Looks the file failed to upload. Will upload again when I get a chance.


Re-uploaded. The file size should be 55.37kb.

And you need to copy the HG20F9.ko file (and only this file) to /lib/modules/3.0.8+/kernel/drivers/net/usb.
0

#13 User is offline   Raymond Day 

  • Advanced Member
  • PipPipPip
  • Group: Jr. Member
  • Topics: 30
  • Posts: 183
  • Joined: 09-November 12

Posted 22 January 2013 - 06:06 PM

Like I said do just these commands. Just copy and paste them when you long in with like putty.

Quote

wget wget https://github.com/l...hive/master.zip
unzip master.zip
mv HG20F9-master HG20F9.ko
cp -rpt HG20F9.ko /lib/modules/3.0.8+/kernel/driver/net/usb/
depmod -a


Each is one line and press Enter at the end of each line.

The first line downloads it.
The 2ND line unzips it.
The 3RD line renames the folder.
The 4TH line copys the folder HG20F9.ko to the right place.
The 5Th line makes it work.

If you not log in as root you have to put sudo before each line.

I don't have one yet. So some one should post back if this is right.

-Raymond Day

This post has been edited by Raymond Day: 22 January 2013 - 06:08 PM

0

#14 User is offline   linuxerwang 

  • Advanced Member
  • PipPipPip
  • Group: Jr. Member
  • Topics: 3
  • Posts: 42
  • Joined: 26-November 12

Posted 22 January 2013 - 06:24 PM

View PostRaymond Day, on 22 January 2013 - 06:06 PM, said:

Like I said do just these commands. Just copy and paste them when you long in with like putty.



Each is one line and press Enter at the end of each line.

The first line downloads it.
The 2ND line unzips it.
The 3RD line renames the folder.
The 4TH line copys the folder HG20F9.ko to the right place.
The 5Th line makes it work.

If you not log in as root you have to put sudo before each line.

I don't have one yet. So some one should post back if this is right.

-Raymond Day



Raymond, I disagree with you on lines 2 and 3. You don't need to whole folder. Only copy the file HG20F9.ko, not the folder.
0

#15 User is offline   Raymond Day 

  • Advanced Member
  • PipPipPip
  • Group: Jr. Member
  • Topics: 30
  • Posts: 183
  • Joined: 09-November 12

Posted 22 January 2013 - 06:36 PM

View Postlinuxerwang, on 22 January 2013 - 06:24 PM, said:

Raymond, I disagree with you on lines 2 and 3. You don't need to whole folder. Only copy the file HG20F9.ko, not the folder.


Can't you post the right lines then like I did? That would be very good. It's like a easy step-by-step way.

-Raymond Day
0

#16 User is offline   Raymond Day 

  • Advanced Member
  • PipPipPip
  • Group: Jr. Member
  • Topics: 30
  • Posts: 183
  • Joined: 09-November 12

Posted 22 January 2013 - 06:42 PM

So would the commands be like this:

Quote

wget wget https://github.com/l...hive/master.zip
unzip master.zip
cd HG20F9.ko/binaries-rk3066-3.0.8+/v1.0.0/
cp HG20F9.ko /lib/modules/3.0.8+/kernel/drivers/net/usb/
depmod -a


Because the unzip make a "HG20F9.ko" folder and in that folder the only file can find with the name HG20F9.ko is at: /HG20F9.ko/binaries-rk3066-3.0.8+/v1.0.0/HG20F9.ko

But looks like the HG20F9.ko file is blank.

Quote

root@small3:~/USB-to-Ethernet/HG20F9.ko/binaries-rk3066-3.0.8+/v1.0.0# ls -l
total 0
-rw-r--r-- 1 root root 0 Jan 18 01:42 HG20F9.ko
root@small3:~/USB-to-Ethernet/HG20F9.ko/binaries-rk3066-3.0.8+/v1.0.0#


-Raymond Day

This post has been edited by Raymond Day: 22 January 2013 - 06:50 PM

0

#17 User is offline   linuxerwang 

  • Advanced Member
  • PipPipPip
  • Group: Jr. Member
  • Topics: 3
  • Posts: 42
  • Joined: 26-November 12

Posted 22 January 2013 - 07:35 PM

View PostRaymond Day, on 22 January 2013 - 06:42 PM, said:

So would the commands be like this:



Because the unzip make a "HG20F9.ko" folder and in that folder the only file can find with the name HG20F9.ko is at: /HG20F9.ko/binaries-rk3066-3.0.8+/v1.0.0/HG20F9.ko

But looks like the HG20F9.ko file is blank.



-Raymond Day


Re-download the zip file you'll get the correct file.

Here's the complete command lines:

$ wget https://github.com/l...hive/master.zip
$ unzip master.zip
$ sudo cp HG20F9-master/binaries-rk3066-3.0.8+/v1.0.0/HG20F9.ko /lib/modules/3.0.8+/kernel/drivers/net/usb/
$ sudo depmod -a
0

#18 User is offline   Raymond Day 

  • Advanced Member
  • PipPipPip
  • Group: Jr. Member
  • Topics: 30
  • Posts: 183
  • Joined: 09-November 12

Posted 22 January 2013 - 08:25 PM

Looks like it works good. Thank you. Here is my command line with your commands.

Quote

root@small3:~/USB-to-Ethernet# wget https://github.com/l...hive/master.zip
--2013-01-22 20:21:57-- https://github.com/l...hive/master.zip
Resolving github.com (github.com)... 207.97.227.239
Connecting to github.com (github.com)|207.97.227.239|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://nodeload.git...20F9/zip/master [following]
--2013-01-22 20:21:57-- https://nodeload.git...20F9/zip/master
Resolving nodeload.github.com (nodeload.github.com)... 207.97.227.252
Connecting to nodeload.github.com (nodeload.github.com)|207.97.227.252|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 60433 (59K) [application/zip]
Saving to: `master.zip'

100%[======================================>] 60,433 332K/s in 0.2s

2013-01-22 20:21:58 (332 KB/s) - `master.zip' saved [60433/60433]

root@small3:~/USB-to-Ethernet# ls
master.zip
root@small3:~/USB-to-Ethernet# unzip master.zip
Archive: master.zip
bc17912aebc2b0281f9cb5e654510dad6e4c2a24
creating: HG20F9-master/
inflating: HG20F9-master/70-persistent-net.rules
inflating: HG20F9-master/HG20F9.c
inflating: HG20F9-master/HG20F9.h
inflating: HG20F9-master/Makefile
inflating: HG20F9-master/axusbnet.c
inflating: HG20F9-master/axusbnet.h
creating: HG20F9-master/binaries-rk3066-3.0.8+/
creating: HG20F9-master/binaries-rk3066-3.0.8+/v1.0.0/
inflating: HG20F9-master/binaries-rk3066-3.0.8+/v1.0.0/HG20F9.ko
inflating: HG20F9-master/readme
root@small3:~/USB-to-Ethernet# cp HG20F9-master/binaries-rk3066-3.0.8+/v1.0.0/HG20F9.ko /lib/modules/3.0.8+/kernel/drivers/net/usb/
root@small3:~/USB-to-Ethernet# depmod -a
root@small3:~/USB-to-Ethernet#


When mine comes in the mail I guess it will work now. All I have to do is plug it in and do the command "depmod -a" Then is should work. Thank you.

I had to click MultiQuote to get the wget command to copy and paste it.

-Raymond Day

This post has been edited by Raymond Day: 22 January 2013 - 08:30 PM

0

#19 User is offline   aloksinha2001 

  • Developer
  • PipPipPip
  • Group: FW Developer
  • Topics: 12
  • Posts: 243
  • Joined: 14-November 12

Posted 22 January 2013 - 09:30 PM

View Postlinuxerwang, on 22 January 2013 - 07:35 PM, said:

Re-download the zip file you'll get the correct file.

Here's the complete command lines:

$ wget https://github.com/l...hive/master.zip
$ unzip master.zip
$ sudo cp HG20F9-master/binaries-rk3066-3.0.8+/v1.0.0/HG20F9.ko /lib/modules/3.0.8+/kernel/drivers/net/usb/
$ sudo depmod -a



linuxerwang - you may want to add the sha1 check sum, for people to be assured that they have the complete file, the correct file.

Alok
0

#20 User is offline   linuxerwang 

  • Advanced Member
  • PipPipPip
  • Group: Jr. Member
  • Topics: 3
  • Posts: 42
  • Joined: 26-November 12

Posted 22 January 2013 - 10:40 PM

View Postaloksinha2001, on 22 January 2013 - 09:30 PM, said:

linuxerwang - you may want to add the sha1 check sum, for people to be assured that they have the complete file, the correct file.

Alok


Good point. Will do.
0

Share this topic:


  • 2 Pages +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users