|
Post by doxidad on Jul 31, 2017 8:44:45 GMT -8
I am having problems reading the RX board.
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
|
|
|
Post by SDL on Jul 31, 2017 13:19:47 GMT -8
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!
BP
|
|
|
Post by doxidad on Aug 1, 2017 12:20:34 GMT -8
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.
Thanks TR
|
|
|
Post by SDL on Aug 1, 2017 15:13:58 GMT -8
Well that is odd. Do you have the ability to refresh the Rx with the latest software on Github? We are running the WX Solar Link right here and everything is working fine. Feeding into GroveWeatherPli and also OurWeather. github.com/switchdoclabs/SDL_Arduino_WXLink_RxI will run the Test program to make sure that isn't hosed. BP
|
|
|
Post by SDL on Aug 1, 2017 15:18:27 GMT -8
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);
I got these results:
pi@RPi3-60:~/I2CRead $ sudo python readArduino.py ----------- block 1 0xab 0x66 0x19 0xe2 0x6 0x4b 0xff 0xe1 0x0 0x48 0xe1 0xe2 0x41 0xc5 0x2 0x0 0x0 0x8e 0x2 0x0 0x0 0x0 0x0 0x0 0x0 0xcd 0xcc 0x2e 0x42 0x66 0x66 0xe6 block 2 0x40 0xb9 0x1e 0x85 0x40 0x33 0x33 0x3b 0x42 0x66 0x66 0xf6 0x41 0xc5 0x20 0xd0 0x40 0x99 0x99 0x99 0x40 0x0 0x0 0x0 0x0 0xc4 0xd0 0x2 0x0 0x48 0x20 0x0 ----------- ----------- block 1 0xab 0x66 0x19 0xe2 0x6 0x4b 0xff 0xe1 0x0 0x48 0xe1 0xe2 0x41 0xc5 0x2 0x0 0x0 0x8e 0x2 0x0 0x0 0x0 0x0 0x0 0x0 0xcd 0xcc 0x2e 0x42 0x66 0x66 0xe6 block 2 0x40 0xb9 0x1e 0x85 0x40 0x33 0x33 0x3b 0x42 0x66 0x66 0xf6 0x41 0xc5 0x20 0xd0 0x40 0x99 0x99 0x99 0x40 0x0 0x0 0x0 0x0 0xc4 0xd0 0x2 0x0 0x48 0x20 0x0 ----------- ----------- block 1 0xab 0x66 0x19 0xe2 0x6 0x4b 0xff 0xe1 0x0 0x48 0xe1 0xe2 0x41 0xc5 0x2 0x0 0x0 0x8e 0x2 0x0 0x0 0x0 0x0 0x0 0x0 0xcd 0xcc 0x2e 0x42 0x66 0x66 0xe6 block 2 0x40 0xb9 0x1e 0x85 0x40 0x33 0x33 0x3b 0x42 0x66 0x66 0xf6 0x41 0xc5 0x20 0xd0 0x40 0x99 0x99 0x99 0x40 0x0 0x0 0x0 0x0 0xc4 0xd0 0x2 0x0 0x48 0x20 0x0 ----------- -----------
BP
|
|
|
Post by doxidad on Aug 1, 2017 15:26:12 GMT -8
Thanks - Same code. I'll reflash it and let you know if it works. Also, want to try and talk to another sensor just to make sure the Rpi or pigrover is toasted somehow. Probably have news tomorrow.
Thanks
|
|
|
Post by doxidad on Aug 1, 2017 16:13:37 GMT -8
Hi.
I had a little time and things like this drive me nuts so I tried a few things.
Reflashed the RX code - same thing - can see it but not read it.
I tried the RX board on another PI without the pigrover directly connected to the pi SDA/SDCL +/gnd pins. Same thing - can see it but not read it
I tried an AM2315 on the original pi w/pigrover. Works fine. So. Assumption is the RX board is toast.
Oh well.
Thanks for your help. TR
|
|
|
Post by SDL on Aug 2, 2017 8:50:27 GMT -8
TR,
Well, if toast it is, then toast it is. Send the toasted board back to us (include a printout of this thread - helps us keep track) and we will send you a new magic RX board.
RMA#080217-02 SwitchDoc Labs 20089 E Glenbrook Liberty Lake, WA 99016
BP
|
|
|
Post by doxidad on Aug 21, 2017 16:22:01 GMT -8
Ok, I received the RX board back from you - I assume you didn't find anything wrong with it. It still doesn't work properly for me. I spent a lot of time searching for similar problems and finally found something that looks like might be the cause. Please see this link: www.bountysource.com/issues/46353276-smbus-read_i2c_block_data-fails-on-latest-kernelIt 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. Thanks again TR
|
|
|
Post by SDL on Aug 22, 2017 16:39:14 GMT -8
OK! That is excellent information. We actually haven't tested your old board yet and just sent you a new board to get you going.
This might explain some issues that we have had with some other projects too. Time for some detective work!
BP
|
|