Jump to content

pcDuino3 Android Ethernet driver

Recommended Posts

On http://www.linksprite.com/?page_id=855 we find some Android images, f.e.


1. Android 4.2 bootable SD image - dated 08-26-2014

    includes /system/vendor/modules/net622x.ko


2. Android 4.2 NAND image - dated 04-04-2014

    includes /system/vendor/modules/zet622x.ko


In the Preferences of Android someone can activate the communication over erthernet.


However, this mode can not be used until someone opens a terminal and as user root issues the command


1. insmod /system/vendor/modules/net622x.ko


2. insmod /system/vendor/modules/zet622x.ko

and disable and enable Ethernet again.

The appropriate insmod command has to be repeated at each boot of the pcDuino3.


Mounting the SD card for the image dated 08-26-2014 (see 1.) this process can be overcome by editing the file init.sun7i.rc directly on the SD card by inserting the line

insmod /system/vendor/modules/net622x.ko

directly under the line

# insmod network


Such modified file will overcome the problem of not being able to use Ethernet without manual insertion of the network module as described above.


For the Android 4.2 NAND image (see 2.) once installed such modification can not be done because

A. the file init.sun7i.rc is not modifiable even by root and

B. the file containing the recovery.img would need to be changed to.


My question is

Can anyone of Linksprite Android development team please make the above mentioned change to the script init.sun7i.rc (whereas the module mentioned under 1. is named net622x.ko and the module mentioned under 2. is named zet622x.ko) and make new images containing such changes available on the download page?


This would help those who do not have the capabilities to re-manufacture Android images.


Thank you for your kind attention.


Share this post

Link to post
Share on other sites

In the meantime I've found a quick and dirty solution to dhcp.



The Android distributions mentioned in my first post don't provide

1. the automatic load of the ethernet kernel module

2. even if the resp. kernel module is loaded after each reboot the eth0 interface is set to address

    as defined in the script /system/bin/preinit.sh that is the last script executed by /init.rc

    Someone has to pull the ethernet cable and to re-plug it in order to receive a valid network address, gateway,

    etc.. from the router in case the routers basic network address is not 192.168.1.x


In order to automatically receive a correct address from a connected router without pulling and re-plugging the eth0 cable of the pcDuino3 board I've made the following changes using a bootable SD card.


1. Plug the microSD card into a computer that has an appropriate device for it (I use an USB/OTG adapter PQI Connect 203)

    prefer a computer with linux installed because the Android SD card uses linux ext4 filesystem and linux init files don't like

    the 'carriage return' bits added by M$ editors at the end of a line.

2. Mount the partition of the Android SD card that shows a size of 32MB. This is the boot partition.

3. On linux computers open a terminal and become root (su -i).


Kernel module for eth0

4. Open the file /init.sun7i.rc on the root of the SD card with an editor.

5. Find the line # insmod network and directly after that insert the line

    insmod /system/vendor/modules/zet622x.ko

6. Save the file.


DHCP for eth0 without fiddling with cable upon each reboot


7. Open the file /init.rc on the root of the SD card with an editor.

8. Near the end find the line

    service  preinstall  /system/bin/busybox  sh  /system/bin/preinstall.sh

    Such init file is executed last by the system init and will set the eth0 network address always to upon boot.

9. Before such line insert the lines:

    # command to bring down the interface eth0 - execute only once (oneshot)

    service stop_eth0 /system/bin/netcfg eth0 down
        user root
        group root


    # command to start the interface eth0 thereby requesting network information via DHCP

    # - execute only once (oneshot)     
    service start_eth0 /system/bin/netcfg eth0 up dhcp
        user root
        group root


10. Go to the end of the file and insert the following lines:


      # execute stop interface eth0

      on property:sys.boot_completed=1

           start stop_eth0


      # execute start interface eth0

      on property:sys.boot_completed=1

           start start_eth0


11. Save the file.

12. Clean unmount the Android SD card and boot off it on the pcDuino3 board.


After Android is booted unlock the main screen. Go to the screen that shows all the installed programs by clicking on the icon that has six (6) dots. There open the program Terminal and type


In the list you should see that eth0 now has an address in the range of your routers address space.

Close the terminal screen by typing


Now you can try your bowser  to surf the internet.


PS: Any typos found in the above text belong to you ;)

Share this post

Link to post
Share on other sites

Hi Nunja I have tested my image, its working for me...

1. When first boot finished, connect ethernet device and then enable it in settings.

2. Reboot pcduino and wait for boot finish (do not disconnecting ethernet device) and ethernet will get connected and have valid Ip addr automatically.


