Reading weather cape sensor readings in Debian Jessie for BBB rev C and Weather Cape rev B.

Hello BBB Community!

I am new to the BeagleBone Black and embedded Linux, although I am a seasoned C++ programmer and am generally proficient in Unix (POSIX or not) and its shells. However, I know next to nothing about electronics, so hardware is my weak point. Having said that, here is my situation:

o I recently bought a (1) BeagleBone Black revision C, and a (2) Weather Cape revision B.
o I’m powering the BBB through the 5 V power connection.
o I’m using an Ethernet cable to ssh to it.
o I am running Debian Jessie on it (12/27 build).
o I can see the weather cape when I catenate the cape manager slots.
o I am now trying to read the weather cape sensor readings using the sample shell code snippet at

http://elinux.org/CircuitCo:BeagleBone_Weather#Getting_Started

where it says

`

for sensor in /sys/bus/i2c/devices/i2c-1/*/*_input; do echo -n "$(basename $sensor): "; cat $sensor; done

`
However, these “*_input``” files do not exist for me, and a find exec on them doesn’t show anything.

So I’m thinking that there are at least 2 possibilities I am facing:

o In Debian Jessie these “*_input``” device files do not exist anymore. There is no easy way anymore to read the weather sensor values this way in Debian Jessie.
o There is something wrong with my hardware setup.

I’ve Googled on this to the point where I think I now need to raise this question myself. Would anyone who has an answer to the above help this poor soul? Much thanks in advance.

Alex

I just pushed this..

https://github.com/beagleboard/bb.org-overlays/compare/9a2cf3a26a...34e9ddd346

please test via:

git clone https://github.com/beagleboard/bb.org-overlays
cd ./bb.org-overlays
./dtc-overlay.sh
./install.sh

After a reboot, it should load via:

sudo sh -c "echo 'BB-BONE-WTHR-01:00B0' >
/sys/devices/platform/bone_capemgr/slots"

please give us "dmesg | grep bone" afterwards for debugging. :wink:

Regards,

Hello Robert,

Thank you very much indeed! Here is what I got after doing all the steps you specified:

root@beaglebone:/root 3472> dmesg | grep bone

[ 3.843342] bone_capemgr bone_capemgr: Baseboard: ‘A335BNLT,00C0,3615BBBK2041’

[ 3.843377] bone_capemgr bone_capemgr: compatible-baseboard=ti,beaglebone-black - #slots=4

[ 3.882672] bone_capemgr bone_capemgr: slot #0: ‘BeagleBone WEATHER CAPE,00B0,Beagleboardtoys,BB-BONE-WTHR-01’

[ 3.938334] bone_capemgr bone_capemgr: slot #1: No cape found

[ 3.998316] bone_capemgr bone_capemgr: slot #2: No cape found

[ 4.058328] bone_capemgr bone_capemgr: slot #3: No cape found

[ 4.064418] bone_capemgr bone_capemgr: initialized OK.

[ 4.075812] bone_capemgr bone_capemgr: slot #0: dtbo ‘BB-BONE-WTHR-01-00B0.dtbo’ loaded; overlay id #0

[ 13.248957] LUN: removable file: /var/cache/doc-beaglebone-getting-started/beaglebone-getting-started-2015-12-04.img

[ 106.285218] bone_capemgr bone_capemgr: part_number ‘BB-BONE-WTHR-01’, version ‘00B0’

[ 106.285306] bone_capemgr bone_capemgr: slot #4: override

[ 106.285355] bone_capemgr bone_capemgr: Using override eeprom data at slot 4

[ 106.285408] bone_capemgr bone_capemgr: slot #4: ‘Override Board Name,00B0,Override Manuf,BB-BONE-WTHR-01’

[ 106.425088] bone_capemgr bone_capemgr: slot #4: dtbo ‘BB-BONE-WTHR-01-00B0.dtbo’ loaded; overlay id #1

root@beaglebone:/root 3473>

Alex

Hello Robert,

Adding more information below, which I did after the dmesg and grep. I saw only one sensor input, but it’s better than none, and thank you once again. I’m not sure how useful this information is, but I’m adding it here just in case it’s useful to your debugging as to where the other inputs went. (Btw, the 1 lux value looks reasonable as it’s in a relatively dark place right now.) Much thanks again.

root@beaglebone:/sys/bus/i2c/devices 3224> l /sys/bus/i2c/devices///*_input

-r–r–r-- 1 root root 4,096 2016-01-20 20:24:33.943032255 -0500 /sys/bus/i2c/devices/i2c-2/2-0039/lux1_input

root@beaglebone:/sys/bus/i2c/devices 3224>

root@beaglebone:/sys/bus/i2c/devices 3224> cat /sys/bus/i2c/devices/i2c-2/2-0039/lux1_input

1

root@beaglebone:/sys/bus/i2c/devices 3224>

Alex

Yeah, those configs where hidden else where:

https://github.com/RobertCNelson/ti-linux-kernel-dev/commit/5f38223598388ef79813526e1c7e11f7e5380cfc

It'll get pushed out tomorrow as "r43"..

Regards,

Hello Robert,

Would the below steps sufficiently pull those changes and get my kernel rebuilt to r43? I am currently at 4.1.15-ti-r40 having done a kernel update about 2 weeks ago.

cd /opt/scripts/tools/

git pull

./update_kernel.sh

shutdown --reboot now

Much thanks in advance.

Sincerely,
Alexander

cd /opt/scripts/tools/
git pull
sudo ./update_kernel.sh --ti-channel --lts-4_1
sudo reboot

Regards,

Hello Robert,

Without meaning to be patronizing, I really thank you for all your work on this. I’ve got almost all readings available. The only I2C devices missing are those from the HTU21 sensor.

root@beaglebone:/sys/bus/i2c/devices 3961> cd /sys/bus/i2c/devices

root@beaglebone:/sys/bus/i2c/devices 3961> l /sys/bus/i2c/devices///*_input

-r–r–r-- 1 root root 4,096 2016-01-22 20:47:20.955937135 -0500 /sys/bus/i2c/devices/i2c-2/2-0039/lux1_input

-r–r–r-- 1 root root 4,096 2016-01-22 20:47:20.965937135 -0500 /sys/bus/i2c/devices/i2c-2/2-0077/pressure0_input

-r–r–r-- 1 root root 4,096 2016-01-22 20:47:20.965937135 -0500 /sys/bus/i2c/devices/i2c-2/2-0077/temp0_input

root@beaglebone:/sys/bus/i2c/devices 3961> cat /sys/bus/i2c/devices/i2c-2/2-0039/lux1_input

0

root@beaglebone:/sys/bus/i2c/devices 3961> cat /sys/bus/i2c/devices/i2c-2/2-0077/pressure0_input

101154

root@beaglebone:/sys/bus/i2c/devices 3961> cat /sys/bus/i2c/devices/i2c-2/2-0077/temp0_input

303

root@beaglebone:/sys/bus/i2c/devices 3961>

Much thanks in advance.

Sincerely,
Alexander