element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Raspberry Pi
  • Products
  • More
Raspberry Pi
Raspberry Pi Forum Realtek RTL8192EU ID 0BDA:818B RPI2
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Raspberry Pi to participate - click to join for free!
Featured Articles
Announcing Pi
Technical Specifications
Raspberry Pi FAQs
Win a Pi
Raspberry Pi Wishlist
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Not Answered
  • Replies 0 replies
  • Subscribers 663 subscribers
  • Views 546 views
  • Users 0 members are here
  • raspberry
  • realtek
  • raspberry_pi
  • raspberry-pi
  • usb_device
  • wifi_module
Related

Realtek RTL8192EU ID 0BDA:818B RPI2

Former Member
Former Member over 10 years ago

Hey guys,

 

So I've been spending a lot of time trying to get this to work and I'm now stuck. This is what I've done so far. I got this from http://sprabhu.blogspot.in/2012_07_01_archive.html#4273048004731121321 and had to modify some of it.

 

[code]The latest firmware for the Raspberry Pi is made available through the git repository. The firmware built is based on the kernel sources which are also made available through a separate git repository.

 

Users may want to install the latest firmware to avail of the latest fixes available for the Raspberry Pi kernel. However changes in the kernel necessitates the rebuild of any customer kernel modules installed. These are kernel modules which are not available on the usual kernel which was distributed. In my case, I need to recompile the drivers for my wireless card which aren't available on the stock kernel.

 

The steps given below is to be used when you recompile your drivers from within the Raspberry Pi.

 

Before you do anything, get into root

 

    # sudo -s

 

Before we start, we need to make sure that we have the required tools.

 

    # apt-get update

 

    # apt-get install git gcc make rpi-update

 

    # apt-get upgrade

 

    # rpi-update

 

To update the firmware to the latest one from the git repo, follow the steps below

 

Download the latest firmware repo

 

    #  git clone --depth 1 https://github.com/raspberrypi/firmware.git

 

The argument --depth 1 limits the firmware downloaded to only the latest available in the repo.

 

OR

 

Update your existing firmware repo by first changing into the firmware repo directory and running the command

 

    # git pull

 

You now have to download the latest source code from the git repo. The 256 MB of memory available on the Raspberry Pi isn't sufficient to run the git clone command. To get around this, you can download the git repo on a different machine and then copy over the repo to the Raspberry Pi.

To clone the git repo, use the command

 

    # git clone --branch rpi-patches https://github.com/raspberrypi/linux.git rapi-linux

 

The argument --branch rpi-patches specifies that you would like to download the branch rpi-patches which is the one on which the kernel is built.

Now copy over the directory rapi-linux created to the Raspberry Pi.

 

OR

 

Update the existing sources directory by first changing into the sources repo directory and running the command

 

    # git checkout rpi-patches

 

    # git pull

 

I had to update the soruce directory multiple time to make sure everything synced up.

 

I have the git repos downloaded to the following location on the Raspberry Pi

 

    /root/firmware

 

    /root/rapi-linux

 

 

Now to build the kernel headers required to build the module.

 

1) Determine the git hash which represents the kernel used to build the firmware and check out the sources.

 

    # cat /root/firmware/extra/git_hash

 

    85b7821857dd0b9cabab59d47f08eabed74679a3

 

Use this hash to checkout the kernel sources.

 

    # cd /root/rapi-linux

 

    # git checkout 85b7821857dd0b9cabab59d47f08eabed74679a3

 

 

2) Prepare the sources so that they can be used to build the kernel module.

Reset the sources to clear any artifacts from an earlier build

 

    # make mrproper

 

Copy over the kernel configuration and prepare sources.

 

    # zcat /proc/config.gz > .config

 

    # make oldconfig

 

    # make modules_prepare

 

 

3) Copy over the files require to build the module from the firmware repo

 

    # cp /root/firmware/extra/Module.symvers /root/rapi-linux

 

The kernel sources required to build the kernel module is now complete.

 

