-
Notifications
You must be signed in to change notification settings - Fork 219
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
GPIO setup to in problems #206
Comments
@Grincas Please try running your Python program as root using sudo. Alternatively, you can run the Debian 9.2 "Stretch" iot (2017-10-29) image and install Linux kernel 4.14.x to enable non-root control of GPIO and PWM (commit) |
I have tried to run as root get the same error , i look for a file in sys directory and i sow that pin have been changed to a input but get that error , so solution to downgrade from 4.4 to 4.1 ? |
root@beaglebone:/# sudo python SPI_new.py Out put is the same |
Please upgrade to the 4.14.x kernel, reboot and try running the Python program again:
If you get the error message again, then please try running strace to see what /sys files it is trying to open:
If strace is not installed, then run:
|
@Grincas Also, I noticed in your example code at the top of this issue that
There needs to be a call to
|
Hi @pdp7 , Not to interject but I too am experiencing some issues and they are likely related to this issue as they are reporting similar errors to @Grincas . When trying to run the prebuilt Adafruit_CharLCD example "char_lcd_rgb_pwm.py" as shown here from the Cloud9 IDE: I get the following:
Same for if I attempt to execute using:
So, following your attempts at a repair I have attempted to update and upgrade everything, including the kernel as I'm currently using 4.4.91 as included in the latest image on the BBB main site. When attempting to execute the update_kernel script I get the following:
Blindly following the direction to execute
just temporarily disconnects the beaglebone, resets it to the standard landing screen and doesn't actually resolve the issue as it persists and repeats the message. My initial attempts at finding a fix for that has yielded very little. Any insight you can offer would be greatly appreciated. |
@rd-tyler please list what this shows:
Regards, |
Hi @RobertCNelson,
|
@rd-tyler that's strange: try:
Regards, |
@RobertCNelson The plot thickens:
|
I was having GPIO trouble as originally described, and I updated the kernel to 4.14 as per the instructions here. Not only did it fail to fix the problem, it made the UART overlays unusable; the system won't boot if they're loaded via /boot/uEnv.txt, and attempting to load them manually produces a similar seg fault. I've updated/upgraded, tried rebuilding the overlays, but it hasn't helped. I know this is getting beyond the scope of the original issue, but it was this issue that led me here, and I'm utterly stuck. (BTW, I also had the thing with upgrading bb-node-red-installer, but removing and reinstalling it worked for me.) |
@StokesMIDE Please create a new issue so we can troubleshoot your problem. In that issue, please post complete the Python source code that you are trying to run. Use the "Insert code" button so that the whitespace is preserved. Please also paste the output of these commands in that issue:
If you are not already, I would recommend trying this image: |
@rd-tyler Please create a new issue so we can troubleshoot your problem with Please paste the output of these commands in that issue:
If you are not already, I would recommend trying this image: |
@Grincas Are you still experiencing this issue? I noticed in your example code at the top of this issue that
There needs to be a call to
If you get the error message again, then please try running strace to see what /sys files it is trying to open:
If strace is not installed, then run:
Also, please paste the output of this command:
Finally, if you are able to, then I would recommend trying this image: |
@Grincas are you still having this problem? |
@Grincas is it OK to close this issue? |
Hi Im having the same problem giving this the system is: |
Hi I'm having the same problem and have tried all the suggestions in this thread without any success. Here is a sample of my test program: GPIO.setup('P8_11', GPIO.IN) When I run the program I get this error message: sudo /opt/scripts/tools/version.sh produces the following: git:/opt/scripts/:[e307a944e0be0610ff5296e0abe4ad31a6e70daa] cat /boot/uEnv.txt produces the following: uname_r=4.9.82-ti-r102 ###U-Boot Overlays### ###Overide capes with eeprom ###Additional custom capes ###Custom Cape ###Disable auto loading of virtual capes (emmc/video/wireless/adc) ###PRUSS OPTIONS ###Cape Universal Enable ###Debug: disable uboot autoload of Cape ###U-Boot fdt tweaks... (60000 = 384KB) cmdline=coherent_pool=1M net.ifnames=0 quiet #In the event of edid real failures, uncomment this next line: ##enable Generic eMMC Flasher: To try and correct the problem I have run: But the problem remains. I am running Debian Version 9.3 IoT Stretch. |
@origtech please open a new issue so it is easier to keep track of the problem you experienced @RobertCNelson is 2018.01 too old of u-boot version for u-boot device tree overlays to work? |
Hello i have a problem with GPIO. I cant set up on input mode. Get this error: ValueError: Set gpio mode failed, missing file or invalid permissions.
`import Adafruit_BBIO.GPIO as GPIO
import sys
import time
def main(argv):
if name == "main":
main(sys.argv)
`
sudo /opt/scripts/tools/version.sh
git:/opt/scripts/:[2ce750d881941c5189db9e189af90517e11c079f]
eeprom:[A335BNLTEIA04816BBBK376B]
dogtag:[BeagleBoard.org Debian Image 2017-08-31]
bootloader:[eMMC-(default)]:[/dev/mmcblk1]:[U-Boot 2017.09-rc2-00002-g7c9353]
kernel:[4.4.84-ti-r120]
nodejs:[v6.11.2]
uboot_overlay_options:[enable_uboot_overlays=1]
uboot_overlay_options:[uboot_overlay_addr0=/lib/firmware/BB-UART1-00A0.dtbo]
uboot_overlay_options:[uboot_overlay_addr1=/lib/firmware/BB-UART2-00A0.dtbo]
uboot_overlay_options:[uboot_overlay_addr2=/lib/firmware/BB-UART4-00A0.dtbo]
uboot_overlay_options:[uboot_overlay_pru=/lib/firmware/AM335X-PRU-RPROC-4-4-TI-00A0.dtbo]
uboot_overlay_options:[enable_uboot_cape_universal=1]
pkg:[bb-cape-overlays]:[4.4.20170728.0-0rcnee1
stretch+20170728]stretch+20170829]pkg:[bb-wl18xx-firmware]:[1.20170829-0rcnee1
pkg:[firmware-ti-connectivity]:[20170823-1rcnee0~stretch+20170830]
The text was updated successfully, but these errors were encountered: