BeagleBone: Difference between revisions

From NURDspace
Line 30: Line 30:
== Playing with it ==
== Playing with it ==


Battery pack has been attached, can be charged via USB or the 5V DC barrel jack (1A or more recommended, but less should work too). Use script mentioned below to check its status. Running on battery power will almost certainly render the USB host port inoperable.
Battery pack has been attached, can be charged via USB or the 5V DC barrel jack (1A or more recommended, but less should work too). Use script mentioned below to check its status. The battery will not last as long as you'd expect it to since there is no boost conversion and the system will shut off when the 3.3V supplies lose regulation. Since the pack is quite big it can still run for many hours though. Running on battery power will render the USB host and device ports inoperable due to invalid V<sub>BUS</sub> level.


URL of web interface, cloud9 IDE, and SSH login and password are currently on a piece of paper on the BBB. Quite a bit of javascript on the web interface is broken, but the cloud9 IDE seems to work... mostly.
The bbb has been flashed [http://pastebin.com/x5QzB18E via USB] with [https://rcn-ee.com/rootfs/bb.org/testing/2016-03-27/iot/ jessie-8.3-iot-2016-03-27]. Latest images can be found [http://elinux.org/Beagleboard:BeagleBoneBlack_Debian#Jessie_Snapshot_iot here]. I personally normally start with a "console" image, which is extremely minimalistic and intended for those who prefer to start with a blank slate and install the stuff they need themselves. For convenience however I've flashed the "iot" image which has no GUI but does include the webserver and cloud9 IDE. Changes I've made:
* rootfs partition starts at offset 4 MB instead of 1 MB to align it with eMMC allocation group boundary.
* debian stretch has been added as low-priority APT repository and systemd has been upgraded. jessie's systemd is too ancient to e.g. make systemd-networkd usable, but upgrading the whole system seemed too risky.
* switched from connman to systemd-networkd since I had some networking issues but know absolutely nothing about connman. I haven't reenabled USB networking since it seemed pointless, but it would be easy to do so if desired.
* set APT setting to disable automatically installing packaged "recommended" by installed packages since this tends to pull in a lot of crap.
* removed a lot of crap that got automatically installed (including parts of X11).


I've installed/written a bunch of utility scripts:
I've made some attempts at getting the web interface functional. It assumed you use it via USB networking rather than Ethernet, and used its hardcoded IP (192.168.7.1) in many places. I've replaced those with the hostname, which at least made the link to the cloud9 IDE work. Bonescript briefly worked but then broke again, dunno why.
 
URL of web interface is just [http://bbb/ http://bbb/], or if the local DNS has stale records again use [http://bbb.local/ http://bbb.local/] (avahi to the rescue!). Cloud9 IDE is on port 9000. SSH login and password are currently on a piece of paper stuck onto the BBB.
 
I've also written a bunch of utility scripts:
* <code>gpio-parse</code> can convert between various ways of identifying GPIOs
* <code>gpio-parse</code> can convert between various ways of identifying GPIOs
* <code>sudo gpio-export</code> exports a GPIO via sysfs (accepts any format that <code>gpio-parse</code>, prints the sysfs paths)
* <code>sudo gpio-export</code> exports a GPIO via sysfs (accepts any format that <code>gpio-parse</code>, prints the sysfs paths)
Line 41: Line 50:
* <code>~/charger-info.pl</code> shows (some) status info of the battery charger state
* <code>~/charger-info.pl</code> shows (some) status info of the battery charger state
* <code>/etc/pmic-config.sh</code> configures the PMIC with more liberal charger settings. Invoked at startup by <code>/etc/systemd/system/pmic-config.service</code>.
* <code>/etc/pmic-config.sh</code> configures the PMIC with more liberal charger settings. Invoked at startup by <code>/etc/systemd/system/pmic-config.service</code>.
Except for "show-pins", all of these were written from scratch on this BBB so you may want to make a backup if you intend to reflash the BBB.

Revision as of 21:02, 5 April 2016

BeagleBone Black
Bbb-zmattified.jpg
Owner User:zmatt
Status Seeking purpose
Hostname bbb
Tool
Tool category

BeagleBone Black

Bbb-zmattified.jpg {{{InventoryOwner}}}Property "Tool Owner" (as page type) with input value "{{{InventoryOwner}}}" contains invalid characters or is incomplete and therefore can cause unexpected results during a query or annotation process. {{{Location}}}Property "Tool Location" (as page type) with input value "{{{Location}}}" contains invalid characters or is incomplete and therefore can cause unexpected results during a query or annotation process.

Description

BeagleBone Black (rev C), donated by my employer Dutch & Dutch. It has one minor defect: one I/O pin (P9.26 / GPIO 0.14) has been damaged, probably by overvoltage, and has become unusable. I've stuffed it with polycaprolactone to clearly mark it and avoid accidental use.

Like most of our BBBs it also has a small patch: the separate regulator for "VDD_3V3B" has been removed and the voltage rail has been tied to the "VDD_3V3A" instead, which means it has a single unified 3.3V rail. This patch was done to avoid the problem where the 3V3B remains enabled too long during poweroff and indefinitely if the BBB is supplied via battery power. With this patch the BBB can be safely powered via its battery terminals (single Li-ion cell, BBB has integrated charger). An obvious side-effect is that less power can be drawn from the BBB's 3.3V supply by external hardware. See here for more info on BBB power supply infrastructure.

Information on pin functions can be found in this spreadsheet. Laminated printouts of the P9 and P8 tabs are somewhere in the space in cha0z97's drawer, along with some other documentation.

Hardware safety notes

The expansion header pins connect to the processor without any real protection, and being careless can destroy an IO or the entire processor.

The digital I/Os are 3.3V and are NOT 5V-tolerant.

The analog inputs are max 1.8V. Due to a hardware erratum they may be briefly shorted together and/or to vdd or ground during power-up, hence it is recommended to avoid connecting them to low-impedance outputs (e.g. opamps) without a series resistor.

Avoid injecting current into IOs when the beaglebone is powered off. In particular, the digital I/Os are NOT 3.3V-tolerant when the 3.3V supply is off.

Some pins on the expansion header are used by the on-board eMMC, and must not be touched. On the expansion header overview printouts they are clearly marked "eMMC". If you really need them for other purposes this is still possible, but it requires booting via other means (e.g. μSD or netboot) and disabling the eMMC. Ask me (zmatt) for details if you ever need them.

The last 16 pins of header P8 are sampled at power-on to determine boot configuration. They have weak (100KΩ) on-board pull up/down resistors. They can be freely used afterwards, but be careful not to meddle with them during power-on unless altering the boot config is intended. They are not resampled at reset, only at power-on.

Playing with it

Battery pack has been attached, can be charged via USB or the 5V DC barrel jack (1A or more recommended, but less should work too). Use script mentioned below to check its status. The battery will not last as long as you'd expect it to since there is no boost conversion and the system will shut off when the 3.3V supplies lose regulation. Since the pack is quite big it can still run for many hours though. Running on battery power will render the USB host and device ports inoperable due to invalid VBUS level.

The bbb has been flashed via USB with jessie-8.3-iot-2016-03-27. Latest images can be found here. I personally normally start with a "console" image, which is extremely minimalistic and intended for those who prefer to start with a blank slate and install the stuff they need themselves. For convenience however I've flashed the "iot" image which has no GUI but does include the webserver and cloud9 IDE. Changes I've made:

  • rootfs partition starts at offset 4 MB instead of 1 MB to align it with eMMC allocation group boundary.
  • debian stretch has been added as low-priority APT repository and systemd has been upgraded. jessie's systemd is too ancient to e.g. make systemd-networkd usable, but upgrading the whole system seemed too risky.
  • switched from connman to systemd-networkd since I had some networking issues but know absolutely nothing about connman. I haven't reenabled USB networking since it seemed pointless, but it would be easy to do so if desired.
  • set APT setting to disable automatically installing packaged "recommended" by installed packages since this tends to pull in a lot of crap.
  • removed a lot of crap that got automatically installed (including parts of X11).

I've made some attempts at getting the web interface functional. It assumed you use it via USB networking rather than Ethernet, and used its hardcoded IP (192.168.7.1) in many places. I've replaced those with the hostname, which at least made the link to the cloud9 IDE work. Bonescript briefly worked but then broke again, dunno why.

URL of web interface is just http://bbb/, or if the local DNS has stale records again use http://bbb.local/ (avahi to the rescue!). Cloud9 IDE is on port 9000. SSH login and password are currently on a piece of paper stuck onto the BBB.

I've also written a bunch of utility scripts:

  • gpio-parse can convert between various ways of identifying GPIOs
  • sudo gpio-export exports a GPIO via sysfs (accepts any format that gpio-parse, prints the sysfs paths)
  • sudo gpio-unexport removes such exports
  • sudo show-pins detailed overview of pin config and usage
  • ~/charger-info.pl shows (some) status info of the battery charger state
  • /etc/pmic-config.sh configures the PMIC with more liberal charger settings. Invoked at startup by /etc/systemd/system/pmic-config.service.

Except for "show-pins", all of these were written from scratch on this BBB so you may want to make a backup if you intend to reflash the BBB.