On Friday, November 21, 2014 at 3:04 PM, owfs-developers-requ...@lists.sourceforge.net (Jerry Scharf) wrote:
> I was looking at that [DS2482 (i2c bus master)] as well. Does anyone know > what other > hardware/software/configuration would be needed to hang one or more of > these off an I2C interface of a beaglebone black? My BBB runs the RCN version of Ubuntu 14.04 from https://rcn-ee.net/deb/microsd/trusty/bone-ubuntu-14.04-console-2014-06-05-2gb.img.xz but I think this applies to all distros. To use the GPIO or I2C/SPI, you need to disable the HDMI device tree entries to make space. ----- So far [Mar 2014] dynamically removing device tree entries is not working. You must disable them at boot time, via (in uEnv.txt): optargs=capemgr.disable_partno=BB-BONELT-HDMI,BB-BONELT-HDMIN This can be done right in the BBB! --- mount /dev/mmcblk0p1 /mnt/card nano /mnt/card/uEnv.txt capemgr.disable_partno=BB-BONELT-HDMI,BB-BONELT-HDMIN --- The 14.04 uEnv has a '#' comment char you just remove: --- ##Disable HDMI #cape_disable=capemgr.disable_partno=BB-BONELT-HDMI,BB-BONELT-HDMIN ^remove this ----- Restart the BBB and verify HDMI is disabled: --- ubuntu@ubuntu-armhf:~$ cat /sys/devices/bone_capemgr.9/slots 0: 54:PF--- 1: 55:PF--- 2: 56:PF--- 3: 57:PF--- 4: ff:P-O-L Bone-LT-eMMC-2G,00A0,Texas Instrument,BB-BONE-EMMC-2G 5: ff:P-O-- Bone-Black-HDMI,00A0,Texas Instrument,BB-BONELT-HDMI 6: ff:P-O-- Bone-Black-HDMIN,00A0,Texas Instrument,BB-BONELT-HDMIN --- --> no L on HDMI slots I installed the Ubuntu distro version of owfs: sudo apt-get install owfs Then you need a device tree entry for your chosen connection. I already had w1-00A0.dtbo from a previous install. It was made from w1.dts using the BBB DTC compiler as patched by the RCN dtc.sh script for patching the dtc compiler. At the time only the Angstrom version of the dtc compiler had the required -@ switch. I haven't kept up with whether that complexity has been fixed. Since you want I2C you can hopefully find a ready made dtbo file. --> The compiled dtbo file must be in /lib/firmware/ For w1, you connect your 1-Wire bus to: --> "name": "GPIO1_13", --> "gpio": 45, "mux": "gpmc_ad13", "eeprom": 29, --> "key": "P8_11", To make owfs active using w1 run this command: --> The sudo and sh tricks don't work for me - full su is required: root@ubuntu-armhf:/home/ubuntu# echo w1 >/sys/devices/bone_capemgr.9/slots With that I can actually read DS18B20 sensors with no extra hardware. For testing I have two in parallel using parasitic power on about five feet of cable each. BUT: The readings have a constant offset, maybe +2C and +5C, from the values shown by those same sensors on my "real" control system with 5V bus with active pull-up/down, and from my fancy thermocouple thermometer. I've checked the raw data from the chips and it shows the offset. Maybe parasitic power at 3.3V affects the internal accuracy? I see a lot of conversion failures, average two or three per hour, that report a temperature of -62. As reported here in the past, one of the two lines in the output file is always all 'ff', and the other a valid temperature: --- Thu Jul 03 2014 22:20:02 GMT-0700 (PDT) ff ff ff ff ff ff ff ff ff : crc=c9 NO cd 01 4b 46 7f ff 03 10 4a t=-62 --- I have no idea why there are two reports there, why they are different, or why what looks like a valid temperature report is followed by "-62". So I'm watching here for a possibly better connection method to try, either USB or maybe this I2C device. Would be very interested in how well it works. The "real" bus I was hoping to read with the BBB has ten 18B20 sensors spread all over the house on maybe 100' of CAT5 cable. The existing controller sees maybe two errors per month among all ten sensors, despite the distances and having most sensors near hot plumbing, motors, and machinery. Loren | Loren Amelang | lo...@pacific.net | ------------------------------------------------------------------------------ Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration & more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk _______________________________________________ Owfs-developers mailing list Owfs-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/owfs-developers