I have the RX board connected to a pi through a pigrover (i2c<->i2c connectors). If I run i2cdetect I can see the board a 08 like expected. If I run the read test program that is supplied in the documentation, the read always fails.
Am I missing something somewhere?
Do you have any suggestions on how to troubleshoot this problem? thx
OK. Let's review your information. If I2Cdetect is picking up a board, you must have the I2C connected right. The program fails. Could you add the failure text in another posting so I can check that out? I'm sitting in an airport but will be in the office tomorrow and i'll check out your reply. Along with 4 days of left over work!
Hi, Thank you for the response. I put a variable to grab the err on the exception. The error is [Errno 121] Remote I/O error.
This board is not receiving anything when I run this test. The TX half is shutoff. The RX does receive data from the TX when it is active, but it acts the same whether receiving data or not. I did display the received data via the serial port when the TX is active so it does receive - I just can't read it.
So any suggestions where to look or what might be a solution is appreciated.
OK. I ran the following and was properly reading the WXLink RX:
# reads from Arduino #
import smbus import time
bus = smbus.SMBus(1)
address = 0x08 while True:
data = "" print "-----------" print "block 1" data = bus.read_i2c_block_data(address, 0); print ' '.join(hex(x) for x in data) print "block 2" data = bus.read_i2c_block_data(address, 1); print ' '.join(hex(x) for x in data) print "-----------" time.sleep(1);
It looks like one of the kernel updates broke the read_i2c_block_data()function and only that function. The way they talk in the above link it looks like there is a problem with the I2C protocol and that function.
Since RaspberryPi.Org just released a new version of Raspbian last week called Stretch, I downloaded it and made a new system.
The RX read_i2c_block_data now works. I appreciate the time spent on replies, looking at the board and returning it.
For reference - old kernel: Linux rpi5 4.9.35+ #1014 Fri Jun 30 14:34:49 BST 2017 armv6l GNU/Linux new kernel: Linux rpi6 4.9.41-v7+ #1023 SMP Tue Aug 8 16:00:15 BST 2017 armv7l
If anyone else turns up with this problem, there is at least one answer on why it may be happening.