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 6069 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
  • fustini
    fustini over 13 years ago

    Hi Gary,

     

    Good to see you over here (oh, just realized your a roadtester which makes sense why your nick looked familiar to me in that RPi.org thread).  I've been trying to get wi-fi working as well.  I think the trouble is that the debian 6 armel repo isn't aware that the RPi kernel is v3.1.9.  Typically in Linux, the packing system would be able to install the kernel source and headers for the version you're running.  The other problem is that the Debian image from Feb-17 doesn't seem to include any of the wireless kernel modules.

     

    Interesting that you give the URL https://github.com/raspberrypi/linux/tree/2fb814968753d0d4a5fdf056a3a8c9eee3c41aa6.  I wonder if that was my problem.  I was using https://github.com/raspberrypi/linux.gitper instructions from David Singleton:

     

    https://sites.google.com/a/davidsingleton.org/www2/home/stuff-i-had-to-do-to-get-raspberry-pi-debian-image-working

     

    Anyways, the modules I built wouldn't load into the kernel as I posted in:

     

    http://www.raspberrypi.org/forum/distributions/debian-arm-on-raspberry-pi/page-6#p63616

     

    However, pepedog wisely pointed out that the binary kernel modules are available the raspberrypi firmware repo on github:

     

    https://github.com/raspberrypi/linux/blob/rpi-patches/arch/arm/configs/bcmrpi_defconfig

     

    I'm going to give it shot with the modules and boot directories from there.  I'll be very interested to hear how you progress as well.  Hopefully, the early wi-fi efforts can lead to better documentation or even new Debian image which includes the needed wireless modules.

     

    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

    Thanks for the reply Drew.

     

    Interesting link on the David Singleton stuff, looks like he is doing much of the same stuff as me, although I didn't have any issues with the networking, it just worked.

     

    Unfortunately I have been a DOS and Windows developer and Windows Mobile for the last several years so the Linux stuff is a steep learning curve.

     

    To be honest the comments from pepedog were not "Noddy" enough for my Linux skills at present, so I am spending a lot of time reading articles on Linux at present.  It is a little frustrating as I want to be doing more project stuff, but it is also an invaluable learning experience.

     

    I wouldn't even know what a Raspberry Pi kernel module looks like at present but I am sure I will get there in the end.

     

    I look forward to hearing back on your progress.

     

    Cheers

     

    Gary

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

    So I copied the modules and boot from github raspberry firmware repo to /boot and /lib/modules on the Debian image.  However, now the Pi won't boot anymore (hangs right after Pi logo).

     

    But lo and behold I tried Fedora Remix and it has all the wireless kernel modules in /lib/modules!  It loaded the rtl8187 and r8712u ok for the adapters I have.  I'm still trying to figure out how to configure for WPA2 network, but encouraged that the kernel recognized and loaded the drivers.

     

    On the downside, the Fedora Remix image seems to hate the usb hub I'm using, so it's a choice of 2 of 3 (kb, mouse, wifi) at a time.  Though I've ssh'd into it from my workstation so the kb/mouse is not really an issue right now.

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

    Turned out it worked without a hitch on Fedora.  In LXDE, I opened up the NetworkManager applet in the lower right hand side and selected the SSID of AP.  For my first test, I had configured the AP just for WEP.  I'll test with WPA2 next, but very encouraged that it associated ok with WEP.  This was with an Asus 802.11n adapter using the r8712u driver.  I have a couple more adapters I'll check soon too.

     

    Again, the only problem I've encountered with Fedora is with USB hub.  The keyboard also has an integrated hub so what I ended up doing is plugging the keyboard and adapter directly and connected mouse via keyboard only when I need it.  With mouse attached, I often get erratic keyboard input which can be frustrating for things like password entry.  When booting up and logging in, just have the keyboard and mouse connected directly to Pi.  After further WiFi testing, I think I'll turn an eye to researching this issue.

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

    Groovy there is a new debian image and OmerK reports that his wifi adapter worked:

     

    http://omer.me/2012/04/setting-up-wireless-networks-under-debian-on-raspberry-pi/

     

    I just downloaded the image and going to mount and check /lib/modules.  I'll give a try on the Pi tomorrow.

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

    FYI - I've created a document to report on the adapters I've tested:

     

    http://www.element14.com/community/docs/DOC-44703

    • 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,

     

    Interesting findings and I am glad I am not alone in having an uphill struggle with Wi-Fi.

     

    Gary

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

    Hi - yeah, it'll be a bit rough going I think until all the different devices and drivers get tested out.  I saw your RPi.org post but didn't get chance to respond yet.  I should have another adapter later today which the latest Debian should support.  So at that point I'll have to have my hand at the wpa supplicant configuration.  In Fedora, NetworkManager and the nm-applet are installed so wireless configuration is very friendly (aside from the horrible USB hub behavior [unrelated to WiFi]).

     

    And going back to the cross-compiled kernel module issues, I really am keen to figure that out and get the r8712u driver (for those two 802.11n adapters) working on Debian now that I know that it does work ok on the Raspberry Pi's ARM architecture (with Fedora Remix's lovely complete /lib/modules directory).

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

    I made some ground with my ZyXEL NWD2105 and this is supposed to be officially supported in "firmware-ralink".  I struggled initially with the WPA, but then installed wicd which improved things.  I even managed to get a connection and negotiate a DHCP address with my access point... once.

     

    It seems I get loads of lock-ups and frequent kernel panics with this adapter, often the Pi won't boot up if the adapter in installed at power-on, but sometimes it does.

     

    I will try again with the other adapter, which will require the compilation stuff, but might give up soon as I have spent days on this and I'm going nowhere fast.

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

    That's good to know about wicd as I had been thinking of using that, too.  But sorry to hear it has been unstable.  That device uses the rt2800usb driver, right?  Have you seen any error messages before the lock up?

     

    Last night, I tried a RTL8187-based Trendnet TEW-424UB 802.11g adapter.  I had hoped it would work as the RTL8187 driver is in the Debian image and JamesH commented on RPi.org that he got a Netgear adapter with that chipset to work.  However, it failed to work just like the RTL8187-based BlueProton BT3.  I see many errors in kernel log in both latest Debian and Fedora after inserting either of these RTL8187-based adapters (updated my testing doc with those).  This makes me think there is an issue with the driver on the Pi's ARM kernel.

     

    Anyway, now I am motivated to figure out how to get the r8712u driver working in Debian as both the IOGear GWU625 and Asus USB-N10 worked ok in Fedora with that driver.  So back to the task of cross-compilation and kernel module loading attempts image

     

    Let me know how you fair with the other adapter you mentioned.

     

    Thanks,

    Drew

    • 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