0

RE: sudo pip install --upgrade Adafruit_BBIO
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Re: RE: sudo pip install --upgrade Adafruit_BBIO

by silver2row on Mon Feb 19, 2018 7:06 pm

Hello Again Sir,

I am in the midst of performing ideas on the Motor Bridge Cape repo under silver2row on GitHub.com. My patch is silver2row-patches. Um, the reason why I am typing up this forum post has to do w/ you actually. Well, it has to do w/ your BBB or your variation of the BBB that you are running to get to the point where you see the terminal print out the i2c error.

Seth

P.S. Oh, I almost forgot to mention. What uname -a and what u-boot overlays you are using really matters. Are you allowed to tell me? If so, please do so. I sure could use some extra support. All my boards run the Motor Bridge Cape and my software, started from Seeed-Studio, but not my BBG for some reason. I have uname -a and my u-boot, uEnv.txt file listed below. Please see if it corresponds to your setup.

Code: Select all | TOGGLE FULL SIZE
Linux beaglebone 4.9.81-ti-r99 #1 SMP PREEMPT Thu Feb 15 20:50:32 UTC 2018 armv7l GNU/Linux


Code: Select all | TOGGLE FULL SIZE
###Master Enable
enable_uboot_overlays=1
###
###Overide capes with eeprom
uboot_overlay_addr0=/lib/firmware/BB-I2C1-00A0.dtbo
uboot_overlay_addr1=/lib/firmware/BB-I2C2-00A0.dtbo
#uboot_overlay_addr2=/lib/firmware/BB-UART4-00A0.dtbo
#uboot_overlay_addr3=/lib/firmware/BB-UART5-00A0.dtbo

silver2row
 
Posts: 180
Joined: Sat Jan 30, 2016 3:42 pm

Re: RE: sudo pip install --upgrade Adafruit_BBIO

by drewfustini on Tue Feb 20, 2018 1:55 am

I recommend you open an issue on the Seeed Studio MotorBridgeCapeforBBG_BBB repo as I am unable to reproduce the error you are experiencing

For reference, this is my environment:
Code: Select all | TOGGLE FULL SIZE
debian@beaglebone:~$ cat /boot/uEnv.txt |grep -v ^#

uname_r=4.9.81-ti-r99


enable_uboot_overlays=1
uboot_overlay_addr0=/lib/firmware/BB-I2C1-00A0.dtbo
uboot_overlay_addr1=/lib/firmware/BB-I2C2-00A0.dtbo
disable_uboot_overlay_emmc=1
disable_uboot_overlay_video=1
disable_uboot_overlay_audio=1
disable_uboot_overlay_wireless=1
disable_uboot_overlay_adc=1

cmdline=coherent_pool=1M net.ifnames=0 quiet


Code: Select all | TOGGLE FULL SIZE
debian@beaglebone:~$ sudo /opt/scripts/tools/version.sh
git:/opt/scripts/:[89f2e9309c2322c15e2bb6b55afd214313d94842]
eeprom:[A335BNLT000C3014BBBK1316]
model:[TI_AM335x_BeagleBone_Black]
dogtag:[BeagleBoard.org Debian Image 2017-10-17]
bootloader:[microSD-(push-button)]:[/dev/mmcblk0]:[U-Boot 2018.03-rc2-00002-ged1e50]:[location: dd MBR]
kernel:[4.9.81-ti-r99]
nodejs:[v6.13.0]
uboot_overlay_options:[enable_uboot_overlays=1]
uboot_overlay_options:[uboot_overlay_addr0=/lib/firmware/BB-I2C1-00A0.dtbo]
uboot_overlay_options:[uboot_overlay_addr1=/lib/firmware/BB-I2C2-00A0.dtbo]
uboot_overlay_options:[disable_uboot_overlay_emmc=1]
uboot_overlay_options:[disable_uboot_overlay_video=1]
uboot_overlay_options:[disable_uboot_overlay_audio=1]
uboot_overlay_options:[disable_uboot_overlay_wireless=1]
uboot_overlay_options:[disable_uboot_overlay_adc=1]
pkg:[bb-cape-overlays]:[4.4.20180126.0-0rcnee0~stretch+20180126]
pkg:[bb-wl18xx-firmware]:[1.20170829-0rcnee2~stretch+20180104]
pkg:[firmware-ti-connectivity]:[20170823-1rcnee0~stretch+20170830]
groups:[debian : debian adm kmem dialout cdrom floppy audio dip video plugdev users systemd-journal i2c bluetooth netdev cloud9ide gpio pwm admin spi tisdk weston-launch xenomai]
cmdline:[console=ttyO0,115200n8 bone_capemgr.uboot_capemgr_enabled=1 root=/dev/mmcblk0p1 ro rootfstype=ext4 rootwait coherent_pool=1M net.ifnames=0 quiet]
dmesg | grep pinctrl-single
[    1.352387] pinctrl-single 44e10800.pinmux: 142 pins at pa f9e10800 size 568
[    1.656391] pinctrl-single 44e10800.pinmux: pin PIN94 already requested by ocp:P9_20_pinmux; cannot claim for 4819c000.i2c
[    1.667585] pinctrl-single 44e10800.pinmux: pin-94 (4819c000.i2c) status -22
[    1.674700] pinctrl-single 44e10800.pinmux: could not request pin 94 (PIN94) from group pinmux_bb_i2c2_pins  on device pinctrl-single
dmesg | grep gpio-of-helper
[    1.353463] gpio-of-helper ocp:cape-universal: ready
END


