|
BV4205 with a Raspberry PI August 09, 2012 11:16AM |
Registered: 9 months ago Posts: 7 |
pi@raspberrypi ~ $ i2cdetect -y 0
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- 21 22 23 -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
pi@raspberrypi ~ $ i2cget -y 0 0x21 0xA0 c 0x02 pi@raspberrypi ~ $ i2cget -y 0 0x21 0xA1 c 0x61
pi@raspberrypi ~ $ i2cdetect -y 0
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
|
Re: BV4205 with a Raspberry PI August 09, 2012 12:02PM |
Admin Registered: 1 year ago Posts: 118 |
|
Re: BV4205 with a Raspberry PI August 09, 2012 12:53PM |
Registered: 9 months ago Posts: 7 |
Python 2.7.3rc2 (default, May 6 2012, 20:02:25) [GCC 4.6.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from smbus import SMBus >>> b=SMBus(0) >>> b.write_byte_data(0x22, 0x06, 0x01) Traceback (most recent call last): File "<stdin>", line 1, in <module> IOError: [Errno 5] Input/output error >>> b.write_byte_data(0x22, 0x95, 0) Traceback (most recent call last): File "<stdin>", line 1, in <module> IOError: [Errno 5] Input/output errorUsing this approach I am able to communicate with the BV4213, example - this will reset:
>>> b.write_byte_data(0x21, 0x95, 0) >>>
|
Re: BV4205 with a Raspberry PI August 09, 2012 01:29PM |
Admin Registered: 1 year ago Posts: 118 |
|
Re: BV4205 with a Raspberry PI August 09, 2012 02:49PM |
Registered: 9 months ago Posts: 7 |
pi@raspberrypi ~ $ i2cdetect -y -q 0
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- 21 -- 23 -- -- 26 -- -- -- -- -- -- -- -- --
30: -- 31 -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
|
Re: BV4205 with a Raspberry PI August 09, 2012 03:37PM |
Admin Registered: 1 year ago Posts: 118 |
|
Re: BV4205 with a Raspberry PI August 09, 2012 05:49PM |
Registered: 9 months ago Posts: 7 |
Python 2.7.3rc2 (default, May 6 2012, 20:02:25) [GCC 4.6.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from smbus import SMBus >>> b=SMBus(0) >>> b.write_byte_data(0x21, 0x95, 0) >>>
>>> b.write_byte_data(0x31, 0x95, 0) Traceback (most recent call last): File "<stdin>", line 1, in <module> IOError: [Errno 5] Input/output error >>>
|
Re: BV4205 with a Raspberry PI August 17, 2012 02:09PM |
Registered: 9 months ago Posts: 7 |
pi@raspberrypi ~/dev/test $ i2cdetect -y -q 0
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- 21 22 23 -- -- -- -- -- -- -- -- -- -- -- --
30: -- 31 -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
pi@raspberrypi ~/dev/test $ python3 test.py
Checking BV4213...
BV4213 Firmware version: 2 97
Checking BV4205...
Traceback (most recent call last):
File "test.py", line 275, in <module>
main()
File "test.py", line 270, in main
test();
File "test.py", line 262, in test
i2c.reading(0x31, 2))[0]
File "/home/pi/dev/test/quick2wire/i2c.py", line 72, in transaction
ioctl(self.fd, I2C_RDWR, addressof(ioctl_arg))
IOError: [Errno 5] Input/output error
def test():
with i2c.I2CMaster() as bus:
print("Checking BV4213..." )
bv4213_firmware_version = bus.transaction(
i2c.writing_bytes(0x21, 0xA0),
i2c.reading(0x21, 2))[0]
print("BV4213 Firmware version: ", bv4213_firmware_version[0], bv4213_firmware_version[1])
print("Checking BV4205..." )
bv4205_firmware_version = bus.transaction(
i2c.writing_bytes(0x31, 0xA0),
i2c.reading(0x31, 2))[0]
print("BV4205 Firmware version: ", bv4205_firmware_version[0], bv4205_firmware_version[1])
def enableAutoscan():
with i2c.I2CMaster() as bus:
print("Enable autoscan --> 0x06 = 1" )
bus.transaction(
i2c.writing_bytes(0x31, 0x06, 1))
pi@raspberrypi ~/dev/test $ python3 test.py
Enable autoscan --> 0x06 = 1
Traceback (most recent call last):
File "test.py", line 298, in <module>
main()
File "test.py", line 293, in main
enableAutoscan()
File "test.py", line 273, in enableAutoscan
i2c.writing_bytes(0x31, 0x06, 1))
File "/home/pi/dev/test/quick2wire/i2c.py", line 72, in transaction
ioctl(self.fd, I2C_RDWR, addressof(ioctl_arg))
IOError: [Errno 5] Input/output error
|
Re: BV4205 with a Raspberry PI August 17, 2012 06:39PM |
Admin Registered: 1 year ago Posts: 118 |
|
Re: BV4205 with a Raspberry PI August 19, 2012 11:02AM |
Registered: 9 months ago Posts: 1 |
|
Re: BV4205 with a Raspberry PI August 19, 2012 01:04PM |
Admin Registered: 1 year ago Posts: 118 |
|
Re: BV4205 with a Raspberry PI August 28, 2012 08:08PM |
Admin Registered: 1 year ago Posts: 118 |
|
Re: BV4205 with a Raspberry PI September 02, 2012 12:38PM |
Registered: 8 months ago Posts: 3 |
|
Re: BV4205 with a Raspberry PI September 02, 2012 05:40PM |
Registered: 8 months ago Posts: 3 |
|
Re: BV4205 with a Raspberry PI September 02, 2012 07:57PM |
Admin Registered: 1 year ago Posts: 118 |
|
Re: BV4205 with a Raspberry PI September 03, 2012 10:40AM |
Registered: 8 months ago Posts: 3 |
|
Re: BV4205 with a Raspberry PI September 03, 2012 05:05PM |
Admin Registered: 1 year ago Posts: 118 |
|
Re: BV4205 with a Raspberry PI September 03, 2012 07:10PM |
Registered: 9 months ago Posts: 7 |
|
Re: BV4205 with a Raspberry PI September 05, 2012 07:27PM |
Admin Registered: 1 year ago Posts: 118 |
|
Re: BV4205 with a Raspberry PI September 19, 2012 07:20PM |
Admin Registered: 1 year ago Posts: 118 |
|
Re: BV4205 with a Raspberry PI September 23, 2012 04:57PM |
Registered: 9 months ago Posts: 7 |
|
Re: BV4205 with a Raspberry PI November 01, 2012 09:45AM |
Registered: 6 months ago Posts: 1 |
|
Re: BV4205 with a Raspberry PI April 06, 2013 05:43PM |
Registered: 6 weeks ago Posts: 1 |
|
Re: BV4205 with a Raspberry PI April 07, 2013 10:08AM |
Admin Registered: 1 year ago Posts: 118 |