jueves, 24 de abril de 2014

BBB Developing Station Diagram(Draft)

Hello folks!

I've already purchased my LCD( 8.9inch B089AW01)  controller with HDMI input to be used for my BeagleBone Developing Station.
You can check the item I bought(http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=360702343124&ssPageName=ADME:X:RTQ:US:1123) and maybe look for similar controller for your particular LCDs if you want to build a similar station :)

So now I have to wait for about a month(yes, a month... u.u) to receive my controller and start building my developing Station

In the meantime I'm doing a weir Diagram showing how the BBB Developing Station is gonna be connected, some parts are still missing, but let's call it a draft by now...





































May the bone be with you...

MCT

lunes, 14 de abril de 2014

Giving a voice to the beaglebone black

Adding a sound card to the beaglebone black(English) 




Howdy folks! Now I'm gonna explain you how to add a sound card to the BBB and some examples of using it as a voice syntheziser.

What are we using?

  • A Beaglebone 
  • An audio usb card
  • An audio amplifier or  headphones
Well, before going forward I have to explain why I'm Adding a sound card to my BBB, yes you got me, Im want it to be ALIVE!!( or al least to seems like it is) as you May know in the future I'm gonna be developing a smartass robot and without propper communication skills it won't be that smart right? #)

First of all... Install alsa, in case you don't have it already!!( Internet acces required)
$ opkg install libasound2
$ opkg install alsa-dev 
$ opkg install alsa-lib-dev

then install espeak:

$ opkg install  espeak

Once the install process is finished you have to select the default harware you are going to use...

If you are using a usb audio card plug the dongle and enter the next command to look for your current audio devices:

$ aplay -l

Something like this should appear:








As you see my USB Audio device is set as "card 1", so I need to create/edit the /etc/asound.conf writting the following line:

pcm.!default sysdefault:1

note: sysdefault:1 because my USB card is on "card 1", if your card is set as "card 2" you should write sysdefault:2, 

In case we want to set our default audio output again to HDMI we just need to write:

pcm.!default sysdefault:0


Now let's test the Audio synthesizer!!!!

Connect your headphones or Amplifier equipment to the USB audio card and execute the following command:

$ espeak "Hello World"

Eureka!!! If you're lucky you are going to hear a nice "Hello World" from your beloved BBB =D(If you're not lucky maybe I've missed something, please feel free to comment or send me an email, I'll answer ASAP!! =P

More information about espeak can be found in 

http://travesuras.wordpress.com/2012/01/11/20120111-1/
http://espeak.sourceforge.net/


May the bone be with you...

MCT

sábado, 22 de marzo de 2014

The Beaglebone black goes WIFI

THE BEAGLEBONE GOES WIFI(ENGLISH, ESPAÑOL ABAJO)



What's up friends! Today I'm gonna explain you how to get rid of the ethernet cable using a Wifi USB dongle instead(RTL8192cus).

For this tutorial you'll need the following items:



Before going forward I wanna thank all guys from www.adafruit.com  and www.codealpha.net. I took a lot of info from their sites and it's truly their merit, no mine lol. I just make a Shell script to do it faster XD.

Besides the step by step tutorial I've developed a shell script to automate the whole process

Step by step:


//****Update & Upgrade the system****
$ opkg update
$ opkg upgrade
$ opkg install kernel-dev
$ opkg install kernel-headers
//********************************
Once all packages are updated and upgraded let's do a reboot on the system so the kernel changes take effect.

*Note: If your kernel was already up-to-date a Warning will prompt indicating you already have the latest kernel version.Don't worry, its an expected behavior.




//*****Download the driver module and compile***************
$ 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=""

//***************************************************
When executing the commands above we're downloading the driver module(Thanks to www.codealpha.net) so we can compile it later using "CROSS_COMPILE"

//*****Installing the driver module********************************
*Precondition: Place yourself in the "rtl8192cu_beaglebone" directory
$ mv 8192cu.ko /lib/modules/$(uname -r)
$ depmod -a
$ cd /etc/modules-load.d
$ echo "8192cu" > rtl8192cu-vendor.conf
//************************************************************
Executing the commands above we're moving the driver to the "modules" directory(it is here were all linux modules are located). Once it is moved we load the module on the system.
**Note: It's possible that the following Warnings appear:
"WARNING: could not open /lib/modules/3.8.13/modules.order: No such file or directory
 WARNING: could not open /lib/modules/3.8.13/modules.builtin: No such file or directory"

You have nothing to worry about!, this happened to me also and right now I'm using my WIFI dongle ;)

//*****Blacklisting the old 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
//*************************************************************

//*****Enabling Wireless Networks**********************************
$ sed -i.bk 's/Enable=false/Enable=true/g' /var/lib/connman/settings
$ sed -i.bk 's/OfflineMode=true/OfflineMode=false/g' /var/lib/connman/settigs
//*************************************************************
Using the command above we are enabling wireless networks by replacing the string "[Wifi] Enable=false for [Wifi] Enable=true. A backup copy is generated in  /var/lib/connman/settings.bak in case something goes  wrong.


//******Creating the network configuration file****************
read -p "Enter your network Security(wpa or wep):" net_security
read -p "Enter your network name(ESSID):" essid
read -p "Enter your network password:" pass
echo "[service_home]" > /var/lib/connman/wifi.config
echo "Type = wifi" >> /var/lib/connman/wifi.config
echo "Name = $essid" >> /var/lib/connman/wifi.config
echo "Security = $net_security" >> /var/lib/connman/wifi.config
echo "Passphrase = $pass" >> /var/lib/connman/wifi.config
//*********************************************************

Once the steps above are executed, connect your USB Wifi dongle(It is recommended to use a USB HUB or a USB cable extension, sometimes USB devices doesn't work if connected directly to the BBB PCB board) and rebooot the system

//********************
$ reboot
//********************

echo "THANK YOU!! AND DON'T FORGET TO COMMENT YOUR RESULTS =D"






Shell Script:

1.- Download the file:
https://drive.google.com/file/d/0BylcFoFgQbQeNUZFajNhc1BmSUU/edit?usp=sharing

2.- Copy the script to your BBB and change execution permission by doing:

$ chmode 755  install_8192cu_BBB.sh

3.-Un-comment the following section in the script:

#***************************************************************
#echo "###System update & upgrade will take a wile...Go get some coffe =P"
#opkg update
#opkg upgrade
#opkg install kernel-dev
#opkg install kernel-headers
#echo "System Update & Upgrade sequence  finished!!
#echo "Now please reboot the system, after that comment the commands above and run the script again"
#***************************************************************

The Shell script should look like this now:


#***************************************************************
echo "###System update & upgrade will take a wile...Go get some coffe =P"
opkg update
opkg upgrade
opkg install kernel-dev
opkg install kernel-headers
echo "System Update & Upgrade sequence  finished!!
echo "Now please reboot the system, after that comment the commands above and run the script again"
#***************************************************************

4.- Save the script and execute the following commands:

$ su   ( root acces)
$ ./install_8192cu_BBB.sh

5.-Once the system reboot is required we need to comment again the section described in step 3(We have to reboot due to possible changes on the kernel)

6.- Execute again the script

$ su
$ ./install_8192cu_BBB.sh

7.- Follow the Script instructions

8.- You're done!!! Its recommended to reboot your system once the script finish its task(connect your Wifi dongle at boot-up sequence



May the bone be with you....

MCT







EL BEAGLEBONE BLACK SE QUITA LOS CABLES(ENGLISH VERSION BELOW)


Que tal amigos! Hoy les voy a explicar como hice para echar andar mi modulo de WIFI USB (chip RTL8188CUS), será de mucha utilidad para ir dejando cada vez menos cables atados a nuestra BBB

Para este tutorial se necesitará lo siguiente:

Antes que nada quiero agradecer a adafruit.com y codealpha.net por los tutoriales que ofrecen(de los cuales yo tome un poco de cada uno para este tutorial)

Además del tutorial paso a paso desarrollé un shell script para automatizar todo el proceso

Paso a paso:


//****Actualizando el sistema****
$ opkg update
$ opkg upgrade
$ opkg install kernel-dev
$ opkg install kernel-headers
//**************************
Una vez que se terminan de actualizar todos los paquetes tenemos hacer un "reboot" para que los cambios en el kernel se vean reflejados

*Nota: Si tu kernel ya estaba actualizado aparecera un Warning indicando que ya tienes el kernel mas actual, es normal.



//*****Descargar el driver y compilarlo***********************
$ 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=""

//***************************************************
Al ejecutar los comandos arriba mencionados estamos descargando el driver del modulo de Wifi(Gracias a www.codealpha.net) para despues compilarlo con el comando make CROSS_COMPILE


//*****Instalacion del driver-modulo********************************
*Nota: Como precondicion tienes que estar en la carpeta "rtl8192cu_beaglebone"

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

Al ejecutar los comandos de arriba estamos moviendo copiando el driver de WIFI a la carpeta de moudules(es alli donde se colocan todos los modulos-drivers en linux). Una vez movido se carga al sistema.

**Nota: Es probable que los siguientes Warnings les aparezcan:
"WARNING: could not open /lib/modules/3.8.13/modules.order: No such file or directory
 WARNING: could not open /lib/modules/3.8.13/modules.builtin: No such file or directory"


No hay de que alarmarse!, esto me paso a mi tambien y aun asi logre hacer funcionar mi dongle

//*****Poniendo en  "Blacklist" a los viejos 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
//*************************************************************

//*****Habilitando la red inalambrica**********************************
$ sed -i.bk 's/Enable=false/Enable=true/g' /var/lib/connman/settings
//*************************************************************

Con el comando de arriba habilitamos la red inalambrica sustituyendo la linea de [WIFI] Enable=false por la de [WIfi] Enable=true. Una copia de seguridad se va a crear en  /var/lib/connman/settings.bak en caso de que algo salga mal.



//******Generando el archivo de configuracion de red****************
read -p "Enter your network Security(wpa or wep):" net_security
read -p "Enter your network name(ESSID):" essid
read -p "Enter your network password:" pass
echo "[service_home]" > /var/lib/connman/wifi.config
echo "Type = wifi" >> /var/lib/connman/wifi.config
echo "Name = $essid" >> /var/lib/connman/wifi.config
echo "Security = $net_security" >> /var/lib/connman/wifi.config
echo "Passphrase = $pass" >> /var/lib/connman/wifi.config
//*********************************************************

Al escribir los comandos de arriba estamos indicando al controlador de red(Connman en Angstrom) algunas configuraciones básicas de nuestra conexión a Internet y las guardamos en /var/lib/connman/wifi.config para que puedan ser leidas por Connman

Una vez que los pasos anteriores sean ejecutados, conectamos nuestro USB-Wifi dongle(preferentemente usando un HUB USB o una extensión de cable USB, ya que se han reportado problemas de reconocimiento de dispositivos USB conectados directamente a la BBB) y reiniciamos el sistema:

//********************
$ reboot
//********************

echo "Porfavor comenta tus resultados, cualquier duda o sugerencia es bienvenida XD"


May the bone be with you...

MCT





Shell Script:

Pasos a seguir:
1.- Descarga el siguiente archivo:
https://drive.google.com/file/d/0BylcFoFgQbQeNUZFajNhc1BmSUU/edit?usp=sharing

2.- Copia el script a tu BBB y cambia sus permisos de ejecucion con
$ chmode 755  install_8192cu_BBB.sh

3.- Descomenta la siguiente seccion

#***************************************************************
#echo "###System update & upgrade will take a wile...Go get some coffe =P"
#opkg update
#opkg upgrade
#opkg install kernel-dev
#opkg install kernel-headers
#echo "System Update & Upgrade sequence  finished!!
#echo "Now please reboot the system, after that comment the commands above and run the script again"
#***************************************************************

Quedando de la siguiente manera en el archivo install_8192cu_BBB.sh

#***************************************************************
echo "###System update & upgrade will take a wile...Go get some coffe =P"
opkg update
opkg upgrade
opkg install kernel-dev
opkg install kernel-headers
echo "System Update & Upgrade sequence  finished!!
echo "Now please reboot the system, after that comment the commands above and run the script again"
#***************************************************************

4.- Guarda el script y ejecutalo escribiendo los siguientes comandos

$ su   (Damos permiso de root)
$ ./install_8192cu_BBB.sh  

5.- Una vez que nos pida reiniciar el sistema lo hacemos y comentamos nuevamente la seccion explicada en el paso 3( tenemos que reinicar porque actualizamos el kernel)

6.- Ejecutar nuevamente el script
$ su
$ ./install_8192cu_BBB.sh

7.- Seguir instrucciones del script

8.- Listo!!! Al final, al reinicar el servicion de connman o reiniciar nuestro BBB deberiamos estar conectados a nuestra red inalambrica XD







miércoles, 12 de marzo de 2014

Beaglebone Developing Station



(SPANISH)
Hola a todos, este es mi primer post!!!

El proposito de este log es mostrarles lo que estoy haciendo con el beaglebone black(BBB). y de esta manera contribuir un poco con la comudidad geek en internet(que tanto ha hecho ya por mi sin yo haber retribuido un poco con mis humildes conocimientos).


Por lo pronto pretendo hacer una estacion de desarrollo que no necesite de SSH, conexion USB a una PC ni VNC. Estarà conectada a una pequeña LCD para tener todo mas "a la mano". Estuve ya por un tiempo lidiando con conexiones por SSH ya sea de mi celular, laptop o tablet pero nada me funciono siempre hacia falta algo... CONTROL TOTAL.En el futuro esta estacion de trabajo podria servir para desarrollar proyectos mas ambiciosos(yo estoy pensando en un robot con capacidad de procesamiento de video)

Para esto eh estado reuniendo algo de scrap electronico y otros gadgets:


  • Una netbook mini hp 2133 con el chip de video sobrecalentado(Si... es HP). Reusare su pantalla
  • Un USB WIFI dongle con Chipset: Realtek RTL8188CUS
  • Tarjeta de audio USB
  • Bateria de Litio de 3.7V (Escogi una 18650 @3000mAh en dx.com)
  • Algunos cables de prototipado y cinta aislante(Nunca puede faltar)
  • Una BeagleBoneBlack por supuesto ;)

