|
Edited by Sk1ppeR at 2016-4-26 22:45
Hello there.
I have a quite difficult problem with my OPi PC and it's to the point i've become frustrated. I'm basically running Armbian Jessy on my OPi PC. Now first of all the kernel module for the GPIO control wasn't loaded by default so I ran
Once I did that as ROOT I had the following export in my sysfs
Which basically is the list of my GPIO pins. Now, here's the issue. I see absolutely no way of controlling those pins with this kernel driver (gpio-sunxi). I've read these forums top to bottom and I see people sharing various Python/C/C++ libraries but they are all for the A20 CPU, not the AllWinner H3 and are coded against the more sane kernel driver that exports the gpio pins to the sysfs through /sys/class/gpio and allows you to export them the way you want.
Only one of the aforementioned libraries worked and it could only "read the state" of the pins (and I'm not sure it works properly because when I try to export a pin it tries to find them in /sys/class/gpio and i do not have such folder at all)
With a lot of tinkering I figured how to switch the pin data from 1 to 0 and vice versa- echo 1 >> /sys/class/gpio_sw/PD14/data
Copy code
However, here's my question. How do I switch states of the GPIO pins from low to high and from in to out with this bad driver?
Another problem I have (probably due to this) is that I can't read my serial console because all my GPIO pins are set in "OUT" mode by default and I can't read the UART_RX1 pin.
I have a HC-06 serial bluetooth module and I can't read the data I'm sending it from my android phone even though I connect successfully to it.
Also I have a 4-channel power relay but the 5V pins on the OPi PC don't push out nearly enough power to turn on/off the relays so I had to attach external power source too.
If I fail to resolve this matter I'll never buy another Orange anything. The compatibility makes things way too difficult in a time where you can order a 5$ RPi Zero and have things "just work".
Thanks for any help in this matter.
P.S: I try to read the console this way
And I'm sure the baud rate is set to 9600, I personally changed it in /etc/inttab.
And I've also tried connecting to the serial console using "minicom" but it doesn't receive anything on the serial port.
|
|