The MBC.py program that you created prints Error accessing 0x4B: Check your I2C address because I do not actually have the Seeed Motor Bridge cape. Here is the relevant portion of strace output.
Code: Select all | TOGGLE FULL SIZE
open("/dev/i2c-1", O_RDWR|O_LARGEFILE)  = 5
access("/sys/class/gpio/gpio49", R_OK|W_OK|X_OK) = -1 ENOENT (No such file or directory)
open("/sys/class/gpio/export", O_WRONLY) = 6
write(6, "49", 2)                       = 2
close(6)                                = 0
nanosleep({tv_sec=0, tv_nsec=200000000}, NULL) = 0
pipe2([6, 7], O_CLOEXEC)                = 0
clone(child_stack=NULL, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0xb6f16608) = 1044
close(7)                                = 0
fcntl64(6, F_SETFD, 0)                  = 0
fstat64(6, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
read(6, "0\n", 4096)                    = 2
close(6)                                = 0
wait4(1044, [{WIFEXITED(s) && WEXITSTATUS(s) == 1}], 0, NULL) = 1044
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=1044, si_uid=0, si_status=1, si_utime=0, si_stime=0} ---
open("/sys/class/gpio/gpio49/direction", O_WRONLY) = 6
write(6, "out", 3)                      = 3
close(6)                                = 0
open("/sys/class/gpio/gpio49/value", O_WRONLY) = 6
write(6, "0", 1)                        = 1
close(6)                                = 0
close(3)                                = 0
open("/sys/class/gpio/gpio49/value", O_WRONLY) = 3
write(3, "1", 1)                        = 1
close(3)                                = 0
_newselect(0, NULL, NULL, NULL, {tv_sec=1, tv_usec=0}) = 0 (Timeout)
ioctl(5, _IOC(0, 0x07, 0x03, 0x00), 0x4b) = 0
ioctl(5, _IOC(0, 0x07, 0x20, 0x00), 0xbe8fa0bc) = -1 EREMOTEIO (Remote I/O error)
fstat64(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
write(1, "Error accessing 0x4B: Check your"..., 45) = 45
_newselect(0, NULL, NULL, NULL, {tv_sec=0, tv_usec=5000}) = 0 (Timeout)
ioctl(5, _IOC(0, 0x07, 0x20, 0x00), 0xbe8fa0bc) = -1 EREMOTEIO (Remote I/O error)
write(1, "Error accessing 0x4B: Check your"..., 45) = 45
_newselect(0, NULL, NULL, NULL, {tv_sec=0, tv_usec=5000}) = 0 (Timeout)
ioctl(5, _IOC(0, 0x07, 0x20, 0x00), 0xbe8fa0bc) = -1 EREMOTEIO (Remote I/O error)

drewfustini
 
Posts: 944
Joined: Sat Dec 26, 2015 1:19 pm

Re: RE: sudo pip install --upgrade Adafruit_BBIO

by silver2row on Tue Feb 20, 2018 2:20 am

Hello Sir,

Once last notion: I just found out something. I have to press the S2 button on the machine, BBG, when I deploy a SD Card on boot. This should ensure the bootloader does not get used by an older version on the eMMC.

Seth

P.S. I keep forgetting this issue. Sorry to harass you. I will check things out and get back to you. I am flashing the image right now and I will make sure I press S2, i.e. so the bootloader gets updated to the SD Card and not reverting back to the eMMC for the bootloader.

silver2row
 
Posts: 180
Joined: Sat Jan 30, 2016 3:42 pm

Re: RE: sudo pip install --upgrade Adafruit_BBIO

by drewfustini on Tue Feb 20, 2018 3:07 am

You can update the bootloader with this script:
sudo /opt/scripts/tools/developers/update_bootloader.sh

This will show what version of bootloader is installed on eMMC and SD card:
sudo /opt/scripts/tools/version.sh |grep bootloader

drewfustini
 
Posts: 944
Joined: Sat Dec 26, 2015 1:19 pm

Re: RE: sudo pip install --upgrade Adafruit_BBIO

by silver2row on Tue Feb 20, 2018 4:48 pm

Hello...the bootloader is listed at 1.2018. I think it is updated to the point that it can be no longer be updated any further.

Oh...I played around w/ the u-boot overlays a bit. I came up empty. I will keep trying new alternatives on my BBG machine. If you have any other info. to give, please let me know.

Seth

P.S. I updated the image and pressed the S2 button on the BBG before powering on the machine. The bootloader on eMMC and the SD Card are both at 1.2018.

silver2row
 
Posts: 180
Joined: Sat Jan 30, 2016 3:42 pm

Re: RE: sudo pip install --upgrade Adafruit_BBIO

by silver2row on Tue Feb 20, 2018 9:20 pm

Hello and Sorry,

The Travis.CLI program called my info. garbage and failed it. I used that same "garbage" and still use that info. (software and hardware w/ the setup) currently w/ other models of a BBB and BBGW.

Seth

P.S. I will keep trying to learn more. Until then, thank you in advance.

silver2row
 
Posts: 180
Joined: Sat Jan 30, 2016 3:42 pm

Re: RE: sudo pip install --upgrade Adafruit_BBIO

by silver2row on Tue Feb 20, 2018 9:24 pm

Hello...I have two motors named "1" and "3" on my software to the library MotorBridge.py. I will revert the number of the motor back to "1" and "4" so that I have the old software back and installed.

Seth

P.S. I will keep you updated.

silver2row
 
Posts: 180
Joined: Sat Jan 30, 2016 3:42 pm

Re: RE: sudo pip install --upgrade Adafruit_BBIO

by silver2row on Tue Feb 20, 2018 10:16 pm

Hello...I just had to plug in the Motor Bridge Cape. I was testin' software w/out the hardware. Too silly.

Seth

silver2row
 
Posts: 180
Joined: Sat Jan 30, 2016 3:42 pm

Re: RE: sudo pip install --upgrade Adafruit_BBIO

by silver2row on Wed Feb 21, 2018 12:48 am

Code: Select all | TOGGLE FULL SIZE
[U-Boot 2017.09-00002-g0f3f1c7907]
works for me on my BBB for the Motor Bridge Cape w/ the 4.9.x kernel. W/ the 1.2018 bootloader, my BBG does not accept my commands from userspace when I am commanding the BBG and MotorBridge Cape.

Seth

silver2row
 
Posts: 180
Joined: Sat Jan 30, 2016 3:42 pm

Re: RE: sudo pip install --upgrade Adafruit_BBIO

by drewfustini on Wed Feb 21, 2018 5:13 am

So you are saying that it works for you?

drewfustini
 
Posts: 944
Joined: Sat Dec 26, 2015 1:19 pm

Re: RE: sudo pip install --upgrade Adafruit_BBIO

by silver2row on Wed Feb 21, 2018 12:45 pm

Yes sir...it works! So, I just needed to backtrack to an older bootloader model.

Seth

silver2row
 
Posts: 180
Joined: Sat Jan 30, 2016 3:42 pm

Re: RE: sudo pip install --upgrade Adafruit_BBIO

by silver2row on Wed Feb 21, 2018 5:45 pm

Hello...I think the bbb.io/latest-images page online has some out-of-date images. I checked elsewhere and found a newer image. I am going to try this new image.

Seth

P.S. Sorry to bug you for so long.

silver2row
 
Posts: 180
Joined: Sat Jan 30, 2016 3:42 pm

Re: RE: sudo pip install --upgrade Adafruit_BBIO

by drewfustini on Thu Feb 22, 2018 1:09 am

The official BeagleBoard.org Debian images page has that most recent images that have been fully tested.

Robert Nelson does produce weekly Debian snapshot images but these are not always tested.

drewfustini
 
Posts: 944
Joined: Sat Dec 26, 2015 1:19 pm

Please be positive and constructive with your questions and comments.