@UFD thanks, I will try that. So the i2c implementation really seems to be buggy?
Posts made by Arne Schmitz
-
RE: I2C - can't find device address
-
RE: I2C - can't find device address
I am interested in this topic as well. I am trying to get a Si470x to run on the Omega2. On the Pi this was trivially to do.
On the Omega2, I cannot even get the Si470x to show up in i2cdetect. On top of that I also see the false positives.
I am using the Breadboard dock with a massive 3A USB PSU.
-
RE: WiFi Stops Working after Router reboot or power-loss
I have similar problems with my Omegas. They will always forget my WiFi whenever their power is cycled. I have to connect to their builtin WiFi and reconnect them manually to my WiFi using wifisetup.
-
RE: Resource busy when trying to run pyGpio example program
Ok, so here is code derived from the official GPIO example code (which did not work either):
import onionGpio import time import os print '> Instantiating gpio object' gpio5 = onionGpio.OnionGpio(5) gpio11 = onionGpio.OnionGpio(11) print '' print '> Set direction to output... ' ret = gpio5.setOutputDirection() print ' returned %d'%ret ret = gpio11.setOutputDirection() print ' returned %d'%ret print '> Set gpio 5 value to 0... ' ret = gpio5.setValue(0) print ' returned %d'%ret time.sleep(0.1) print '> Set gpio 11 value to 0... ' ret = gpio11.setValue(0) print ' returned %d'%ret time.sleep(0.1) print '> Set gpio 11 value to 1... ' ret = gpio11.setValue(1) print ' returned %d'%ret time.sleep(0.1) print ''
I hooked up GPIO11 to my Si470x's RST pin, and the GPIO5 (SDA) to the Si470x board's respective i2c SDA pin.
I cross checked with my Pi that exactly this wiring works (it does, using a small i2cinit tool and the C based RdsPi Si470 software).
When running the above software to try and put the Si470x in two wire mode, I still get the resource busy error:
root@Omega-FF87:~# echo 11 > /sys/class/gpio/unexport -ash: write error: Invalid argument root@Omega-FF87:~# echo 5 > /sys/class/gpio/unexport -ash: write error: Invalid argument root@Omega-FF87:~# python onion-si470x.py > Instantiating gpio object > Set direction to output... Traceback (most recent call last): File "onion-si470x.py", line 12, in <module> ret = gpio5.setOutputDirection() File "/usr/lib/python2.7/onionGpio.py", line 168, in setOutputDirection ret = self._setDirection(argument) File "/usr/lib/python2.7/onionGpio.py", line 147, in _setDirection self.setValue(0) File "/usr/lib/python2.7/onionGpio.py", line 85, in setValue status = self._initGpio() File "/usr/lib/python2.7/onionGpio.py", line 46, in _initGpio fd.close() IOError: [Errno 16] Resource busy
I have the feeling that the GPIO libraries on the Omega are totally broken. The only thing I got working was using the gpioctl command line program.
The same stuff seems so much easier on the Pi and much more reliable.
-
Resource busy when trying to run pyGpio example program
I am trying to run the GPIO example programs as well as doing my own GPIO code and keep running into the same errors. I always get a Errno 16 Resource busy at some point or other.
I have tried ˋecho 14 > /sys/class/gpio/unexportˋ to reset the gpio pin, but that didn't help either.
Any ideas what might be wrong?
-
RE: From "Cross-Compiling for the Omega" I cannot successfully build the gpioRead example
@Flemming-Richter One thing I want: onion-spi.h for SPI development. That should be included in spi-gpio-driver. However, I cannot find that in the cross build environment.
Somehow, the cross compile documentation is still pretty lacking...
-
RE: From "Cross-Compiling for the Omega" I cannot successfully build the gpioRead example
@Flemming-Richter This is the correct answer. Actually, you need to select the libugpio in the Libraries section of "make menuconfig" so that it will actually build.