beaglebone with ubuntu and PyBBIO

I installed ubuntu 12.10 on beaglebone white without no problem.

and very happy to see that PyBBIO also have a installation guide on installing on ubuntu.
https://github.com/alexanderhiam/PyBBIO

To prevent problem, I use sudo su to be root. make sure we have correct internet connection. Get these first:
apt-get update && apt-get install curl gcc python-serial python-dev
after several check, it will ask for permission, type yes

it would take a while to install all these.
finally:

now use curl
#cd p curl http://python-distribute.org/distribute_setup.py | python
 Then you'll need to get the code:
# cd ~
# git clone git://github.com/alexanderhiam/PyBBIO.git
Now run the install script:
# cd PyBBIO
# python setup.py install
After few sh: 1:dtc : not found. it's installed

PyBBIO should now be installed correctly. Run the blink example to make sure all is well:
# cd examples
# python blink.py
when trying to run the example, it told me :
python-smbus module not found
so try:
apt-get install python-smbus

After installing python-smbus, tried again blink.py, I got these:


[ 2402.863765] bone-capemgr bone_capemgr.8: failed to load firmware 'PyBBIO-ADC-00A0.dtbo'
Traceback (most recent call last):
File "blink.py", line 27, in <module>
run(setup, loop)
File "/usr/local/lib/python2.7/dist-packages/PyBBIO-0.8-py2.7-linux-armv7l.egg/bbio/bbio.py", line 77, in run
bbio_init()
File "/usr/local/lib/python2.7/dist-packages/PyBBIO-0.8-py2.7-linux-armv7l.egg/bbio/bbio.py", line 37, in bbio_init
platform_init()
File "/usr/local/lib/python2.7/dist-packages/PyBBIO-0.8-py2.7-linux-armv7l.egg/bbio/platform/api.py", line 12, in platform_init
analog_init()
File "/usr/local/lib/python2.7/dist-packages/PyBBIO-0.8-py2.7-linux-armv7l.egg/bbio/platform/beaglebone/adc.py", line 16, in analog_init
cape_manager.load(ADC_ENABLE_DTS_OVERLAY, auto_unload=False)
File "/usr/local/lib/python2.7/dist-packages/PyBBIO-0.8-py2.7-linux-armv7l.egg/bbio/platform/beaglebone/cape_manager.py", line 22, in load
f.write(overlay)
IOError: [Errno 2] No such file or directory
root@arm:~/PyBBIO/examples#


After checking with creator, it seems that I don't have dtc on my board. following his instructions:
# cd /tmp/
# wget -c https://raw.github.com/RobertCNelson/tools/master/pkgs/dtc.sh 
# chmod +x dtc.sh 
# ./dtc.sh 
re-install again PyBBIO, the blink.py works!!

in the installation, the PyBBIO dir is installed under root. Not easy to access, so I make a copy to hone/ubuntu using this command:

root@arm:~# cp -R ~/PyBBIO/ /home/ubuntu/


I used to use winSCP to transfer file to beaglebone. But I met permission issue in ubuntu when trying to copy files from local to bone.
The trick is that you can't use root in SCP nor SH, so need to set up a owner ship link between your login and  files. assume login as ubuntu and try to use /home/ubuntu:
Do this:

root@arm:/home# chown -R ubuntu:ubuntu /home/ubuntu

then we are able to move file form local to /home/ubuntu with winSCP



留言

這個網誌中的熱門文章

Heltec ESP32+OLED+Lora, hardware testing

micro SD card for ESP32, on lolin32 with OLED and heltec 32 lora oled

Install Network Time Protocol(NTP) on BeagleBone with Angstrom linux and set local time zone