Una vez que reuni todo lo anterior empece por deshacerme del cable de Ethernet configurando WIfi dongle, tarde un poco, ya que la informacion que habia en internet no resolvia al 100% mi caso pero termine tomando un poco de aqui y de alla y logre hacerlo funcionar =D. En mi proximo post les dare los pasos exactos para echar a andar este Dongle en especifico(supongo que no deberia haber mucha diferencia con otros modelos, salvo los drivers)

Nos vemos en el proximo post!! 
Cualquier sugerencia o pregunta no duden en comentar

May the bone be with you...


MCT

(ENGLISH)

Hello everyone, this is my first entry, (yeah!!!!) 

The purpose of this blog is to show you guys what I'm doing with the beaglebone and to contribute with a little something to the internet geek community.

Right now I'm working on making a "mini developing bench" for the beaglebone. I'm gonna use it to develop software and beggin coding as fast as possible without the need of ssh communication, USB connection directly to your PC, VNC remote desktop, etc...

I have being gathering some electronic scrap and other stuff for the project:

  • A mini hp 2133 with a overheated video chip. I'm reusing the LCD display
  • USB WIFI adapter with a  Chipset: Realtek RTL8188CUS
  • USB-AUDD 3D Audio Sound Card Adapter
  • 3.7V Lithium battery(I choose a 18650 3000mAh model from dx.com)
  • Some spare wires and electrical tape
  • A beaglebone black of course ;)

Once I got the above items ready I started by configuring the drivers for the USB Wifi adapter. There are several information already on the internet but didn't worked for me 100% I needed to take a little bit from there and a little bit from other sites to get it work. I'll explain the whole process on my next Post. 

May the bone be with you....


MCT