What not working is if you connect ethernet device after pcduino boot finish then ethernet will not get valid ip addr automatically. :(


But for now its ok for me...

Share this post

Link to post
Share on other sites


As I said it's a quick and dirty one. And i do not pull cables because my pcduino is running until i turn it off.


BTW, the reference to the load line


insmod /system/vendor/modules/zet622x.ko


has nothing to with the ethernet driver. It's simply there to give the system more time to work thru it's boot procedure until someone can reconfigure the ethernet settings :))

Share this post

Link to post
Share on other sites

Thank you Nunja for the instructions.  This solved the annoying problem where ethernet is working, then is lost after a reboot. I have the Android 4.2 bootable SD image - dated 20140826. I installed ES File Explorer File Manager (set Root Explorer to ON under Tools), then edited the 2 files directly and rebooted. Easy!

Share this post

Link to post
Share on other sites

Does a properly changed image (SD preferably)  exist for download?


I've tried 6 ways from Sunday to follow the instructions above. I have had absolutely no luck in ever getting a valid IP address.


Any assistance that anyone can provide would be greatly appreciated.



Share this post

Link to post
Share on other sites



You might want to download



On a linux installation use the dd command. Otherwise for alternative operation systems you use a similar tool.


Some small documentation is included in the archive.


You have to change the setting for language etc.. and activate the ethernet once upon first boot as with the original image.


Hope that helps.

Share this post

Link to post
Share on other sites



Thanks for making the image available. I really appreciate it. Unfortunately, there must be some user error on my part because the system still does not connect to the network. I'll walk through my process and maybe someone can tell me what I'm doing wrong.


I used dd to put the image on an 8G SD card. Upon reboot Android boots off the sdcard and begins the setup process.


After selecting the language, by clicking on the languages above and below the selected languages, the image attempts to connect to Wifi. Since there's no dongle and no embedded wifi transceiver, I skipped this step along with the steps for setting up a google account.


I finally get a home screen with the all apps button on the bottom. I select that, then Settings. Wifi is off. There is a "More' tab a couple of entries down. It pops up a list on the right with Airplane, Ethernet, VPN, Portable Hotspot, and Mobile configs. I choose the ethernet config.


Ethernet is disabled. I took this to be the "activate the ethernet once upon first boot", and enabled it using the "Use Ethernet" checkbox. The MAC line below shows IP Mode: DHCP and a MAC address. IP is both before selection, after selection, and after a reboot. I've tried it with the cable connected, with the cable disconnected then plugging in after booting, and disconnecting and replugging in the cable on the Ethernet settings page. With the latter action a "DISCONNECTED" message pops up under the "Use Ethernet" checkbox when the cable is disconnected and it never seems to disappear after that. Both the link and the traffic LEDs are lit or blinking when the cable is plugged in.


Just to be clear that everything networking works in exactly the same spot using the Ubuntu in NAND. On a whim I tested with a static IP. The status message changed to "Connected: USED DEVICE eth0". However, there does not seem to be any actual connectivity to the network for either names or IP addresses on either the local LAN or any wider connectivity. 


I guess I'm just a bit frustrated that what is arguably the most critical operation that the OS needs to accomplish seems to have absoutely the most trouble to get done.


Any suggestions would be great.



Share this post

Link to post
Share on other sites



Let me recap the process:


Write the image to microSD card.

Boot to it using the pcduino3 with the ethernet (LAN) cable connected.

The first time the system is very slow because it does some internal works like reformatting the card etc.. Be patient.

Then try to overcome the chinese settings, time zone, language, etc.

In settings turn wifi off.

Go to the more settings and enable ethernet.

Wait a minute or two and reboot Android (switch off by using the red application button, unplug power supply, wait a minute, plugin power supply).

Back in Android unlock your screen.

After a while in the upper right corner of the Android interface you will see the connected icon appear (a blue icon).

(It takes sometime - here approx. two minutes - because this image like all Android versions are busy trying to use wifi even if it is disabled. A native Android doesn't have ethernet capabilities included.)



Due to the nature of how the Android was modified to support ethernet by the vendor of the source code (sunxi ?) you DO NOT disconnect and reconnect the ethernet cable while Android is running. It will not reset the ethernet connection in such case. The only possibility in such a case is to reboot the Android once the connection to the router is lost.


I think I've already found the cause of such problem and will investigate such init scripts as time permits.



Hope that helps.

Share this post

Link to post
Share on other sites

​I'm using Android 4.2 bootable SD image - dated 08-26-2014 - set network settings to fixed IP correct Nrtmask/Broadcast/Gateway,Eth0 etc.

​No Network connection.

​Have solved this. I have a 1Port USBNetwork with 3Port USB Hub attached to my pcduino, to which I have attached my keyboard and mouse.

​If I connect my network cable to the Ethernet port ( 10/10 only) then Android connects to the network and internet.


​Hope this helps somebody until the Android .img file is updated.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now