Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Input/Output Errors #1

Closed
ventz opened this issue Jan 7, 2015 · 15 comments
Closed

Input/Output Errors #1

ventz opened this issue Jan 7, 2015 · 15 comments

Comments

@ventz
Copy link

@ventz ventz commented Jan 7, 2015

Installed via apt (version: 0.1.0 of microstacknode) and getting:

python3 /usr/share/doc/python3-microstacknode/examples/accelcat.py

Traceback (most recent call last):
File "/usr/share/doc/python3-microstacknode/examples/accelcat.py", line 8, in
accelerometer.init()
File "/usr/lib/python3/dist-packages/microstacknode/accelerometer/mma8452q.py", line 115, in init
self.standby()
File "/usr/lib/python3/dist-packages/microstacknode/accelerometer/mma8452q.py", line 127, in standby
self.ctrl_reg1.value &= 0xff ^ CTRL_REG1_SET_ACTIVE
File "/usr/lib/python3/dist-packages/microstacknode/accelerometer/mma8452q.py", line 213, in value
v))
File "/usr/lib/python3/dist-packages/microstackcommon/i2c.py", line 85, in transaction
ioctl(self.fd, I2C_RDWR, ioctl_arg)
IOError: [Errno 5] Input/output error

i2c seems to detect:

i2cdetect -y 1

 0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f

00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- UU -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- UU -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --

Not sure what's causing this?

I also tried the latest version from github, that also has problems. Looking for any help on this.

Thanks.

@ventz
Copy link
Author

@ventz ventz commented Jan 7, 2015

For the i2cdetect, I noticed that the "right" combination is:

/etc/modules:

snd-bcm2835
i2c-bcm2708
i2c-dev

/etc/modprobe.d/raspi-blacklist.conf

blacklist snd_soc_tas5713
blacklist snd_soc_wm8804

After a reboot, the system no longer ties up those addresses (UU):

i2cdetect -y 1
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --

But this would indicate that the module is not even picked up?

@tompreston
Copy link

@tompreston tompreston commented Jan 28, 2015

Hi, sorry it's taken me so long to get back to you on this.

Jumper 1 sets the address of the board -- can you confirm which pins are connected on JP1 for me, please?

@ventz
Copy link
Author

@ventz ventz commented Jan 29, 2015

Hi,

JP1 has the jumper on top (both pins - default, i think ot came that way).

This means it should be powered through the Pi and that it should not be powered through the board right?

I think i also tried at one point removing that and powering the board directly just to eliminate that as an issue.

Checking with a multimeter, the pins (board) are definitely getting the 3v.

@thomasmacpherson
Copy link
Contributor

@thomasmacpherson thomasmacpherson commented Jan 30, 2015

Hi ventz,

Sorry, Tom meant Jumper 1 on the Accelerometer board. If possible could you take a picture of your board.

Thanks

@ventz
Copy link
Author

@ventz ventz commented Jan 30, 2015

Hi Thomas, Tom,

I'll take a few pictures and provide links later today (I don't have it with me).

For now, just to confirm -- we are talking about this part: http://www.element14.com/community/dtss-images/uploads/devtool/image/large/14e432dbc220d33f208504aec8cd50f8.png

It was my understanding that the data (x,y,z axis) is provided via the built-in pins back through the board, to the PI -- you don't need to manually connect any pins to JP1/solder wires right?

@ventz
Copy link
Author

@ventz ventz commented Jan 30, 2015

Here are two pictures from two different angles:

http://vpetkov.net/pic1.jpg
and
http://vpetkov.net/pic2.jpg

@ventz
Copy link
Author

@ventz ventz commented Feb 19, 2015

Just wanted to see if you were able to figure out what is causing this? I poked at it a bit more, but it looks to me like the accelerometer module is just not communicating at all. I don't have access to an oscilloscope in order to get more information.

@mcurtis789
Copy link

@mcurtis789 mcurtis789 commented Feb 21, 2015

i am getting the same error. based off the above statement was there just bad batch of devices or is there some extra configurations that are needed?
python3 /usr/share/doc/python3-microstacknode/examples/accelcat.py
Traceback (most recent call last):
File "/usr/share/doc/python3-microstacknode/examples/accelcat.py", line 8, in
accelerometer.init()
File "/usr/lib/python3/dist-packages/microstacknode/accelerometer/mma8452q.py", line 115, in init
self.standby()
File "/usr/lib/python3/dist-packages/microstacknode/accelerometer/mma8452q.py", line 127, in standby
self.ctrl_reg1.value &= 0xff ^ CTRL_REG1_SET_ACTIVE
File "/usr/lib/python3/dist-packages/microstacknode/accelerometer/mma8452q.py", line 213, in value
v))
File "/usr/lib/python3/dist-packages/microstackcommon/i2c.py", line 85, in transaction
ioctl(self.fd, I2C_RDWR, ioctl_arg)
IOError: [Errno 5] Input/output error

sudo i2cdetect -y -q 1
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --

@mcurtis789
Copy link

@mcurtis789 mcurtis789 commented Feb 24, 2015

so i disabled device tree now i get this
i2cdetect -y 1
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- UU -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- UU -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --

@tompreston
Copy link

@tompreston tompreston commented Feb 24, 2015

Hi, sorry for the delay. It appears there has been a manufacturing fault on a couple of units -- you are missing the header pins for JP1 on your accelerometer. Fortunately you can fix this by connecting pins 2 and 3 under label JP1:

microstack-accelerometer-fix 1

Alternatively, PM me and we can arrange to send you a working unit. Our apologies for any inconvenience this may have caused you.

@rob-barnes
Copy link

@rob-barnes rob-barnes commented Mar 2, 2015

"It appears there has been a manufacturing fault on a couple of units"
I guess I'm the poor sob who got the other one!! It took quite a while to find this fix!!
Might I suggest an edit to this: http://www.farnell.com/datasheets/1860445.pdf
such that users are directed to add these lines are added to /etc/modules:
i2c-bcm2708
i2c-dev

@Mattat01
Copy link

@Mattat01 Mattat01 commented May 22, 2015

Tompreston, thanks. Finally I know why mine wasn't working! There are a handful of reports of this problem that could benefit from this information. I've just used a staple to jump JP1-3 to JP1-2. Is there a more permanent and simple solution?

@erwanleguillou
Copy link

@erwanleguillou erwanleguillou commented Dec 18, 2015

I got the same problem, I soldered a wire between pins 2 and 3, and now it works!!! Thanks Tom.

@rogloh
Copy link

@rogloh rogloh commented Mar 13, 2016

Another one here with the same fault - no jumper between pins 2 and 3. Just purchased from element14 in Australia too. Lucky I found this and was able to add the jumper - accelerometer now working.

@tompreston
Copy link

@tompreston tompreston commented May 4, 2016

I'm going to close this since we know what the issue is and how to fix it.

@tompreston tompreston closed this May 4, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
8 participants
You can’t perform that action at this time.