Wednesday, June 12, 2013

My Adventures with BBB BeagleBoneBlack

My Adventures with BBB  BeagleBoneBlack

2013m06d12   This is a core dump of my last few days with BBB... i will clean it up soon....



2013m06d08  BBB arrived from AdaFruit today                     99BBBnotes

BBB was not recognized by LMB MacBook when I plugged it in
Using the XP 99$ laptop.... many devices where detected   what are they ?

===========================================

I connected BBB to ethernet
Using the terminal app ( LMB MacBook ) I connected
Last login: Thu May 30 22:33:43 on ttys001
LMB:~ 99guspuppet$ ssh root@beaglebone.local
The authenticity of host 'beaglebone.local (192.168.2.108)' can't be established.
RSA key fingerprint is xxxxxxxxxxxxxxxxxxxxxxx
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'beaglebone.local,192.168.2.108' (RSA) to the list of known hosts.
root@beaglebone.local's password: xxxx
root@beaglebone:~#

=========================================
I used opkg update
then ......
root@beaglebone:~# opkg install x11vnc
Package x11vnc (0.9.13-r0.7) installed in root is up to date.
root@beaglebone:~# x11vnc -bg -o %HOME/.x11vnc.log.%VNCDISPLAY -auth /var/run/gdm/auth-for-gdm*/database -display :0
01/01/2000 00:10:42 Expanded logfile to '%HOME/.x11vnc.log.beaglebone:5900'
01/01/2000 00:10:42 Expanded logfile to '/home/root/.x11vnc.log.beaglebone:5900'
PORT=5900
root@beaglebone:~#

I used Chicken VNC from LMB MacBook
      password = root   server = beaglebone.local

http://igadgetlife.com/gadgets/apple/a-look-at-vnc-clients-for-your-mac/
===========================================
sh-4.2# uname -aupdate
Linux beaglebone 3.8.13 #1 SMP Mon May 20 17:07:58 CEST 2013 armv7l GNU/Linux

============================================
2013m06d09                working with ffmpeg and avconv
http://arashafiei.wordpress.com/2012/10/12/capture-video-and-audio-from-webcam-using-ffmpeg/
cheese only shows image up to 640 by 360     this may be caused by screen limitations of VNC

To determine what processes are running
root@beaglebone:~# ps ax| grep cheese
  618 pts/0    S+     0:00 grep cheese
even better
root@beaglebone:~# ps axl | grep cheese
0     0   632   608  20   0   1956   572 -      S+   pts/0      0:00 grep cheese

===========
Killing a process

I'm surprised nobody's mentioned Ctrl-Z or Ctrl-C yet. Ctrl-C harshly asks the running program to quit. Ctrl-Z should always work on a program, but some programs override Ctrl-C with a signal handler, and the signal handler might not always close the program.

kill <pid>
pkill name
===========
I looked at the Angstrom depository
http://www.angstrom-distribution.org/repo/?section=multimedia


================
shutdown         can also try   shutdown now   or     shutdown -h now
root@BBB:~# shutdown
Shutdown scheduled for Sat 2000-01-01 14:55:17 UTC, use 'shutdown -c' to cancel.
root@BBB:~#
Broadcast message from root@BBB (Sat 2000-01-01 14:54:17 UTC):

The system is going down for power-off at Sat 2000-01-01 14:55:17 UTC!


shutdown actually powers the BBB off !

=======================
time and date
If you run the “date” command and see a date not far from Jan 1 2000 then you will need to set the date.

Update your Package List

opkg update

Get the ntp Package

opkg install ntp ntpdate

Remove the file that describes your local time

rm /etc/localtime

Add a symlink between the file that describes your timezone in the timezones folder to the localtime file.

If you do not live in the sydney nsw timezone you may need to look around in the /usr/share/zoneinfo folder for your timezone.

ln -s /usr/share/zoneinfo/Australia/Sydney /etc/localtime

Now we need to stop the ntpd service so we can request a manual update

/etc/init.d/ntpd stop

Now request the manual update

ntpdate pool.ntp.org

Confirm the correct time with the “date” command

Restart the ntp daemon with

/etc/init.d/ntpd start

 ToDo

Add insructions to start the service automatically on boot.
===============================
VIM editing
http://vimdoc.sourceforge.net/

below I am editing the hostname file     i   allows me to insert   x   allows me to delete  ZZ    allows me to exit
root@BBB:~# vim /etc/hostname

Changing the host name

This is purely optional, unless you have multiple Beaglebones, but it’s an easy way to personalize things:

Edit /etc/hostname and change beaglebone to your new host name.

Then, edit /etc/hosts and make the same change there. Leave the rest of the file as is: it should look something like this when are done, with yourhostname being replaced with – yeah, you got it:

cat /etc/hosts
127.0.0.1 localhost.localdomain localhost
127.0.0.1 yourhostname
Your command line prompt won’t display your shiny new device name until you reboot:

shutdown –r now     [ -r switch means restart rather than shutdown ]
you can use passwd command to change the password
===========================

I tried rolling back the hostname to BeagleBone and the password to root
   no joy  .... the BBB hangs on this screen



=======================================
2013m06d10
avconv           video and audio processing
http://manpages.ubuntu.com/manpages/precise/man1/avconv.1.html#contenttoc5

avconv -f  -i /dev/video0 -s uxga -vframes 1 /tmp/avconvout.png
avconv -i /dev/video0 -s uxga -vframes 1 /tmp/avconvout.png

-f   force format    oss
-i   input specified
-s   set frame size
-vframes   # of frames to capture

==================
test for video device

       this script does  work
if [ -c /dev/video0 ]; then
    printf '%s\n' "webcam connected"
fi

this script does not work yet
if [ -c /dev/video1 ]; then
    printf '%s\n' "webcam connected"  else
printf '%s\n' "webcam NOT connected"

fi
====================
  GPIO access     warning:  1.8volt I/O

Linux provides simple and convenient GPIO access via sysfs interface. A GPIO should be requested using /sys/class/gpio/export. After the GPIO is exported it is possible to change its direction and value using /sys/class/gpio/gpioX/direction and /sys/class/gpio/gpioX/value attributes.


  Example

The following example demonstrates how to configure GPIO 140 as output and produce a 1usec pulse:


echo 140 > /sys/class/gpio/export
echo 1 > /sys/class/gpio/gpio140/direction
echo 0 > /sys/class/gpio/gpio140/value
echo 1 > /sys/class/gpio/gpio140/value
usleep 1
echo 0 > /sys/class/gpio/gpio140/value
==================================================
SPI
==================================
i2c
I am being told that I have to recompile the Angstrom kernel to use i2c
http://elinux.org/Interfacing_with_I2C_Devices
[ Gus thinks there must be an easier way ]

root@BBBWFT001:~# i2cdetect -r 1
WARNING! This program can confuse your I2C bus, cause data loss and worse!
I will probe file /dev/i2c-1 using read byte commands.
I will probe address range 0x03-0x77.
Continue? [Y/n] y
     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: -- -- -- -- -- -- -- --                        
root@BBBWFT001:~# opkg install i2c-tools
Package i2c-tools (3.0.3-r0.4) installed in root is up to date.

===================
2013m06d11
Installing Squeak ( instead of Pharo... i am taking the path of least resistance )
http://blog.unthinkable.org/2012/04/smalltalk-on-beaglebone-if-youve-ever.html
http://blog.unthinkable.org/
dg at unthinkable uses fritzing    http://en.wikipedia.org/wiki/Fritzing

root@BBBWFT001:~# opkg update
Downloading http://feeds.angstrom-distribution.org/feeds/v2012.12/ipk/eglibc/armv7a-vfp-neon/base/Packages.gz.
Inflating http://feeds.angstrom-distribution.org/feeds/v2012.12/ipk/eglibc/armv7a-vfp-neon/base/Packages.gz.
Updated list of available packages in /var/lib/opkg/lists/base.
Downloading http://feeds.angstrom-distribution.org/feeds/v2012.12/ipk/eglibc/armv7a-vfp-neon/machine/beaglebone/Packages.gz.
Inflating http://feeds.angstrom-distribution.org/feeds/v2012.12/ipk/eglibc/armv7a-vfp-neon/machine/beaglebone/Packages.gz.
Updated list of available packages in /var/lib/opkg/lists/beaglebone.
Downloading http://feeds.angstrom-distribution.org/feeds/v2012.12/ipk/eglibc/armv7a-vfp-neon/debug/Packages.gz.
Inflating http://feeds.angstrom-distribution.org/feeds/v2012.12/ipk/eglibc/armv7a-vfp-neon/debug/Packages.gz.
Updated list of available packages in /var/lib/opkg/lists/debug.
Downloading http://feeds.angstrom-distribution.org/feeds/v2012.12/ipk/eglibc/armv7a-vfp-neon/gstreamer/Packages.gz.
Inflating http://feeds.angstrom-distribution.org/feeds/v2012.12/ipk/eglibc/armv7a-vfp-neon/gstreamer/Packages.gz.
Updated list of available packages in /var/lib/opkg/lists/gstreamer.
Downloading http://feeds.angstrom-distribution.org/feeds/v2012.12/ipk/eglibc/all/Packages.gz.
Inflating http://feeds.angstrom-distribution.org/feeds/v2012.12/ipk/eglibc/all/Packages.gz.
Updated list of available packages in /var/lib/opkg/lists/no-arch.
Downloading http://feeds.angstrom-distribution.org/feeds/v2012.12/ipk/eglibc/armv7a-vfp-neon/perl/Packages.gz.
Inflating http://feeds.angstrom-distribution.org/feeds/v2012.12/ipk/eglibc/armv7a-vfp-neon/perl/Packages.gz.
Updated list of available packages in /var/lib/opkg/lists/perl.
Downloading http://feeds.angstrom-distribution.org/feeds/v2012.12/ipk/eglibc/armv7a-vfp-neon/python/Packages.gz.
Inflating http://feeds.angstrom-distribution.org/feeds/v2012.12/ipk/eglibc/armv7a-vfp-neon/python/Packages.gz.
Updated list of available packages in /var/lib/opkg/lists/python.
root@BBBWFT001:~# opkg install xauth
Package xauth (1:1.0.7-r8.0.6) installed in root is up to date.
root@BBBWFT001:~# mkdir /opt
root@BBBWFT001:~# cd /opt
root@BBBWFT001:/opt# wget http://unthinkable.org/dl/squeak4.2-beaglebone.tgz
Connecting to unthinkable.org (174.136.101.202:80)
squeak4.2-beaglebone 100% |*******************************| 14834k  0:00:00 ETA
root@BBBWFT001:/opt# tar xvzf squeak4.2-beaglebone.tgz
squeak/
squeak/lib/
squeak/lib/squeak/
squeak/lib/squeak/4.4.7-2357/
squeak/lib/squeak/4.4.7-2357/so.UUIDPlugin
tar: squeak/lib/squeak/4.4.7-2357/so.UUIDPlugin: time stamp 2012-04-20 03:47:54 is 388207525.175012465 s in the future
squeak/lib/squeak/4.4.7-2357/so.UnixOSProcessPlugin
tar: squeak/lib/squeak/4.4.7-2357/so.UnixOSProcessPlugin: time stamp 2012-04-20 03:47:54 is 388207525.161314423 s in the future
squeak/lib/squeak/4.4.7-2357/so.vm-display-X11
tar: squeak/lib/squeak/4.4.7-2357/so.vm-display-X11: time stamp 2012-04-20 03:47:54 is 388207525.13890234 s in the future
squeak/lib/squeak/4.4.7-2357/so.Mpeg3Plugin
tar: squeak/lib/squeak/4.4.7-2357/so.Mpeg3Plugin: time stamp 2012-04-20 03:47:54 is 388207525.081857007 s in the future
squeak/lib/squeak/4.4.7-2357/so.KedamaPlugin2
tar: squeak/lib/squeak/4.4.7-2357/so.KedamaPlugin2: time stamp 2012-04-20 03:47:54 is 388207525.05942834 s in the future
squeak/lib/squeak/4.4.7-2357/so.vm-display-fbdev
tar: squeak/lib/squeak/4.4.7-2357/so.vm-display-fbdev: time stamp 2012-04-20 03:47:54 is 388207525.046919548 s in the future
squeak/lib/squeak/4.4.7-2357/so.DBusPlugin
tar: squeak/lib/squeak/4.4.7-2357/so.DBusPlugin: time stamp 2012-04-20 03:47:54 is 388207525.035019173 s in the future
squeak/lib/squeak/4.4.7-2357/so.GStreamerPlugin
tar: squeak/lib/squeak/4.4.7-2357/so.GStreamerPlugin: time stamp 2012-04-20 03:47:54 is 388207525.013373173 s in the future
squeak/lib/squeak/4.4.7-2357/so.AioPlugin
tar: squeak/lib/squeak/4.4.7-2357/so.AioPlugin: time stamp 2012-04-20 03:47:54 is 388207525.004286173 s in the future
squeak/lib/squeak/4.4.7-2357/so.ClipboardExtendedPlugin
tar: squeak/lib/squeak/4.4.7-2357/so.ClipboardExtendedPlugin: time stamp 2012-04-20 03:47:54 is 388207524.997983465 s in the future
squeak/lib/squeak/4.4.7-2357/squeakvm
tar: squeak/lib/squeak/4.4.7-2357/squeakvm: time stamp 2012-04-20 03:47:54 is 388207524.804712257 s in the future
squeak/lib/squeak/4.4.7-2357/so.vm-display-custom
tar: squeak/lib/squeak/4.4.7-2357/so.vm-display-custom: time stamp 2012-04-20 03:47:54 is 388207524.792995965 s in the future
squeak/lib/squeak/4.4.7-2357/so.vm-sound-null
tar: squeak/lib/squeak/4.4.7-2357/so.vm-sound-null: time stamp 2012-04-20 03:47:54 is 388207524.786950173 s in the future
squeak/lib/squeak/4.4.7-2357/so.SqueakFFIPrims
tar: squeak/lib/squeak/4.4.7-2357/so.SqueakFFIPrims: time stamp 2012-04-20 03:47:54 is 388207524.77565059 s in the future
squeak/lib/squeak/4.4.7-2357/so.KedamaPlugin
tar: squeak/lib/squeak/4.4.7-2357/so.KedamaPlugin: time stamp 2012-04-20 03:47:54 is 388207524.769191423 s in the future
squeak/lib/squeak/4.4.7-2357/so.RomePlugin
tar: squeak/lib/squeak/4.4.7-2357/so.RomePlugin: time stamp 2012-04-20 03:47:54 is 388207524.762688882 s in the future
squeak/lib/squeak/4.4.7-2357/so.vm-display-null
tar: squeak/lib/squeak/4.4.7-2357/so.vm-display-null: time stamp 2012-04-20 03:47:54 is 388207524.75999534 s in the future
squeak/lib/squeak/4.4.7-2357/so.HostWindowPlugin
tar: squeak/lib/squeak/4.4.7-2357/so.HostWindowPlugin: time stamp 2012-04-20 03:47:54 is 388207524.756092048 s in the future
squeak/lib/squeak/4.4.7-2357/so.Squeak3D
tar: squeak/lib/squeak/4.4.7-2357/so.Squeak3D: time stamp 2012-04-20 03:47:54 is 388207524.747648173 s in the future
squeak/lib/squeak/4.4.7-2357/so.XDisplayControlPlugin
tar: squeak/lib/squeak/4.4.7-2357/so.XDisplayControlPlugin: time stamp 2012-04-20 03:47:54 is 388207524.745102548 s in the future
squeak/lib/squeak/4.4.7-2357/so.vm-sound-custom
tar: squeak/lib/squeak/4.4.7-2357/so.vm-sound-custom: time stamp 2012-04-20 03:47:54 is 388207524.741074548 s in the future
squeak/lib/squeak/4.4.7-2357/so.FileCopyPlugin
tar: squeak/lib/squeak/4.4.7-2357/so.FileCopyPlugin: time stamp 2012-04-20 03:47:54 is 388207524.738563173 s in the future
squeak/share/
tar: squeak/lib/squeak/4.4.7-2357: time stamp 2012-04-20 03:47:54 is 388207524.736569173 s in the future
tar: squeak/lib/squeak: time stamp 2012-04-20 03:47:54 is 388207524.73457209 s in the future
tar: squeak/lib: time stamp 2012-04-20 03:47:54 is 388207524.73358534 s in the future
squeak/share/man/
squeak/share/man/man1/
squeak/share/man/man1/squeak.1
tar: squeak/share/man/man1/squeak.1: time stamp 2012-04-20 03:47:54 is 388207524.72790759 s in the future
squeak/bin/
tar: squeak/share/man/man1: time stamp 2012-04-20 03:47:54 is 388207524.724625632 s in the future
tar: squeak/share/man: time stamp 2012-04-20 03:47:54 is 388207524.723514965 s in the future
tar: squeak/share: time stamp 2012-04-20 03:47:54 is 388207524.722459882 s in the future
squeak/bin/squeak.sh
tar: squeak/bin/squeak.sh: time stamp 2012-04-20 03:47:54 is 388207524.720259257 s in the future
squeak/bin/squeak
tar: squeak/bin/squeak: time stamp 2012-04-20 03:47:54 is 388207524.718275757 s in the future
squeak/images/
tar: squeak/bin: time stamp 2012-04-20 03:47:54 is 388207524.716648715 s in the future
squeak/images/Squeak4.2-10966.changes
tar: squeak/images/Squeak4.2-10966.changes: time stamp 2012-04-20 03:47:56 is 388207526.605656465 s in the future
squeak/images/SqueakV41.sources
tar: squeak/images/SqueakV41.sources: time stamp 2012-04-20 03:48:03 is 388207532.386543048 s in the future
squeak/images/Squeak4.2-10966.image
tar: squeak/images/Squeak4.2-10966.image: time stamp 2012-04-20 03:48:13 is 388207541.47823934 s in the future
tar: squeak/images: time stamp 2012-04-20 03:49:33 is 388207621.475504381 s in the future
tar: squeak: time stamp 2012-04-20 03:47:54 is 388207522.474276798 s in the future



/opt/squeak/bin/squeak /opt/squeak/images/Squeak4.2-10996.image

===================
SCAD 3D CAD    BBB hole dimensions   SCAD is a great 3D parametric FLOSS application
http://www.thingiverse.com/thing:99331
My calipers agree with thingiverse
hole size 3.17 mm diameter
hole spacing   USB end 42 mm   Ethernet end 48 mm   ethernet to USB 66mm  
measured with calipers

===================
I have seen some great vision sensors at   ovt.com     ( up to 16 Mpx )    plus a device for pico projection





99guspuppet     keywords    777BBB  777BeagleBoneBlack

No comments: