How to install a rtl8192cu on the Beaglebone Black (BBB) running Angstrom

opkg update
opkg upgrade
opkg install kernel-dev
opkg install kernel-headers

You may need to reboot.

cd /usr/src/kernel
make scripts
ln -s /usr/src/kernel /lib/modules/$(uname -r)/build
cd ~
git clone git://github.com/cmicali/rtl8192cu_beaglebone.git
cd rtl8192cu_beaglebone
make CROSS_COMPILE=""

Then follow 2.2 from bonenotes.tumblr.com:

Install the driver

mv 8192cu.ko /lib/modules/$(uname -r)
depmod -a
cd /etc/modules-load.d
echo "8192cu" > rtl8192cu-vendor.conf

Blacklist the old rtlwifi drivers

cd /etc/modprobe.d
echo "install rtl8192cu /bin/false" >wifi_blacklist.conf
echo "install rtl8192c_common /bin/false" >>wifi_blacklist.conf
echo "install rtlwifi /bin/false" >>wifi_blacklist.conf

Edit /var/lib/connman/settings and enable WIFI

[global]
OfflineMode=false
 
[Wired]
Enable=true
Tethering=false
 
[WiFi]
Enable=true
Tethering=false

Encrypt your passphrase

wpa_passphrase YourSSID YourPassphrase

Edit /var/lib/connman/wifi.config and set it to the following

[service_home]
Type=wifi
Name=YourSSID
Passphrase=YourEncryptedPassphrase

Plug in your WIFI adaptor and reboot

shutdown -r 0

Sources & Thanks:
Big Thanks to cmicali: bonenotes.tumblr.com/
Thanks to Nomel: nomel.org/post/30357133735/beaglebone-tutorial-how-to-compile-kernel-modules-and

――

Putty and tree – how to avoid weird characters (squares)

Character encoding is always a problem when communicating between Windows and Linux. And using the “tree” command is affected by this problem if you are connected to a Linux box using Putty on a Windows box. You will certainly get weird characters, probably squares.

For those who are not sure about what tree is. It is a command-line tool to list contents of directories in a tree-like format.

A solution to this problem is to force using plain ASCII characters:

tree --charset=ASCII

You can also have an alias for this command, so that every time you type “tree“, it will force tree to use the ASCII charset automatically.

alias tree='tree --charset=ASCII'

And this is an example of what you will get as an output:

/tmp
|-- claws-mail-1000
|-- keyring-x803mg
|   |-- control
|   |-- pkcs11
|   `-- ssh
|-- orbit-gdm [error opening dir]
`-- virtual-user
――

Convert Video (avi) or Audio (mp3) to .3g2 for the Samsung Exclaim

The Samsung Exclaim™ requires the 3g2 format for its ringtones or even videos. This is a format that is optimized for 3G phones. Fortunately on Linux, FFmpeg is a very complete tool to work with audio and video formats and convert between them, and it can, of course, generate 3g2 files.

If you have compiled and installed the right packages (Medibuntu repository with the libaac support, for example), you can easily do one of these commands with ffmpeg:

Read the rest of this entry »

――

diff and ignoring spaces and end of lines (unix, dos EOL)

Possibly you will need to either do a diff between files where they don’t use the same new line character.

Because the new line character is OS-dependant, there are issues when doing a diff on these files when you are not using that same OS.
And there are also times where you just want diff to ignore all spaces and new lines…

The –ignore-all-space option for diff is really useful in these two cases. It will check for differences between the given files ignoring spaces or new lines whether there is none, one or more

Read the rest of this entry »

――