Ubuntu on BeagleBone + wifi, repository and kernel issues

I've managed to get Ubuntu 11.10 Oneiric up and running on my
BeagleBone using the guide found here:

http://elinux.org/BeagleBoardUbuntu#Demo_Image

And it has been nothing short of fantastic - I have IceWM and
vcnserver running snappily, and then I hit a huge problem. The
BeagleBone is little and cute, and I wanted to make it wireless. So I
soldered up a battery pack, with great success, and then I chucked in
a USB wifi adapter.

Although not terribly important to this post, the adapter is a Netgear
WNA1000M aka G54/N150 which uses the rtl8192cu driver (I think). I was
having problems getting the wifi adapter to work, and I happened upon
this great guide to diagnose the problem:

http://ubuntuforums.org/showthread.php?t=1806839&highlight=WNA1000M

Basically, I discovered I was probably going to have to compile my own
driver from source - no big deal, I thought.

sudo apt-get install build-essential got me compilers and other
goodies.
sudo apt-get install linux-headers-generic got me nothing.
sudo apt-get install linux-headers-($uname -r) got me nothing.

Without a linux-headers package, I can't compile a driver. But I
wanted to experiment, so I tried, undaunted.

The make command obviously failed, but the verbose message told me
that the kernel was compiled with the following:

CONFIG_WIRELESS_EXT=n
CONFIG_LIBIPW=n

Now as I understand it, both of these need to be set to 'm' in order
to use the various tools to make ANY wifi adapter work correctly with
a BeagleBone. So my question is two fold, I guess:

1. What linux-headers package could I/should I use with this device/
kernel?
2. Is there a way to change the kernel options identified above to 'm'
without compiling a kernel from scratch (or is there a guide to
compiling a BeagleBone Ubuntu kernel that I haven't found yet)?

I've managed to get Ubuntu 11.10 Oneiric up and running on my
BeagleBone using the guide found here:

http://elinux.org/BeagleBoardUbuntu#Demo_Image

And it has been nothing short of fantastic - I have IceWM and
vcnserver running snappily, and then I hit a huge problem. The
BeagleBone is little and cute, and I wanted to make it wireless. So I
soldered up a battery pack, with great success, and then I chucked in
a USB wifi adapter.

Although not terribly important to this post, the adapter is a Netgear
WNA1000M aka G54/N150 which uses the rtl8192cu driver (I think). I was
having problems getting the wifi adapter to work, and I happened upon
this great guide to diagnose the problem:

http://ubuntuforums.org/showthread.php?t=1806839&highlight=WNA1000M

This one right?
http://www.netgear.com/service-provider/products/wireless-adapters/wireless-n/WNA1000M.aspx

Can you share your dmesg/lsusb and i'll take a look at it..

Basically, I discovered I was probably going to have to compile my own
driver from source - no big deal, I thought.

sudo apt-get install build-essential got me compilers and other
goodies.
sudo apt-get install linux-headers-generic got me nothing.
sudo apt-get install linux-headers-($uname -r) got me nothing.

Sorry, It'll probally be about a year before that'll work ^^^^...

Without a linux-headers package, I can't compile a driver. But I
wanted to experiment, so I tried, undaunted.

The make command obviously failed, but the verbose message told me
that the kernel was compiled with the following:

CONFIG_WIRELESS_EXT=n

^^this is enabled:
https://github.com/RobertCNelson/linux-dev/blob/am33x-v3.1/patches/defconfig#L1152

CONFIG_LIBIPW=n

^^ this relies on PCI, so it's not going to be enabled:
http://cateee.net/lkddb/web-lkddb/LIBIPW.html

Now as I understand it, both of these need to be set to 'm' in order
to use the various tools to make ANY wifi adapter work correctly with
a BeagleBone. So my question is two fold, I guess:

1. What linux-headers package could I/should I use with this device/
kernel?
2. Is there a way to change the kernel options identified above to 'm'
without compiling a kernel from scratch (or is there a guide to
compiling a BeagleBone Ubuntu kernel that I haven't found yet)?

1/2 should already be working, so lets take a look at your dmesg/lsusb

My build scripts are located here for the bone..

https://github.com/RobertCNelson/linux-dev/

in the "am33x-v3.1" branch..

am33x support is very new to the mainline kernel, (infact nothing
related to the core is going in till 3.3), so the patches are still a
little bit of mess.

Regards,

Robert,

I've upgraded to the new revision you posted, and I've played with it
some more, and I still can't get this dongle to work. A full dmesg
output can be found at:

http://paste.ubuntu.com/786404/

I also tried installing the *Stallman shudders* proprietary driver for
this device. My initial attempt failed because there's a couple of
broken links in /lib/modules/3.1.0-psp3 that point to /build/*, so I
fixed that. What goes into /build/buildd/../kernel? Is it raw source
code, or is it something I need to build?

This little bone contraption is a hoot. I haven't messed around in the
innards of Linux in a long time.

Thanks for your assistance,
Blake

Robert,

I've upgraded to the new revision you posted, and I've played with it
some more, and I still can't get this dongle to work. A full dmesg
output can be found at:

http://paste.ubuntu.com/786404/

I also tried installing the *Stallman shudders* proprietary driver for
this device. My initial attempt failed because there's a couple of
broken links in /lib/modules/3.1.0-psp3 that point to /build/*, so I
fixed that. What goes into /build/buildd/../kernel? Is it raw source
code, or is it something I need to build?

raw source...

This little bone contraption is a hoot. I haven't messed around in the
innards of Linux in a long time.

Hi Blake,

I did end up getting it to kinda work with that usb wifi device:

http://pastebin.com/EetL8t2Q
&
http://pastebin.com/peTMqWdD

Bus 001 Device 002: ID 0846:9041 NetGear, Inc.

But only about 1/3 of the time did the device actually come up and
getting an ip... And only once did it actually ping google.com..

Still testing different things, other wifi chipsets seem to work fine..

Regards,

Blake,

I am working on a similar issue with getting my wifi usb stick
working. I am trying to compile a driver for the RTL8192CU chipset. I
get the same error as you

make: *** /lib/modules/3.1.0-psp3/build: No such file or directory.
Stop.
make: *** [modules] Error 2

How do resolve the broken links? I am rather new to all of this
embedded Linux stuff and pretty much mashing buttons at this point. I
do have ubuntu installed using Roberts Wiki.

The card does show up with lsusb:

Bus 001 Device 002: ID 0bda:8176 Realtek Semiconductor Corp.
RTL8188CUS 802.11n WLAN

It is calling out the wrong driver and it never establishes connection
with my access point.

Any other insight?

Thanks,

Matt

Blake,

I am working on a similar issue with getting my wifi usb stick
working. I am trying to compile a driver for the RTL8192CU chipset. I
get the same error as you

make: *** /lib/modules/3.1.0-psp3/build: No such file or directory.
Stop.
make: *** [modules] Error 2

How do resolve the broken links? I am rather new to all of this
embedded Linux stuff and pretty much mashing buttons at this point. I
do have ubuntu installed using Roberts Wiki.

Did you install the headers package? (not that they really work to
well in the arm tree, right now)

Best, to just download, v3.2.0, apply patch and defconfig from:
http://rcn-ee.net/deb/oneiric-armel/v3.2.0-psp1/ and symlink to
/lib/modules/3.1.0-psp3/build

The card does show up with lsusb:

Bus 001 Device 002: ID 0bda:8176 Realtek Semiconductor Corp.
RTL8188CUS 802.11n WLAN

It is calling out the wrong driver and it never establishes connection
with my access point.

It's the 'right' driver:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=blob;f=drivers/net/wireless/rtlwifi/rtl8192cu/sw.c;h=c244f2f1b83fb6658569cd545ac37ec3a2772a18;hb=refs/heads/linux-3.2.y#l281

277 /****** 8188CU ********/
278 /* 8188CE-VAU USB minCard */
(snip)
281 {RTL_USB_DEVICE(USB_VENDER_ID_REALTEK, 0x8176, rtl92cu_hal_cfg)},
282 /* 8188cu 1*1 dongle, (b/g mode only) */

Your VID/PID points it as an 8188CU, part of the RTL8192CU family.. :wink:

Regards,

Ahh, see the real problem, your running an older version of my image..
Please update to atleast the v3.2 kernel:

(bone: with internet)
wget http://rcn-ee.net/deb/oneiric-armel/v3.2.0-psp1/install-me.sh
/bin/bash install-me.sh

or just redownload from: http://elinux.org/BeagleBoardUbuntu#Demo_Image

(i just uploaded it yesterday..)

Regards,

Robert,

Thanks for the help. Access point scans now return nearby devices,
which is progress. I did notice that elinux.org has been down for the
last two days.

Thanks again,

Matt

On slightly different subject I used the net install instructions for
debian squeeze on the elinux wiki.

My satellite connection made the internet so slow it said was going to
take 2 days. I've routed my cell phone internet through
an ubuntu laptop to cat 5 and plugged that into my router. All was
working well till my sister unplugged the usb cord on my phone....
But the install completed after removing numerous packages and I was
able to log into root and run tasksel again.

So now its downloading 890 packages.

When I get the install finished I intend to upload a .img.gz to my web
site for others to use and for my own backup purposes.

It will be on http://mypals.info in the files area. I'll post a link
here when its ready.

Used install-me.sh, the kernel boots and a login shell appears on the serial console but it doesn't accept any keyboard input.
Exactly the same trying with ssh.
BeagleBone A4.
Regards
Sid.

Blake,

I am working on a similar issue with getting my wifi usb stick
working. I am trying to compile a driver for the RTL8192CU chipset. I
get the same error as you

make: *** /lib/modules/3.1.0-psp3/build: No such file or directory.

Ahh, see the real problem, your running an older version of my image..
Please update to atleast the v3.2 kernel:

(bone: with internet)
wget http://rcn-ee.net/deb/oneiric-armel/v3.2.0-psp1/install-me.sh
/bin/bash install-me.sh

or just redownload from: http://elinux.org/BeagleBoardUbuntu#Demo_Image

(i just uploaded it yesterday..)

Regards,

Used install-me.sh, the kernel boots and a login shell appears on the serial
console but it doesn't accept any keyboard input.

I wouldn't expect the usb keyboard to print the input over the serial
console. Does the keyboard atleast show up over dmesg/lsusb?

Exactly the same trying with ssh.
BeagleBone A4.

I only have an A2/A3, but according to threads on this mailing list,
there's a problem on the A4's ethernet, that maybe causing the
ssh/network over the onboard ethernet...

Regards,

Blake,

I am working on a similar issue with getting my wifi usb stick
working. I am trying to compile a driver for the RTL8192CU chipset. I
get the same error as you

make: *** /lib/modules/3.1.0-psp3/build: No such file or directory.

Ahh, see the real problem, your running an older version of my image..
Please update to atleast the v3.2 kernel:

(bone: with internet)
wget http://rcn-ee.net/deb/oneiric-armel/v3.2.0-psp1/install-me.sh
/bin/bash install-me.sh

or just redownload from: http://elinux.org/BeagleBoardUbuntu#Demo_Image

(i just uploaded it yesterday..)

Regards,

Used install-me.sh, the kernel boots and a login shell appears on the serial
console but it doesn't accept any keyboard input.

I wouldn't expect the usb keyboard to print the input over the serial
console. Does the keyboard atleast show up over dmesg/lsusb?

The keyboard is on the system I'm running gtkterm on.
The following is with
root@bone:~# uname -r
3.1.0-psp3
sepulot:~ # lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 008: ID 0424:2412 Standard Microsystems Corp.
Bus 001 Device 003: ID 064e:a101 Suyin Corp. Acer CrystalEye Webcam
Bus 001 Device 009: ID 0403:a6d0 Future Technology Devices International, Ltd
Bus 001 Device 023: ID 0525:c0de Netchip Technology, Inc.
sepulot:~ # l /dev/ttyUSB*
crw-rw---- 1 root dialout 188, 0 Feb 5 19:59 /dev/ttyUSB0
sepulot:~ # lsmod|grep ftdi
ftdi_sio 40715 1
usbserial 43180 3 ftdi_sio

Exactly the same trying with ssh.
BeagleBone A4.

I only have an A2/A3, but according to threads on this mailing list,
there's a problem on the A4's ethernet, that maybe causing the
ssh/network over the onboard ethernet...

Regards,

No problems with network, at least on this kernel, R219 has been removed.
In the morning I'll go back to that kernel and check details further on the system it's attached to.
Regards
Sid.

Blake,

I am working on a similar issue with getting my wifi usb stick
working. I am trying to compile a driver for the RTL8192CU chipset. I
get the same error as you

make: *** /lib/modules/3.1.0-psp3/build: No such file or directory.

Ahh, see the real problem, your running an older version of my image..
Please update to atleast the v3.2 kernel:

(bone: with internet)
wget http://rcn-ee.net/deb/oneiric-armel/v3.2.0-psp1/install-me.sh
/bin/bash install-me.sh

or just redownload from: http://elinux.org/BeagleBoardUbuntu#Demo_Image

(i just uploaded it yesterday..)

Regards,

Used install-me.sh, the kernel boots and a login shell appears on the
serial
console but it doesn't accept any keyboard input.

I wouldn't expect the usb keyboard to print the input over the serial
console. Does the keyboard atleast show up over dmesg/lsusb?

The keyboard is on the system I'm running gtkterm on.
The following is with
root@bone:~# uname -r
3.1.0-psp3

ah, your still running the old one..

wget http://rcn-ee.net/deb/oneiric-armel/v3.2.0-psp1/install-me.sh
/bin/bash install-me.sh

to get a v3.2 based kernel..

I've gone back to the old one which works, it's the v3.2.0-psp1 that gives the problem.
I shall go back on it again later today and collect data from lsusb etc.
Regards
Sid.

Make sure to double check that you have all the sources for the GPL bits, since such an img.gz counts as distribution and pointing to the debian archive is sadly not allowed

Well ok then -- will just mirror it privately on my linux pc
Its impossible to get to a web server over my satellite internet...