Saturday, September 14, 2013

Beaglebone Black angstrom

Status Update:
This is a list of working Not working items, so you do not get disappointed after reading the post.  This is  a work in progress...

Angstrom:
GPIO
ADC
I2C1
SPI almost, having some issues with CLK, and Data input output.

ArchLinux:
:-(



First Using angstrom distribution:
opkg is the app-get for angstrom....

Linux beaglebone 3.8.11 #1 SMP Wed May 8 07:34:27 CEST 2013 armv7l GNU/Linux

after opkg update, opkg upgrade
Linux beaglebone 3.8.13 #1 SMP Thu Sep 5 16:35:35 CEST 2013 armv7l GNU/Linux


Install Sudo
opkg install sudo

Network settings:
This post here is great source for setting Static IP
http://derekmolloy.ie/set-ip-address-to-be-static-on-the-beaglebone-black/

add user:
su
useradd xyz-user
passwd xyz-user

Update Time and Time Zone:
rm /etc/localtime
ln  /usr/share/zoneinfo/EST /etc/localtime
/usr/bin/ntpdate-sync 
nano default/ntpdate     to set / enable sync server
date             to check your new time


Using GPIO:
#echo 44 > /sys/class/gpio/export

Reference:
http://www.phys-x.org/rbots/index.php?option=com_content&view=article&id=104:lesson-1-beaglebone-black-blink-led&catid=46:beaglebone-black&Itemid=81
http://www.auctoris.co.uk/2012/08/23/gpio-with-sysfs-on-raspberry-pi-part-2/


Using the I2C:
i2cdetect -y -r 1
root@beaglebone:~# i2cdetect -y -r 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- UU UU UU UU -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --   

i2cdump -y 1 0x50 w     or
i2cdump -y 1 0x50 b

Link....
http://minix-i2c.blogspot.com/2013/07/using-i2c-tools-with-angstrom-linux-on.html



Using the SPI:
I found the required files in /lib/firmware/ BB-SPIDEV*
all I did finally, is echo this line

root@beaglebone:/lib/firmware# echo BB-SPIDEV0 >  /sys/devices/bone_capemgr.9/slots

Then ls /dev/spi* and here is what I got...

Now what is next? the question is what is really here that works?



Using Analog Inputs:


sh-4.2# echo cape-bone-iio > /sys/devices/bone_capemgr.*/slots
sh-4.2# find /sys/ -name '*AIN*'
/sys/devices/ocp.2/helper.14/AIN0
/sys/devices/ocp.2/helper.14/AIN1
/sys/devices/ocp.2/helper.14/AIN2
/sys/devices/ocp.2/helper.14/AIN3
/sys/devices/ocp.2/helper.14/AIN4
/sys/devices/ocp.2/helper.14/AIN5
/sys/devices/ocp.2/helper.14/AIN6
/sys/devices/ocp.2/helper.14/AIN7
sh-4.2# cat /sys/devices/ocp.2/helper.14/AIN1
OR  
sh-4.2# cat /sys/devices/ocp.2/helper.14/AIN*



References:
http://www.gigamegablog.com/2012/01/29/beaglebone-linux-101-configuring-angstrom-linux/
http://beaglebone.cameon.net/home/reading-the-analog-inputs-adc
http://www.gigamegablog.com/2012/01/22/beaglebone-coding-101-using-the-serial-and-analog-pins/


BeagleBone Black Updating the Software
Getting Started with BeagleBone Black
============================================================
Now, I am trying arch Linux to see if it works better:

http://archlinuxarm.org/platforms/armv7/ti/beaglebone-black


Steps I used:

  1. pacman -Syu
  2. passwd
  3. pacman -S sudo adduser gcc make
  4. adduser username
  5. EDITOR=nano visudo
  6. copy my files




To Setup eth0 configuration Static:
systemctl disable netctl-ifplugd@eth0
cp /etc/netctl/examples/ethernet-static /etc/netctl/ethernet-static
nano /etc/netctl/ethernet-static #edit to you liking
Use /24 for  255.255.255.0
Use /16 for 255.255.0.0
netctl enable ethernet-static
reboot.







References:
http://hipstercircuits.com/enable-spi-1-0-and-1-1-with-device-tre-overlays-on-beaglebone/




References & Commands:
How to auto mount drive at boot...            /etc/fstab   http://www-rohan.sdsu.edu/doc/debian/ch-disks.html
Debian Tutorial http://www-rohan.sdsu.edu/doc/debian/



No comments:

Post a Comment