Tiny Core Linux
Tiny Core Base => Raspberry Pi => Topic started by: foxsam on November 06, 2014, 05:48:42 PM
-
I have 2 i2c devices connected on my picore system. It seems like something is wrong because when I try to access the devices after a bootup I get device busy error message from python script trying to access.
self._bus.write_byte_data(self._addr, register, data)
IOError: [Errno 16] Device or resource busy
If I modeprobe -r i2c_bcm2708
and then modprobe i2c_bcm2708
it works. It seems there is some kind of conflict somewhere but I don't know what.
The devices are an LCD char display and a ds3231 RTC module that also does temp.
I am also having a problem that the RTC does not keep the time over a powerdown which seems like a battery issue but can it be related?
-
It seems like the line in /opt/bootlocal.sh:
echo ds1307 0x68 | sudo tee /sys/class/i2c-adapter/i2c-1/new_device
was causing the problem.
Now there is a new problem (should I start a new thread?) that I cannot access the rtc without that command (whatever it is).tc@piCorePlayer:~$ hwclock
hwclock: can't open '/dev/misc/rtc': No such file or directory
tc@piCorePlayer:~$ echo ds1307 0x68 | sudo tee /sys/class/i2c-adapter/i2c-1/new_device
ds1307 0x68
tc@piCorePlayer:~$ hwclock
Wed Dec 31 18:59:59 1969 0.000000 seconds
-
Try to execute commands as root. It can be an access control issue.