To build the module, change into the directory containing the module sources and run the command

 

    # cd /root/rtl8192EU_linux_v4.3.1.1_11320.20140505/

 

 

Need to modify some code first.

   

    # nano /root/rapi-linux/drivers/mmc/host/bcm2708_mci.c

 

You will need to search for the function GP_LEV0 and give it a value, it hasn't been declared yet. Search with "Ctrl + w". Your code should look like this after you find it, it's in there only once.

 

#define GP_LEV0 1

 

static int bcm2708_mci_get_cd(struct mmc_host *mmc)

{

        int present = -ENOSYS;

 

        struct bcm2708_mci_host *host = mmc_priv(mmc);

        void *gpio_base = host->gpio_base;

 

        present = readl( (gpio_base + GP_LEV0) );

 

        if ((present & (1<<29))==(1<<29))

                present = 0;

        else

                present = 1;

 

        printk(KERN_DEBUG"***sdcard present***=%d\n", present);

 

        // FIXME - For now force SD card present for 2835DK

        present = 1;

        return present;

}

 

You will need to type "#define GP_LEV0 1" above "static int bcm2708_mci_get_cd"

 

    "Ctrl + o" to save

    "Ctrl + x" to exit

   

Now build the module

 

    # make -C /root/rapi-linux/ M=

 

We pass the location of the kernel sources directory with the -C parameter.

We pass the location to the module sources using the M= parameter.

 

To update the kernel on the Raspberry Pi, change into the firmware directory and copy over the required files.

First backup the existing files

 

    # cd /root/firmware

 

    # mkdir -p /root/fw.backups/

 

    # rsync -av /boot /root/fw.backups/

 

    # rsync -av /lib/modules/3.18.9-v7 /root/fw.backups/

 

Now copy over the new files

 

    # cp -av boot/* /boot/

 

    # cp -av modules/3.18.9-v7/* /lib/modules/3.18.9-v7/

 

Run depmod to build the module dependencies for modprobe

 

    # depmod -a

 

Perform any additional steps required for your custom modules. In my case, I need to copy over my newly built wireless module to the new modules folder.

 

    # cp /root/rtl8192EU_linux_v4.3.1.1_11320.20140505/8192eu.ko /lib/modules/3.18.9-v7/kernel/drivers/net/wireless/

 

    # depmod -a

 

Now reboot the Raspberry Pi so that the new kernel can be loaded.[/code]

 

Here is my new information.

 

[code]root@raspberrypi:~# uname -a

Linux raspberrypi 3.18.9-v7+ #767 SMP PREEMPT Sat Mar 7 21:52:35 GMT 2015 armv7l GNU/Linux

root@raspberrypi:~# dmesg | grep usb

[    1.289696] usbcore: registered new interface driver usbfs

[    1.295365] usbcore: registered new interface driver hub

[    1.300843] usbcore: registered new device driver usb

[    1.670352] usbcore: registered new interface driver smsc95xx

[    2.199713] dwc_otg bcm2708_usb: DWC OTG Controller

[    2.206521] dwc_otg bcm2708_usb: new USB bus registered, assigned bus number 1

[    2.215779] dwc_otg bcm2708_usb: irq 32, io mem 0x00000000

[    2.234589] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002

[    2.243360] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1

[    2.252552] usb usb1: Product: DWC OTG Controller

[    2.259247] usb usb1: Manufacturer: Linux 3.18.9-v7+ dwc_otg_hcd

[    2.267185] usb usb1: SerialNumber: bcm2708_usb

[    2.286965] usbcore: registered new interface driver usb-storage

[    2.404837] usbcore: registered new interface driver usbhid

[    2.413432] usbhid: USB HID core driver

[    2.657972] usb 1-1: new high-speed USB device number 2 using dwc_otg

[    2.858290] usb 1-1: New USB device found, idVendor=0424, idProduct=9514

[    2.867206] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0

[    3.168126] usb 1-1.1: new high-speed USB device number 3 using dwc_otg

