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:

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

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

Continue reading “diff and ignoring spaces and end of lines (unix, dos EOL)”

Colored Man Pages

You certainly know that manpages tend to be very long and boring to read , especially without any colors at all.

You can easily get colored manpages with just one copy&paste into your .bashrc!

Follow this link to Linuxtidbits’ post about “Less Colors For Manpages” and you’ll know how to make it happen!

Colored Manpage

Script to capture a screenshot (with Chromium) (Command-line)

Introduction

I wanted to take screenshots of about 15 Websites, but didn’t want to install any plugins as I wouldn’t use them often. I saw a lot of how-to’s using import from Imagemagick but they capture the whole screen, not clearly what I was looking for.

Using chromium, xwininfo (from X) and import, I made this bash script which captures only the webpage. See below for the Source code.

Continue reading “Script to capture a screenshot (with Chromium) (Command-line)”

[Ubuntu] Byobu: a very useful enhancement for GNU Screen

I’m now using Byobu (earlier known as screen-profiles, but changed to Byobu) everytime I ssh into one of my servers:

[local]$ ssh myserver
Last login: Thu Aug 13 11:03:58 2009 from ...
[remote]$ byobu -R

byobu1

Byobu can be seen as a replacement for the “screen” command, though it is not really a replacement; It should be seen much like an addon or a plugin. It can also be used locally without ssh (I just find it useful with ssh). It shows very useful information (about the computer where screen/byobu is running) and acts just like screen, same commands (though it adds some more keybindings). See screenshot above.
Continue reading “[Ubuntu] Byobu: a very useful enhancement for GNU Screen”

[Ubuntu] Spell-check from command-line using hunspell

If you are a developer or simply a command-line geek/fan, there are times where you type some documents using the command line, like for README’s or for documentation. It is also important to have a very good writing in English if you wish to distribute those files.

Hunspell can help you with spell-checking. It is based on MySpell and contains a nice terminal interface to spell-check your files.
Continue reading “[Ubuntu] Spell-check from command-line using hunspell”