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 & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • 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
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • 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 Installing Kernel Headers on the Pi?
  • 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
  • Replies 28 replies
  • Subscribers 675 subscribers
  • Views 6148 views
  • Users 0 members are here
  • raspberry
  • help
  • helpme
  • pi
  • raspberry_pi
  • raspberrypi
Related

Installing Kernel Headers on the Pi?

Former Member
Former Member over 13 years ago

I have been trying to get my WLAN adapter working on the Pi and it would seem I need to compile the drivers.

 

From what I can tell though, the kernel headers are not installed.

 

I have tried

 

$ sudo apt-get install linux-headers-$(uname -r)

 

but I just get

 

E: Unable to locate package linux-headers-3.1.9

E: Couldn't find any package by regex 'linux-headers-3.1.9'

 

 

I guess this version is unique to the Pi and what I need is probably in here somewhere:

 

https://github.com/raspberrypi/linux/tree/2fb814968753d0d4a5fdf056a3a8c9eee3c41aa6

 

But as a linux noob, I have no idea what I need, or what to do with it?

 

I think there are already others with the same problem and I guess there will be many more soon.

 

Could anyone provide a "Noddy" guide on this?

 

Thanks

 

Gary

  • Sign in to reply
  • Cancel
Parents
  • Former Member
    Former Member over 13 years ago

    Well I might have been a bit harsh about blaming the lock-ups and kernel panics on the adapters.

     

    It seems that those problems were due to me having a low voltage on the Pi.  When I check the voltage across TP1 and TP2 I was getting about 3.9V.  I don't know how this was still running, but adding a USB WLAN adapter and powering it up was obvioulsy a step too far.

     

    I tracked the problem down to my powered hub.  I have a decent 3A PSU on it, but the hub it cheap.  The soldering was poor and the tracks a bit too thin to deliver the current required by the Pi.  After a bit of soldering a some extra wire, the voltage cam up to 4.81V.  Not fantastic, but should be OK.  I will be looking for other options to improve it further.

     

    For now I have used a separate PSU for the Pi so that it is definitely running at a respectable 5.1v now.

     

    I have retested both adapters and I get the same results but without the lock-ups and kernel panics.  It is still not working, but stable, and therefore a lot less frustrating.

     

    Out of desparation, I am going to try the squeeze-backports of the two firmware packages, just to see if it will make any difference.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • fustini
    fustini over 13 years ago in reply to Former Member

    Ah, very interesting to know.  Darn power supplies always causing trouble.

     

    So now that it is stable, do you still have the problem:

     

    I even managed to get a connection and negotiate a DHCP address with my access point... once.

     

    Is there error next time you try to reconnect?

     

    Good luck with backports.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 13 years ago in reply to fustini

    I haven't been able to get the wireless to reconnect again.  I was running with two separate supplies to get my 5V on the Pi but it is a nuisance because of the backfeed from the hubs uplink connection.  It makes it very fiddly when you need to pull the power.

     

    I will probably start again from scratch with a clean debian image soon.

     

    When running from a single supply into my hub, I am still getting around 4.81v.  This is probably enough, but as the cut-off is 4.75V it is a bit too close for comfort.  I don't want to be wasting any more time because of low voltage, so I need to make up some cables to use some other bits I have laying around here as PSU solution.

     

    Will have to try again soon.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • fustini
    fustini over 13 years ago in reply to Former Member

    Thanks for the heads up. I've wondered if power is an issue for me, too.  I'm going to bring a couple different micro usb chargers tomorrow in case that helps.

     

    What test points are you using to take that reading - on the power adapter or directly on the Pi?  I'm also considering hooking up a bench supply so I know exactly what the output is.

     

    However, I'm thinking the rtl8187 adapter issue probably isn't with power unless power varies alot between WiFi adapters.  I did today get another adapter to work in that Debian image: 148f:2573 Ralink Technology, Corp. RT2501/RT2573 Wireless Adapter (from lsusb).  It was just good luck as my friend happened to have this old no-name adapter.  Nice to be able to constrast the failing adapters against a working one now.

     

    Cheers,

    Drew

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 13 years ago in reply to fustini

    Good to hear that you have got one working at least.  This seems to be quite a lottery, even if the adapters appear to be supported in the firmware packages.

     

    For voltage measurement I was using TP1 and TP2 on the Pi board itself, although for ease of access I have fitted my "Slice Of Pi" GPIO board which gives good access to the Gnd, 3v3 and 5v0 points.

     

    Cheers

     

    Gary

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • fustini
    fustini over 13 years ago in reply to Former Member

    Ah, cool that you have that board.  I remember seeing it when looking at the eLinux wiki.  I did bring a DMM today, couple different USB power adapters including a 2.1A, different micro USB cables, and different keyboards.  Hoping to rule out power issues for the smsc kernel errors with RTL8187 adapters attached.

     

    BTW, I've found WikiDevi very useful in tracking down different revisions of a given adapter for example:

     

    http://www.wikidevi.com/wiki/TRENDnet_TEW-424UB_v1

     

    I gave another shot at cross compiling last night.  There is additional instructions on http://elinux.org/Rpi_kernel_compilation now as to how to create the kernel image for the boot partition. Today, I'm going to copy that new kernel image and the new /lib/modules to my Debian 2012-04-13 SD card and try to boot.  Also, the driver I'm after right now is r8712u which also required my to add CONFIG_STAGING (iirc) to 'y' in kernel config.

     

    If I can get over the hump of getting a kernel and modules I've compiled to work, then I think the drivers issue will be much less.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 13 years ago in reply to fustini

    Good stuff with the kernel compilation, presuambly that will give the missing kernel headers...

     

    I have started fresh now.

     

    New debian image, clean power supply and my hub appears to have died... oh well it was cheap anyway.

     

    Good news is... i have managed to get Wi-Fi workign properly now! Woo Hoo!

     

    I am using the ZyXEL NWD2105 and using the drivers from: $ sudo aptitude -t squeeze-backports install firmware-realtek

     

    I then installed wicd.

     

    Popped into LXDE to configure wicd with my WPA PSK and set to default, then chose "Connect" and it worked!

     

    Unplugged the Ethernet cable, rebooted and away it goes. Superb.

     

    It does take a few seconds after a reboot before it picks up the wifi network but still, that's fine with me.

     

    I did notice a couple of glitches on my keyboard now.  This could be interference as it is a Logitech k400 2.4GHz wireless jobby, but according to the specs, the NWD2105 can take 300mA while transmitting and 160mA receiving, so it is probably close to the limit on the polyfuses.  What I really need now is a powered hub...

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • fustini
    fustini over 13 years ago in reply to Former Member

    That's great to hear!  I'm tempted to pick one up.  Could you paste the USB ID from lsusb?

     

    Interesting notes on the current consumption during RX and TX.  I'm still trying to fully understand the power situation on the Pi.  Looking back at PeteL's Q & A (http://www.raspberrypi.org/archives/837), he stated "The fuses kick in hard around 280mA and fold back and limit to 140mA."  So I'm wondering what happens if a WiFi adapter tries to try 300mA.

     

    Thanks,

    Drew

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • fustini
    fustini over 13 years ago in reply to fustini

    BTW, I finally got my own kernel to boot and got the r8712u driver loaded image  Here's instructions I followed: http://www.element14.com/community/docs/DOC-44948/l/compiling-linux-kernel-staging-driver-modules

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • fustini
    fustini over 13 years ago in reply to fustini

    BTW, I finally got my own kernel to boot and got the r8712u driver loaded image  Here's instructions I followed: http://www.element14.com/community/docs/DOC-44948/l/compiling-linux-kernel-staging-driver-modules

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Children
  • Former Member
    Former Member over 13 years ago in reply to fustini

    That's great news on the compilation, well done.  I will have to see if I can follow the instructions myself now.

     

    As for the ZyXEL WiFi, from a power perspective, it really does need to be run from a powered hub and I think.  The Pi feels like it is really straining to keep things running.  I added a basic 4 port non-powered hub just to see if I could put some distance between the WiFi and my Logitech receiver and the extra power taken by the non-powered hub, tipped it over the edge.

     

    The output from lsusb for the ZyXEL NWD2105 is:

    Bus 001 Device 004: ID 0586:341e ZyXEL Communications Corp.

     

    Here is where I got mine from:

     

    http://www.ebuyer.com/237221-zyxel-nwd2105-wireless-n150-micro-usb-adapter-91-005-353001b

     

    It is not as small as the Edimax EW7811Un, but at least it is working without compiling the drivers.

     

    Cheers

     

    Gary

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • fustini
    fustini over 13 years ago in reply to Former Member

    That's a nice find - pretty cheap on Amazon, too.  Looks like this is it's entry on WikiDevi: http://wikidevi.com/wiki/ZyXEL_NWD2105.  You should add to the eLinux wiki page: http://elinux.org/RPi_VerifiedPeripherals#USB_WiFi_Adapters

     

    Interesting to hear your feedback on powered hub.  I'm still trying to figure if the RTL8187 adapter problem is power or driver related.  But at least got two working ones now with the r8712u driver image

     

    BTW, on that document I created, I attached the kernel image and /lib/modules zip archive which you should be able to use if the driver you need is in the raspberrypi github v3.1.9+ kernel source.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 13 years ago in reply to fustini

    Thanks Drew,

     

    I have downloaded the source but havn't had time to do any digging around with it yet.

     

    I bought a new powered hub to replace the one that went pop.  I got a small 4-port Belkin hub.  It came with a 2.5 Amp PSU but I am not using that.  I have my own supply which I am using with a Y lead and that seems to give me a consistent 5v on the Pi, whereas using the Belkin PSU with the Pi power coming from the hub seemed to dip down to 4.8v again.

     

    Another discovery I have made which could be quite important, is that I cannot get the ZyXEL adapter to work when running through an external hub. It is recognised by lsusb, but dmesg throws up all sorts of DEBUG errors and hangs the system.  As soon as I put it in one of the Pi USB ports, it works a treat.

     

    This seems to work fine now though, because the Belkin Hub is running everything else fine, and no stability issues so far.

     

    I might re-visit the Edimax adapter with it plugged directly into the Pi.

     

    Have you noticed anything like this?  Do your WiFi adapters work when plugged into an external hub?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • fustini
    fustini over 13 years ago in reply to Former Member

    I believe the two I have working so far (with r8712u driver) do work from the external hub... but my memory is a little clouded by my ongoing attempts with other adapters.  I'll test to see tomorrow.  Interesting to hear about your setup - offloading everything else to the hub.

     

    FYI - user ajtag looks to have gotten rtl8192cu working:

     

    http://www.raspberrypi.org/forum/troubleshooting/trying-to-get-an-rtl8188cus-wireless-usb-nic-working

     

    I think that is what you need for your other adapter, right?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • fustini
    fustini over 13 years ago in reply to fustini

    Well, thanks for asking that question about the hub!  So I noticed that Asus N10, Asus N13 and IOGear GWU625 all worked ok from the hub but only if the keyboard was plugged into the Pi directly and not the hub.  When keyboard was in hub, too, I would get smsc95xx register error in kernel log.  Rather odd I thought, and my TP1/TP2 voltage is stable at 5.15V throughout.

     

    So I happened to check what would happen with no keyboard and just SSH.  Well, low and behold, my RTL8187-based Trendnet TEW-424UB started working!  There were only the same model Levono kb (04b3:301b IBM Corp. SK-8815 Keyboard) in the office, but I did have an old PS/2 keyboard with a PS/2 to USB converter (09ae:0002 Tripplite B015-000B015-000 R0.74 USB to PS2 adapter).  The RTL8187 driver kept working with that kb plugged in.  Goodness gracious - not sure why I waited so long to try another keyboard!

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 13 years ago in reply to fustini

    Thanks for the heads-up on the 8192cu.  Looks like he has included the drivers he compiled too.  I will give them a try when I get a chance, but looking at some other stuff at present.

     

    Looks like the new debian image on the .org website now includes the kernel headers, so in theory I should be able to compile my own now too.

     

    So much to try and do and so little spare time...

     

    Interesting about your results with the hub and keyboards.  I am not sure what the pattern is, but it suggests that there is still plenty of trail and error.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • fustini
    fustini over 13 years ago in reply to Former Member

    You're right about trial and error!  I had been testing with Debian from the console via wicd-curses.  I finally & launched LXDE today and attached a mouse to discover my IOGear GWU625 wifi adapter (r8712u driver) stopped working and smsc95xx register read/write errors started occurring.  I've tried two different wired USB mice and different permutations of connections, via powered hub and also direct.  Regardless, wifi adapter fails when all 3 (kb, mouse, wifi) are connected.

     

    For LXDE in Debian, you were using ZyXEL plugged in directly with keyboard & mouse connected to unpowered hub, right?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 13 years ago in reply to fustini

    I didn't have any joy when using my WiFi with an unpowered hub at all. Not even when the ZyXEL was direct into the Pi and the keyboard was into the hub.

     

    What I have working is my ZyXEL direct into the Pi and the keyboard and mouse into a (now Belkin) powered hub with my custom power supply and Y lead.  I made a Y lead so the Pi power and hub come on and go off together, but the Pi power is not drawn through the hub.  This seems to keep the voltage more stable when the WiFi has cranked up the power.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • fustini
    fustini over 13 years ago in reply to Former Member

    Thanks for elaborating.  It's helpful to know that configuration is wokring.

    • Cancel
    • Vote Up 0 Vote Down
    • 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