[    3.288406] usb 1-1.1: New USB device found, idVendor=0424, idProduct=ec00

[    3.297777] usb 1-1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0

[    3.372343] smsc95xx 1-1.1:1.0 eth0: register 'smsc95xx' at usb-bcm2708_usb-1.1, smsc95xx USB 2.0 Ethernet, b8:27:eb:0e:90:85

[    3.468101] usb 1-1.3: new high-speed USB device number 4 using dwc_otg

[    3.589261] usb 1-1.3: New USB device found, idVendor=0bda, idProduct=818b

[    3.598851] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3

[    3.608948] usb 1-1.3: Product: 802.11n NIC

[    3.615803] usb 1-1.3: Manufacturer: Realtek

[    3.623091] usb 1-1.3: SerialNumber: 00e04c000001

[/code]

 

The problem I have is I can't find the 8192eu.ko file so to move into /lib/modules/... folder. I'm wondering if that's why it won't work? Anyone have any ideas?

 

Also, I tried this and I get this error.

[code]root@raspberrypi:~# ls

Desktop  firmware  fw.backups  rapi-linux  rtl8192EU_linux_v4.3.1.1_11320.20140505

root@raspberrypi:~# cd rtl8192EU_linux_v4.3.1.1_11320.20140505/

root@raspberrypi:~/rtl8192EU_linux_v4.3.1.1_11320.20140505# ls

clean  core  hal  ifcfg-wlan0  include    Kconfig  Makefile  os_dep  platform  runwpa  wlan0dhcp

root@raspberrypi:~/rtl8192EU_linux_v4.3.1.1_11320.20140505# make

make ARCH=armv7l CROSS_COMPILE= -C /lib/modules/3.18.9-v7+/build M=/root/rtl8192EU_linux_v4.3.1.1_11320.20140505  modules

make[1]: Entering directory '/lib/modules/3.18.9-v7+/build'

make[1]: *** No rule to make target 'modules'.  Stop.

make[1]: Leaving directory '/lib/modules/3.18.9-v7+/build'

Makefile:1323: recipe for target 'modules' failed

make: *** [modules] Error 2

[/code]

 

I ran these commands to check out if everything did well, guess not

 

[code]root@raspberrypi:~/rtl8192EU_linux_v4.3.1.1_11320.20140505# make -C /root/rapi-linux/ M=

make: Entering directory '/root/rapi-linux'

  CHK     include/linux/version.h

  CHK     include/generated/utsrelease.h

make[1]: 'include/generated/mach-types.h' is up to date.

  CALL    scripts/checksyscalls.sh

  CHK     include/generated/compile.h

  CHK     kernel/config_data.h

  Kernel: arch/arm/boot/Image is ready

  SHIPPED arch/arm/boot/compressed/lib1funcs.S

  AS      arch/arm/boot/compressed/lib1funcs.o

  LD      arch/arm/boot/compressed/vmlinux

  OBJCOPY arch/arm/boot/zImage

  Kernel: arch/arm/boot/zImage is ready

  Building modules, stage 2.

  MODPOST 1051 modules

WARNING: modpost: Found 1 section mismatch(es).

To see full details build your kernel with:

'make CONFIG_DEBUG_SECTION_MISMATCH=y'

make: Leaving directory '/root/rapi-linux'

root@raspberrypi:~/rtl8192EU_linux_v4.3.1.1_11320.20140505# make CONFIG_DEBUG_SECTION_MISMATCH=y

make ARCH=armv7l CROSS_COMPILE= -C /lib/modules/3.18.9-v7+/build M=/root/rtl8192EU_linux_v4.3.1.1_11320.20140505  modules

make[1]: Entering directory '/lib/modules/3.18.9-v7+/build'

make[1]: *** No rule to make target 'modules'.  Stop.

make[1]: Leaving directory '/lib/modules/3.18.9-v7+/build'

Makefile:1323: recipe for target 'modules' failed

make: *** [modules] Error 2

[/code]

 

What do I do?

  • Sign in to reply
  • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube