-
Notifications
You must be signed in to change notification settings - Fork 328
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
iioxml.py crashes wtih null pointer exception #8
Comments
Ben: All the examples are expected to work. We have also had others report it working. So, steps to reproduce would be great. Thanks |
Alright - will do.
|
So here's my setup. The device is a Raspberry Pi B+, and I'm running Raspbian GNU/Linux 7 (wheezy). I have enabled i2c on the device, and if I print the list of devices, I can see the AD5254 I'm trying to talk to: $ i2cdetect -y 0
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- 2d -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- -- I installed all of the libiio dependencies using apt-get, then installed libiio per the instructions in "what_is_libiio.pdb". No issues (or at least no complaints). But then if I try to run iio_info, I get: $ iio_info
Library version: 0.5 (git tag: 6399de7)
ERROR: Unable to create IIO context And if I run iioxml.py, I get the error mentioned above. If there's some specific C you'd like me to run, or anything else I can do to generate some more helpful information (I realize that what I've included here is pretty paltry), please let me know what specifically would be helpful, and I'll be happy to oblige! |
Ben: Is the AD5254 driver installed on your PI? Plus - I'm not sure the dpot driver has been updated for IIO yet. http://wiki.analog.com/resources/tools-software/linux-drivers/misc/dpot
|
No, no sir it is not. I'd be happy to test it out... but we're getting a little out of my wheelhouse here. Sorry! Just to expose a bit of my ignorance: do I need to rebuild the kernel? Is there a handy dandy guide somewhere to installing the driver, or similar drivers? If you point me in the right direction, I'll be happy to do the work! |
About the Python bindings - I seriously enhanced them a few days ago, so that they provide all the functionalities of the C library. I still have to update the iioxml.py example. |
Still no luck! I have the driver successfully installed (I can see all of the eeproms and rdacs in /sys/bus/i2c/devices/0-002d), but still get the same exception. Well... one weird thing - I can read the eeproms and rdacs, but writing to them doesn't work (permissions error, even if I use sudo). I'm asking for a little help on that over in the linux drivers forum (https://ez.analog.com/message/181971#181971). Would you expect this to cause the exception I'm getting? If not, do you have any quick suggestions on steps to generate a more informative error message? @pcercuei - Thank you very much for the fine work. Can't wait to use them! |
Problem solved: I deleted iioxml.py :) |
Alright, got the driver working, I can read to and write from all of the sysfs attributes. Updated my local repo, cleaned and rebuilt... still:
|
So do you have |
I will close this issue now since it is highly unlikely to be a bug from the libiio library, and it's been one month since the last update. |
I have a new iio device driver that seems to be creating a similar issue: https://github.com/Seeed-Studio/seeed-linux-dtoverlays/tree/master/modules/hm3301 The SYSFS entries work fine, but libiio returns errors trying to create the local: context. |
Oh man, it has been ages. I forget what the resolution was. |
Thanks for this great project! I'm especially excited for the python bindings, and have been trying to get them to work today.
Is iioxml.py expected to work at this point? If not, please disregard. If so... I still could have messed something up, but I think I have everything installed correctly. When I try to run iioxml.py, I get this:
I get the same whenever I try to initialize a LocalContext object. Is it working for you? If so, and you can't reproduce the issue, let me know and I'll do some more thorough reporting.
The text was updated successfully, but these errors were encountered: