beagleboard / librobotcontrol

Robotics Focused library for embedded Linux computers. Mirror of https://git.beagleboard.org/beagleboard/librobotcontrol
https://beagleboard.org/librobotcontrol
MIT License
194 stars 154 forks source link

PRU Permissions denied. Cannot access servos/escs V1.0.5 #210

Open Chazlazer opened 2 years ago

Chazlazer commented 2 years ago

Describe the bug

Hi, I can't access the servo/escs with either version 1.0.4 or 1.0.5. I tried with both regular command and then as a su using sudo. I havn't tried as a pure root user but with previous versions I was able to use it as a su. I wanted to use the latest image because it was the only image that I could get a camera working so having access to the servo/esc command would be nice.

Below is the error.

debian@beaglebone:~$ sudo rc_test_servos -p 1.5 ERROR in rc_pru_stop opening remoteproc driver: No such file or directory PRU probably not enabled in device tree ERROR in rc_servo_init, failed to start PRU1 debian@beaglebone:~$ rc_test_servos -p 1.5 ERROR: in rc_pru_shared_mem_ptr could not open /dev/mem: Permission denied Need to be root to access PRU shared memory ERROR in rc_servo_init, failed to map shared memory pointer

Kernel: 4.19.94-ti-r42 BeagleBoard.org Debian Buster IoT Image 2020-04-06 Debian: 10.3

PASSED: gpio 0 PASSED: gpio 1 PASSED: gpio 2 PASSED: gpio 3 PASSED: pwm0 PASSED: pwm1 PASSED: pwm2 PASSED: eqep0 PASSED: eqep1 PASSED: eqep2 ERROR: pru-rproc driver not loaded PASSED: uart1 PASSED: uart2 PASSED: uart4 PASSED: uart5 PASSED: i2c1 PASSED: i2c2 PASSED: spi PASSED: LED PASSED: ADC iio

Currently running on a: MODEL_BB_BLUE Robot Control library Version: 1.0.5

To Reproduce Steps to reproduce the behavior:

  1. Have V1.0.4 or 1.0.5 installed with latest release 10.3 eMMC flasher image debian
  2. sudo rc_test_servos -p (float)
  3. See error

Expected behavior run servos/esc

Screenshots image

DhruvaG2000 commented 2 years ago

can you paste the output of sudo dmesg after doing all of the above?

Chazlazer commented 2 years ago

debian@beaglebone:~$ sudo rc_test_servos -p 1.0 ERROR in rc_pru_stop opening remoteproc driver: No such file or directory PRU probably not enabled in device tree ERROR in rc_servo_init, failed to start PRU1 debian@beaglebone:~$ sudo dmesg [ 0.000000] Booting Linux on physical CPU 0x0 [ 0.000000] Linux version 4.19.94-ti-r42 (voodoo@x3-am57xx-beagle-x15-2gb) (gcc version 8.3.0 (Debian 8.3.0-6)) #1buster SMP PREEMPT Tue Mar 31 19:38:29 UTC 2020 [ 0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c5387d [ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache [ 0.000000] OF: fdt: Machine model: TI AM335x BeagleBone Blue [ 0.000000] Memory policy: Data cache writeback [ 0.000000] cma: Reserved 48 MiB at 0x9c800000 [ 0.000000] On node 0 totalpages: 130560 [ 0.000000] Normal zone: 1148 pages used for memmap [ 0.000000] Normal zone: 0 pages reserved [ 0.000000] Normal zone: 130560 pages, LIFO batch:31 [ 0.000000] CPU: All CPU(s) started in SVC mode. [ 0.000000] AM335X ES2.1 (sgx neon) [ 0.000000] random: get_random_bytes called from start_kernel+0xac/0x4b4 with crng_init=0 [ 0.000000] percpu: Embedded 17 pages/cpu s38988 r8192 d22452 u69632 [ 0.000000] pcpu-alloc: s38988 r8192 d22452 u69632 alloc=17*4096 [ 0.000000] pcpu-alloc: [0] 0 [ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 129412 [ 0.000000] Kernel command line: console=ttyO0,115200n8 bone_capemgr.uboot_capemgr_enabled=1 root=/dev/mmcblk1p1 ro rootfstype=ext4 rootwait coherent_pool=1M net.ifnames=0 lpj=1990656 rng_core.default_quality=100 quiet [ 0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes) [ 0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes) [ 0.000000] Memory: 433812K/522240K available (13312K kernel code, 1136K rwdata, 4308K rodata, 1024K init, 350K bss, 39276K reserved, 49152K cma-reserved, 0K highmem) [ 0.000000] Virtual kernel memory layout: vector : 0xffff0000 - 0xffff1000 ( 4 kB) fixmap : 0xffc00000 - 0xfff00000 (3072 kB) vmalloc : 0xe0000000 - 0xff800000 ( 504 MB) lowmem : 0xc0000000 - 0xdfe00000 ( 510 MB) pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB) modules : 0xbf000000 - 0xbfe00000 ( 14 MB) .text : 0x(ptrval) - 0x(ptrval) (14304 kB) .init : 0x(ptrval) - 0x(ptrval) (1024 kB) .data : 0x(ptrval) - 0x(ptrval) (1137 kB) .bss : 0x(ptrval) - 0x(ptrval) ( 351 kB) [ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1 [ 0.000000] ftrace: allocating 42043 entries in 124 pages [ 0.000000] rcu: Preemptible hierarchical RCU implementation. [ 0.000000] rcu: RCU restricting CPUs from NR_CPUS=2 to nr_cpu_ids=1. [ 0.000000] Tasks RCU enabled. [ 0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1 [ 0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16 [ 0.000000] IRQ: Found an INTC at 0x(ptrval) (revision 5.0) with 128 interrupts [ 0.000000] OMAP clockevent source: timer2 at 24000000 Hz [ 0.000022] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns [ 0.000044] clocksource: timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns [ 0.000054] OMAP clocksource: timer1 at 24000000 Hz [ 0.001614] timer_probe: no matching timers found [ 0.001954] Console: colour dummy device 80x30 [ 0.001985] WARNING: Your 'console=ttyO0' has been replaced by 'ttyS0' [ 0.001990] This ensures that you still see kernel messages. Please [ 0.001994] update your kernel commandline. [ 0.002056] Calibrating delay loop (skipped) preset value.. 995.32 BogoMIPS (lpj=1990656) [ 0.002072] pid_max: default: 32768 minimum: 301 [ 0.002359] Security Framework initialized [ 0.002373] Yama: becoming mindful. [ 0.002523] AppArmor: AppArmor initialized [ 0.002626] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes) [ 0.002638] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes) [ 0.003742] CPU: Testing write buffer coherency: ok [ 0.003809] CPU0: Spectre v2: using BPIALL workaround [ 0.004297] CPU0: thread -1, cpu 0, socket -1, mpidr 0 [ 0.025560] Setting up static identity map for 0x80100000 - 0x80100060 [ 0.033466] rcu: Hierarchical SRCU implementation. [ 0.049479] smp: Bringing up secondary CPUs ... [ 0.049497] smp: Brought up 1 node, 1 CPU [ 0.049508] SMP: Total of 1 processors activated (995.32 BogoMIPS). [ 0.049515] CPU: All CPU(s) started in SVC mode. [ 0.051247] devtmpfs: initialized [ 0.077855] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3 [ 0.078502] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns [ 0.078525] futex hash table entries: 256 (order: 2, 16384 bytes) [ 0.082455] xor: automatically using best checksumming function neon [ 0.082473] pinctrl core: initialized pinctrl subsystem [ 0.083784] NET: Registered protocol family 16 [ 0.089044] DMA: preallocated 1024 KiB pool for atomic coherent allocations [ 0.168372] l4_wkup_cm:clk:0010:0: failed to disable [ 0.208622] audit: initializing netlink subsys (disabled) [ 0.213565] audit: type=2000 audit(0.200:1): state=initialized audit_enabled=0 res=1 [ 0.217536] OMAP GPIO hardware version 0.1 [ 0.220563] GPIO line 106 (LS_BUF_EN) hogged as output/high [ 0.236649] hw-breakpoint: debug architecture 0x4 unsupported. [ 0.265623] raid6: using algorithm neonx8 gen() 0 MB/s [ 0.265636] raid6: .... xor() 0 MB/s, rmw enabled [ 0.265643] raid6: using neon recovery algorithm [ 0.273219] edma 49000000.edma: TI EDMA DMA engine driver [ 0.279326] SCSI subsystem initialized [ 0.281605] libata version 3.00 loaded. [ 0.281913] usbcore: registered new interface driver usbfs [ 0.281968] usbcore: registered new interface driver hub [ 0.282085] usbcore: registered new device driver usb [ 0.283298] pps_core: LinuxPPS API ver. 1 registered [ 0.283308] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti giometti@linux.it [ 0.283330] PTP clock support registered [ 0.284243] omap-mailbox 480c8000.mailbox: omap mailbox rev 0x400 [ 0.285890] Advanced Linux Sound Architecture Driver Initialized. [ 0.286694] NetLabel: Initializing [ 0.286704] NetLabel: domain hash size = 128 [ 0.286709] NetLabel: protocols = UNLABELED CIPSOv4 CALIPSO [ 0.286808] NetLabel: unlabeled traffic allowed by default [ 0.287861] clocksource: Switched to clocksource timer1 [ 0.450458] VFS: Disk quotas dquot_6.6.0 [ 0.450563] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes) [ 0.451445] AppArmor: AppArmor Filesystem Enabled [ 0.464172] NET: Registered protocol family 2 [ 0.465193] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes) [ 0.465233] TCP established hash table entries: 4096 (order: 2, 16384 bytes) [ 0.465276] TCP bind hash table entries: 4096 (order: 3, 32768 bytes) [ 0.465333] TCP: Hash tables configured (established 4096 bind 4096) [ 0.465469] UDP hash table entries: 256 (order: 1, 8192 bytes) [ 0.465493] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes) [ 0.465835] NET: Registered protocol family 1 [ 0.479041] RPC: Registered named UNIX socket transport module. [ 0.479052] RPC: Registered udp transport module. [ 0.479057] RPC: Registered tcp transport module. [ 0.479061] RPC: Registered tcp NFSv4.1 backchannel transport module. [ 0.479773] Unpacking initramfs... [ 1.015941] random: fast init done [ 1.131703] Freeing initrd memory: 11188K [ 1.132708] hw perfevents: enabled with armv7_cortex_a8 PMU driver, 5 counters available [ 1.135558] Initialise system trusted keyrings [ 1.136084] workingset: timestamp_bits=14 max_order=17 bucket_order=3 [ 1.143114] zbud: loaded [ 1.150592] NFS: Registering the id_resolver key type [ 1.150636] Key type id_resolver registered [ 1.150644] Key type id_legacy registered [ 1.150661] nfs4filelayout_init: NFSv4 File Layout Driver Registering... [ 1.151028] fuse init (API version 7.27) [ 1.161643] Key type asymmetric registered [ 1.161658] Asymmetric key parser 'x509' registered [ 1.161757] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 246) [ 1.166128] io scheduler noop registered [ 1.166139] io scheduler deadline registered [ 1.166449] io scheduler cfq registered (default) [ 1.166459] io scheduler mq-deadline registered [ 1.169613] pinctrl-single 44e10800.pinmux: 142 pins, size 568 [ 1.181901] Serial: 8250/16550 driver, 6 ports, IRQ sharing disabled [ 1.185564] 44e09000.serial: ttyS0 at MMIO 0x44e09000 (irq = 30, base_baud = 3000000) is a 8250 [ 1.195681] console [ttyS0] enabled [ 1.196868] 48022000.serial: ttyS1 at MMIO 0x48022000 (irq = 31, base_baud = 3000000) is a 8250 [ 1.197827] 48024000.serial: ttyS2 at MMIO 0x48024000 (irq = 32, base_baud = 3000000) is a 8250 [ 1.198846] 481a6000.serial: ttyS3 at MMIO 0x481a6000 (irq = 33, base_baud = 3000000) is a 8250 [ 1.199761] 481a8000.serial: ttyS4 at MMIO 0x481a8000 (irq = 34, base_baud = 3000000) is a 8250 [ 1.200961] 481aa000.serial: ttyS5 at MMIO 0x481aa000 (irq = 35, base_baud = 3000000) is a 8250 [ 1.204214] omap_rng 48310000.rng: Random Number Generator ver. 20 [ 1.204995] sdhci: Secure Digital Host Controller Interface driver [ 1.205001] sdhci: Copyright(c) Pierre Ossman [ 1.205532] omap_gpio 44e07000.gpio: Could not set line 6 debounce to 200000 microseconds (-22) [ 1.205543] omap_hsmmc 48060000.mmc: Got CD GPIO [ 1.206092] omap_hsmmc 48060000.mmc: Linked as a consumer to regulator.1 [ 1.206773] random: crng init done [ 1.233151] omap_hsmmc 481d8000.mmc: Linked as a consumer to regulator.1 [ 1.257672] omap_hsmmc 47810000.mmc: Linked as a consumer to regulator.2 [ 1.307440] mmc1: new high speed MMC card at address 0001 [ 1.312911] mmcblk1: mmc1:0001 S10004 3.56 GiB [ 1.313553] mmcblk1boot0: mmc1:0001 S10004 partition 1 4.00 MiB [ 1.314170] mmcblk1boot1: mmc1:0001 S10004 partition 2 4.00 MiB [ 1.314532] mmcblk1rpmb: mmc1:0001 S10004 partition 3 4.00 MiB, chardev (245:0) [ 1.320338] mmcblk1: p1 [ 1.360406] sdhci-pltfm: SDHCI platform and OF driver helper [ 1.368922] eqep 48300180.eqep: ver. 1.0 [ 1.369174] eqep 48300180.eqep: count_mode:0 [ 1.369184] eqep 48300180.eqep: invert_qa:1 [ 1.369193] eqep 48300180.eqep: invert_qb:1 [ 1.369202] eqep 48300180.eqep: invert_qi:0 [ 1.369210] eqep 48300180.eqep: invert_qs:0 [ 1.369218] eqep 48300180.eqep: swap_inputs:0 [ 1.369227] eqep 48300180.eqep: QDECCTL:0x0180 [ 1.369236] eqep 48300180.eqep: QPOSINIT:0x00000000 [ 1.369243] eqep 48300180.eqep: QPOSMAX:0xffffffff [ 1.369250] eqep 48300180.eqep: QPOSCNT:0x00000000 [ 1.369258] eqep 48300180.eqep: omit_interrupt:0 [ 1.369266] eqep 48300180.eqep: QEINT:0x0800 [ 1.369273] eqep 48300180.eqep: QUPRD:0x05f5e100 [ 1.369280] eqep 48300180.eqep: QEPCTL:0x009e write [ 1.369287] eqep 48300180.eqep: QEPCTL:0x009e read [ 1.369314] eqep 48300180.eqep: irq:60, clk_rate:100000000 [ 1.369899] eqep 48302180.eqep: ver. 1.0 [ 1.370050] eqep 48302180.eqep: count_mode:0 [ 1.370059] eqep 48302180.eqep: invert_qa:1 [ 1.370068] eqep 48302180.eqep: invert_qb:1 [ 1.370076] eqep 48302180.eqep: invert_qi:0 [ 1.370083] eqep 48302180.eqep: invert_qs:0 [ 1.370091] eqep 48302180.eqep: swap_inputs:0 [ 1.370099] eqep 48302180.eqep: QDECCTL:0x0180 [ 1.370106] eqep 48302180.eqep: QPOSINIT:0x00000000 [ 1.370163] omap_hsmmc 47810000.mmc: card claims to support voltages below defined range [ 1.370192] eqep 48302180.eqep: QPOSMAX:0xffffffff [ 1.370200] eqep 48302180.eqep: QPOSCNT:0x00000000 [ 1.370208] eqep 48302180.eqep: omit_interrupt:0 [ 1.370215] eqep 48302180.eqep: QEINT:0x0800 [ 1.370221] eqep 48302180.eqep: QUPRD:0x05f5e100 [ 1.370228] eqep 48302180.eqep: QEPCTL:0x009e write [ 1.370235] eqep 48302180.eqep: QEPCTL:0x009e read [ 1.370256] eqep 48302180.eqep: irq:62, clk_rate:100000000 [ 1.370621] eqep 48304180.eqep: ver. 1.0 [ 1.370749] eqep 48304180.eqep: count_mode:0 [ 1.370758] eqep 48304180.eqep: invert_qa:1 [ 1.370766] eqep 48304180.eqep: invert_qb:1 [ 1.370774] eqep 48304180.eqep: invert_qi:0 [ 1.370782] eqep 48304180.eqep: invert_qs:0 [ 1.370789] eqep 48304180.eqep: swap_inputs:0 [ 1.370797] eqep 48304180.eqep: QDECCTL:0x0180 [ 1.370805] eqep 48304180.eqep: QPOSINIT:0x00000000 [ 1.370812] eqep 48304180.eqep: QPOSMAX:0xffffffff [ 1.370818] eqep 48304180.eqep: QPOSCNT:0x00000000 [ 1.370826] eqep 48304180.eqep: omit_interrupt:0 [ 1.370833] eqep 48304180.eqep: QEINT:0x0800 [ 1.370897] eqep 48304180.eqep: QUPRD:0x05f5e100 [ 1.370904] eqep 48304180.eqep: QEPCTL:0x009e write [ 1.370912] eqep 48304180.eqep: QEPCTL:0x009e read [ 1.370931] eqep 48304180.eqep: irq:64, clk_rate:100000000 [ 1.374260] pinctrl-single 44e10800.pinmux: pin PIN102 already requested by 48300180.eqep; cannot claim for ocp:P9_30_pinmux [ 1.385670] pinctrl-single 44e10800.pinmux: pin-102 (ocp:P9_30_pinmux) status -22 [ 1.393259] pinctrl-single 44e10800.pinmux: could not request pin 102 (PIN102) from group pinmux_P9_30_spi_pin on device pinctrl-single [ 1.405633] bone-pinmux-helper ocp:P9_30_pinmux: Error applying setting, reverse things back [ 1.414229] bone-pinmux-helper: probe of ocp:P9_30_pinmux failed with error -22 [ 1.422293] mmc2: new high speed SDIO card at address 0001 [ 1.431315] libphy: Fixed MDIO Bus: probed [ 1.432419] CAN device driver interface [ 1.433956] c_can_platform 481d0000.can: c_can_platform device registered (regs=2abcc10c, irq=43) [ 1.435538] usbcore: registered new interface driver smsc95xx [ 1.437098] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver [ 1.437163] ehci-platform: EHCI generic platform driver [ 1.437458] ehci-omap: OMAP-EHCI Host Controller driver [ 1.438223] usbcore: registered new interface driver usb-storage [ 1.441529] am335x-phy-driver 47401300.usb-phy: 47401300.usb-phy supply vcc not found, using dummy regulator [ 1.441716] am335x-phy-driver 47401300.usb-phy: Linked as a consumer to regulator.0 [ 1.445150] am335x-phy-driver 47401b00.usb-phy: 47401b00.usb-phy supply vcc not found, using dummy regulator [ 1.445312] am335x-phy-driver 47401b00.usb-phy: Linked as a consumer to regulator.0 [ 1.448778] musb-hdrc musb-hdrc.1: MUSB HDRC host driver [ 1.448820] musb-hdrc musb-hdrc.1: new USB bus registered, assigned bus number 1 [ 1.449163] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 4.19 [ 1.449173] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1 [ 1.449180] usb usb1: Product: MUSB HDRC host driver [ 1.449187] usb usb1: Manufacturer: Linux 4.19.94-ti-r42 musb-hcd [ 1.449195] usb usb1: SerialNumber: musb-hdrc.1 [ 1.450032] hub 1-0:1.0: USB hub found [ 1.450095] hub 1-0:1.0: 1 port detected [ 1.462033] omap_rtc 44e3e000.rtc: registered as rtc0 [ 1.463346] i2c /dev entries driver [ 1.466516] omap_wdt: OMAP Watchdog Timer Rev 0x01: initial timeout 60 sec [ 1.467076] softdog: initialized. soft_noboot=0 soft_margin=60 sec soft_panic=0 (nowayout=0) [ 1.471982] ledtrig-cpu: registered to indicate activity on CPUs [ 1.472535] omap-aes 53500000.aes: OMAP AES hw accel rev: 3.2 [ 1.472872] omap-aes 53500000.aes: will run requests pump with realtime priority [ 1.475376] omap-sham 53100000.sham: hw accel on OMAP rev 4.3 [ 1.479061] hidraw: raw HID events driver (C) Jiri Kosina [ 1.486109] gnss: GNSS driver registered with major 242 [ 1.492732] NET: Registered protocol family 10 [ 1.564760] Segment Routing with IPv6 [ 1.564914] mip6: Mobile IPv6 [ 1.565077] NET: Registered protocol family 17 [ 1.565108] can: controller area network core (rev 20170425 abi 9) [ 1.565205] NET: Registered protocol family 29 [ 1.565289] 8021q: 802.1Q VLAN Support v1.8 [ 1.565373] Key type dns_resolver registered [ 1.565380] mpls_gso: MPLS GSO support [ 1.565689] ThumbEE CPU extension supported. [ 1.565703] Registering SWP/SWPB emulation handler [ 1.565714] omap_voltage_late_init: Voltage driver support not added [ 1.573957] registered taskstats version 1 [ 1.573968] Loading compiled-in X.509 certificates [ 1.574100] zswap: loaded using pool lzo/zbud [ 1.577563] Btrfs loaded, crc32c=crc32c-generic [ 1.577680] AppArmor: AppArmor sha1 policy hashing enabled [ 1.633492] tps6521x_pwrbutton tps65217-pwrbutton: DMA mask not set [ 1.634341] input: tps65217_pwr_but as /devices/platform/ocp/44e0b000.i2c/i2c-0/0-0024/tps65217-pwrbutton/input/input0 [ 1.635291] tps65217 0-0024: TPS65217 ID 0xe version 1.2 [ 1.636296] at24 0-0050: 32768 byte 24c256 EEPROM, writable, 1 bytes/write [ 1.636412] omap_i2c 44e0b000.i2c: bus 0 rev0.11 at 400 kHz [ 1.638279] omap_i2c 4802a000.i2c: bus 1 rev0.11 at 400 kHz [ 1.640145] omap_i2c 4819c000.i2c: bus 2 rev0.11 at 400 kHz [ 1.644759] cpu cpu0: Linked as a consumer to regulator.4 [ 1.644868] cpu cpu0: Dropping the link to regulator.4 [ 1.645373] cpu cpu0: Linked as a consumer to regulator.4 [ 1.647475] omap_rtc 44e3e000.rtc: setting system clock to 2000-01-01 00:00:00 UTC (946684800) [ 1.648946] ALSA device list: [ 1.648957] No soundcards found. [ 1.655203] Freeing unused kernel memory: 1024K [ 1.656084] Run /init as init process [ 5.565274] musb-hdrc musb-hdrc.1: VBUS_ERROR in a_wait_bcon (89, <AValid), retry #1, port1 00000104 [ 5.984093] usb 1-1: new full-speed USB device number 2 using musb-hdrc [ 6.134057] usb 1-1: New USB device found, idVendor=2341, idProduct=0043, bcdDevice= 0.01 [ 6.134074] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=220 [ 6.134082] usb 1-1: Manufacturer: Arduino (www.arduino.cc) [ 6.134090] usb 1-1: SerialNumber: 8573531343335170A192 [ 6.715432] EXT4-fs (mmcblk1p1): mounted filesystem with ordered data mode. Opts: (null) [ 7.307315] systemd[1]: System time before build time, advancing clock. [ 7.341027] systemd[1]: systemd 241 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN2 +IDN -PCRE2 default-hierarchy=hybrid) [ 7.341753] systemd[1]: Detected architecture arm. [ 7.365746] systemd[1]: Set hostname to . [ 8.697803] systemd[1]: /lib/systemd/system/rc_battery_monitor.service:5: PIDFile= references path below legacy directory /var/run/, updating /var/run/rc_battery_monitor.pid → /run/rc_battery_monitor.pid; please update the unit file accordingly. [ 8.832733] systemd[1]: Reached target Swap. [ 8.834081] systemd[1]: Started Forward Password Requests to Wall Directory Watch. [ 8.841588] systemd[1]: Created slice system-serial\x2dgetty.slice. [ 8.841783] systemd[1]: Reached target Remote File Systems. [ 8.843247] systemd[1]: Listening on Journal Socket. [ 8.851184] systemd[1]: Mounting /sys/kernel/debug... [ 9.488254] EXT4-fs (mmcblk1p1): re-mounted. Opts: errors=remount-ro [ 10.072102] remoteproc remoteproc0: 4a334000.pru is available [ 10.072284] pru-rproc 4a334000.pru: PRU rproc node pru@4a334000 probed successfully [ 10.077912] remoteproc remoteproc1: 4a338000.pru is available [ 10.078101] pru-rproc 4a338000.pru: PRU rproc node pru@4a338000 probed successfully [ 11.265461] systemd-journald[506]: Received request to flush runtime journal from PID 1 [ 25.131399] using random self ethernet address [ 25.131417] using random host ethernet address [ 25.645991] Mass Storage Function, version: 2009/09/11 [ 25.646018] LUN: removable file: (no medium) [ 26.156882] using random self ethernet address [ 26.156901] using random host ethernet address [ 26.433860] usb0: HOST MAC f4:5e:ab:4b:d7:5d [ 26.435553] usb0: MAC f4:5e:ab:4b:d7:5c [ 26.456352] usb1: HOST MAC f4:5e:ab:4b:d7:5f [ 26.456674] usb1: MAC f4:5e:ab:4b:d7:60 [ 26.757102] IPv6: ADDRCONF(NETDEV_UP): usb0: link is not ready [ 26.791346] configfs-gadget gadget: high-speed config #1: c [ 26.791718] IPv6: ADDRCONF(NETDEV_CHANGE): usb0: link becomes ready [ 27.065802] IPv6: ADDRCONF(NETDEV_UP): usb1: link is not ready [ 31.720072] wlan-en-regulator: disabling [ 49.688943] cdc_acm 1-1:1.0: ttyACM0: USB ACM device [ 49.709841] usbcore: registered new interface driver cdc_acm [ 49.709858] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters [ 55.348661] wkup_m3_ipc 44e11324.wkup_m3_ipc: could not get rproc handle [ 55.434526] remoteproc remoteproc2: wkup_m3 is available [ 55.506123] remoteproc remoteproc2: powering up wkup_m3 [ 55.506154] remoteproc remoteproc2: Booting fw image am335x-pm-firmware.elf, size 217168 [ 55.506416] remoteproc remoteproc2: remote processor wkup_m3 is now up [ 55.506438] wkup_m3_ipc 44e11324.wkup_m3_ipc: CM3 Firmware Version = 0x193 [ 55.643379] PM: bootloader does not support rtc-only! [ 61.285812] Bluetooth: Core ver 2.22 [ 61.285982] NET: Registered protocol family 31 [ 61.285990] Bluetooth: HCI device and connection manager initialized [ 61.286020] Bluetooth: HCI socket layer initialized [ 61.286032] Bluetooth: L2CAP socket layer initialized [ 61.286098] Bluetooth: SCO socket layer initialized [ 61.344228] Bluetooth: HCI UART driver ver 2.3 [ 61.344249] Bluetooth: HCI UART protocol H4 registered [ 61.344522] Bluetooth: HCI UART protocol LL registered [ 61.344531] Bluetooth: HCI UART protocol ATH3K registered [ 61.344664] Bluetooth: HCI UART protocol Three-wire (H5) registered [ 61.984461] cfg80211: Loading compiled-in X.509 certificates for regulatory database [ 62.015597] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7' [ 62.016161] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2 [ 62.016183] cfg80211: failed to load regulatory.db [ 62.157371] Bluetooth: BNEP (Ethernet Emulation) ver 1.3 [ 62.157387] Bluetooth: BNEP filters: protocol multicast [ 62.157417] Bluetooth: BNEP socket layer initialized [ 62.586528] Bluetooth: RFCOMM TTY layer initialized [ 62.586570] Bluetooth: RFCOMM socket layer initialized [ 62.586623] Bluetooth: RFCOMM ver 1.11 [ 63.869103] wlcore: wl18xx HW: 183x or 180x, PG 2.2 (ROM 0x11) [ 63.899676] wlcore: loaded [ 64.469793] wlcore: PHY firmware version: Rev 8.2.0.0.242 [ 64.512510] wlcore: firmware booted (Rev 8.9.0.0.79) [ 64.528387] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready [ 65.571132] wlan0: authenticate with f8:18:97:d9:5d:49 [ 65.581410] wlan0: send auth to f8:18:97:d9:5d:49 (try 1/3) [ 65.620232] wlan0: authenticated [ 65.624707] wlan0: associate with f8:18:97:d9:5d:49 (try 1/3) [ 65.629188] wlan0: RX AssocResp from f8:18:97:d9:5d:49 (capab=0x411 status=0 aid=1) [ 65.645045] wlan0: associated [ 65.807062] cryptd: max_cpu_qlen set to 1000 [ 65.863212] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready [ 65.882980] wlcore: Association completed. [ 66.805074] IPv6: ADDRCONF(NETDEV_UP): SoftAp0: link is not ready [ 68.167102] wlcore: down [ 68.231359] IPv6: ADDRCONF(NETDEV_CHANGE): SoftAp0: link becomes ready [ 1399.393562] usb 1-1: USB disconnect, device number 2 [ 1973.261249] musb-hdrc musb-hdrc.1: VBUS_ERROR in a_wait_bcon (89, <AValid), retry #1, port1 00000104 [ 1973.677615] usb 1-1: new full-speed USB device number 3 using musb-hdrc [ 1973.827489] usb 1-1: New USB device found, idVendor=2341, idProduct=0043, bcdDevice= 0.01 [ 1973.827510] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=220 [ 1973.827519] usb 1-1: Manufacturer: Arduino (www.arduino.cc) [ 1973.827526] usb 1-1: SerialNumber: 8573531343335170A192 [ 1973.832308] cdc_acm 1-1:1.0: ttyACM0: USB ACM device [ 2064.862017] usb 1-1: USB disconnect, device number 3 [ 2188.417650] musb-hdrc musb-hdrc.1: VBUS_ERROR in a_wait_bcon (89, <AValid), retry #1, port1 00000104 [ 2188.836121] usb 1-1: new full-speed USB device number 4 using musb-hdrc [ 2188.986419] usb 1-1: New USB device found, idVendor=2341, idProduct=0043, bcdDevice= 0.01 [ 2188.986440] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=220 [ 2188.986448] usb 1-1: Manufacturer: Arduino (www.arduino.cc) [ 2188.986456] usb 1-1: SerialNumber: 8573531343335170A192 [ 2188.992378] cdc_acm 1-1:1.0: ttyACM0: USB ACM device [ 2466.973383] usb 1-1: USB disconnect, device number 4 [ 2498.923389] musb-hdrc musb-hdrc.1: VBUS_ERROR in a_wait_bcon (89, <AValid), retry #1, port1 00000104 [ 2499.341102] usb 1-1: new full-speed USB device number 5 using musb-hdrc [ 2499.490989] usb 1-1: New USB device found, idVendor=2341, idProduct=0043, bcdDevice= 0.01 [ 2499.491009] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=220 [ 2499.491017] usb 1-1: Manufacturer: Arduino (www.arduino.cc) [ 2499.491026] usb 1-1: SerialNumber: 8573531343335170A192 [ 2499.496977] cdc_acm 1-1:1.0: ttyACM0: USB ACM device [ 5113.727990] usb 1-1: USB disconnect, device number 5 [ 5489.530666] musb-hdrc musb-hdrc.1: VBUS_ERROR in a_wait_bcon (89, <AValid), retry #1, port1 00000104 [ 5489.949161] usb 1-1: new full-speed USB device number 6 using musb-hdrc [ 5490.098854] usb 1-1: New USB device found, idVendor=2341, idProduct=0043, bcdDevice= 0.01 [ 5490.098875] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=220 [ 5490.098883] usb 1-1: Manufacturer: Arduino (www.arduino.cc) [ 5490.098891] usb 1-1: SerialNumber: 8573531343335170A192 [ 5490.108001] cdc_acm 1-1:1.0: ttyACM0: USB ACM device [ 5732.873360] usb 1-1: USB disconnect, device number 6 [ 5751.996394] musb-hdrc musb-hdrc.1: VBUS_ERROR in a_wait_bcon (89, <AValid), retry #1, port1 00000104 [ 5752.413084] usb 1-1: new full-speed USB device number 7 using musb-hdrc [ 5752.562888] usb 1-1: New USB device found, idVendor=2341, idProduct=0043, bcdDevice= 0.01 [ 5752.562907] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=220 [ 5752.562915] usb 1-1: Manufacturer: Arduino (www.arduino.cc) [ 5752.562923] usb 1-1: SerialNumber: 8573531343335170A192 [ 5752.568724] cdc_acm 1-1:1.0: ttyACM0: USB ACM device [ 5783.233092] usb 1-1: USB disconnect, device number 7 [ 5811.413126] musb-hdrc musb-hdrc.1: VBUS_ERROR in a_wait_bcon (89, <AValid), retry #1, port1 00000104 [ 5811.831089] usb 1-1: new full-speed USB device number 8 using musb-hdrc [ 5811.980836] usb 1-1: New USB device found, idVendor=2341, idProduct=0043, bcdDevice= 0.01 [ 5811.980856] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=220 [ 5811.980865] usb 1-1: Manufacturer: Arduino (www.arduino.cc) [ 5811.980873] usb 1-1: SerialNumber: 8573531343335170A192 [ 5811.989241] cdc_acm 1-1:1.0: ttyACM0: USB ACM device [ 5823.944133] usb 1-1: USB disconnect, device number 8 [ 5850.699315] musb-hdrc musb-hdrc.1: VBUS_ERROR in a_wait_bcon (89, <AValid), retry #1, port1 00000104 [ 5851.117436] usb 1-1: new full-speed USB device number 9 using musb-hdrc [ 5851.267302] usb 1-1: New USB device found, idVendor=2341, idProduct=0043, bcdDevice= 0.01 [ 5851.267322] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=220 [ 5851.267331] usb 1-1: Manufacturer: Arduino (www.arduino.cc) [ 5851.267338] usb 1-1: SerialNumber: 8573531343335170A192 [ 5851.274200] cdc_acm 1-1:1.0: ttyACM0: USB ACM device [ 5859.999011] musb_ep_program 884: broken !rx_reinit, ep11 csr 0013 [ 5860.005171] musb_host_rx 1930: Rx interrupt with no errors or packet! [ 5870.834829] usb 1-1: USB disconnect, device number 9 [ 5886.731022] musb-hdrc musb-hdrc.1: VBUS_ERROR in a_wait_bcon (89, <AValid), retry #1, port1 00000104 [ 5887.147161] usb 1-1: new full-speed USB device number 10 using musb-hdrc [ 5887.296909] usb 1-1: New USB device found, idVendor=2341, idProduct=0043, bcdDevice= 0.01 [ 5887.296929] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=220 [ 5887.296937] usb 1-1: Manufacturer: Arduino (www.arduino.cc) [ 5887.296945] usb 1-1: SerialNumber: 8573531343335170A192 [ 5887.303002] cdc_acm 1-1:1.0: ttyACM0: USB ACM device [ 6155.492800] usb 1-1: USB disconnect, device number 10 [ 6421.605236] musb-hdrc musb-hdrc.1: VBUS_ERROR in a_wait_bcon (89, <AValid), retry #1, port1 00000104 [ 6422.020672] usb 1-1: new full-speed USB device number 11 using musb-hdrc [ 6422.170528] usb 1-1: New USB device found, idVendor=2341, idProduct=0043, bcdDevice= 0.01 [ 6422.170548] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=220 [ 6422.170556] usb 1-1: Manufacturer: Arduino (www.arduino.cc) [ 6422.170564] usb 1-1: SerialNumber: 8573531343335170A192 [ 6422.177466] cdc_acm 1-1:1.0: ttyACM0: USB ACM device [49920.876878] musb-hdrc musb-hdrc.1: VBUS_ERROR in a_host (89, <AValid), retry #1, port1 00000107 [49921.097400] usb 1-1: USB disconnect, device number 11 [49921.378552] usb 1-1: new full-speed USB device number 12 using musb-hdrc [49921.528311] usb 1-1: New USB device found, idVendor=2341, idProduct=0043, bcdDevice= 0.01 [49921.528332] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=220 [49921.528340] usb 1-1: Manufacturer: Arduino (www.arduino.cc) [49921.528348] usb 1-1: SerialNumber: 8573531343335170A192 [49921.532234] cdc_acm 1-1:1.0: ttyACM0: USB ACM device

Chazlazer commented 2 years ago

can you paste the output of sudo dmesg after doing all of the above?

Yeah, I can link it here. This is the output of the message.

DhruvaG2000 commented 2 years ago
[ 10.072102] remoteproc remoteproc0: 4a334000.pru is available
[ 10.072284] pru-rproc 4a334000.pru: PRU rproc node pru@4a334000 probed successfully
[ 10.077912] remoteproc remoteproc1: 4a338000.pru is available
[ 10.078101] pru-rproc 4a338000.pru: PRU rproc node pru@4a338000 probed successfully

This means that the remoteproc drivers don't really seem to be the issue here.

The line remoteproc driver: No such file or directory PRU probably not enabled in device tree ERROR in rc_servo_init, failed to start PRU1 means you probably have not loaded the correct device tree. Can you paste the contents of your /boot/uenv.txt please? Did you load the robotcontrol overlay?

Probably @jadonk might be able to confirm, but I believe you need to load the dtb of this: https://github.com/DhruvaG2000/BeagleBoard-DeviceTrees/blob/v4.19.x-ti-overlays/src/arm/am335x-roboticscape.dtsi overlay

DhruvaG2000 commented 2 years ago

Try following the workflow described here: https://github.com/beagleboard/librobotcontrol/blob/master/device_tree/install_dt_manually.sh

Chazlazer commented 2 years ago

Hi, thank you for responding here is the text file.

Docs: http://elinux.org/Beagleboard:U-boot_partitioning_layout_2.0

uname_r=4.19.94-ti-r42

uuid=

dtb=

U-Boot Overlays

Documentation: http://elinux.org/Beagleboard:BeagleBoneBlack_Debian#U-Boot_Overlays

Master Enable

enable_uboot_overlays=1

Overide capes with eeprom

uboot_overlay_addr0=/lib/firmware/.dtbo

uboot_overlay_addr1=/lib/firmware/.dtbo

uboot_overlay_addr2=/lib/firmware/.dtbo

uboot_overlay_addr3=/lib/firmware/.dtbo

Additional custom capes

uboot_overlay_addr4=/lib/firmware/.dtbo

uboot_overlay_addr5=/lib/firmware/.dtbo

uboot_overlay_addr6=/lib/firmware/.dtbo

uboot_overlay_addr7=/lib/firmware/.dtbo

Custom Cape

dtb_overlay=/lib/firmware/.dtbo

Disable auto loading of virtual capes (emmc/video/wireless/adc)

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

PRUSS OPTIONS

pru_rproc (4.14.x-ti kernel)

uboot_overlay_pru=/lib/firmware/AM335X-PRU-RPROC-4-14-TI-00A0.dtbo

pru_rproc (4.19.x-ti kernel)

uboot_overlay_pru=/lib/firmware/AM335X-PRU-RPROC-4-19-TI-00A0.dtbo

pru_uio (4.14.x-ti, 4.19.x-ti & mainline/bone kernel)

uboot_overlay_pru=/lib/firmware/AM335X-PRU-UIO-00A0.dtbo

Cape Universal Enable

enable_uboot_cape_universal=1

Debug: disable uboot autoload of Cape

disable_uboot_overlay_addr0=1

disable_uboot_overlay_addr1=1

disable_uboot_overlay_addr2=1

disable_uboot_overlay_addr3=1

U-Boot fdt tweaks... (60000 = 384KB)

uboot_fdt_buffer=0x60000

U-Boot Overlays

cmdline=coherent_pool=1M net.ifnames=0 lpj=1990656 rng_core.default_quality=100 quiet

In the event of edid real failures, uncomment this next line:

cmdline=coherent_pool=1M net.ifnames=0 lpj=1990656 rng_core.default_quality=100 quiet video=HDMI-A-1:1024x768@60e

enable Generic eMMC Flasher:

cmdline=init=/opt/scripts/tools/eMMC/init-eMMC-flasher-v3.sh

debian@beaglebone:/boot$

Chazlazer commented 2 years ago

Try following the workflow described here: https://github.com/beagleboard/librobotcontrol/blob/master/device_tree/install_dt_manually.sh

To my knowledge I hope I havn't loaded anything that would affect the librobotcontrol library. When I installed the image, I had version 1.0.4 and used sudo apt-get update, the servo library was unavailable here. Then I used sudo apt-get install librobotcontrol which installed version 1.0.5 and the problem still persisted. I hence uninstalled the library and reinstalled it.

DhruvaG2000 commented 2 years ago

thanks for that, we will have to dig a little deeper as "The overlay and device tree source files here don't actually get compiled or installed since they are part of the beagleboard image now" so you should not need to explicitly do that as I mentioned earlier.

Chazlazer commented 2 years ago

Try following the workflow described here: https://github.com/beagleboard/librobotcontrol/blob/master/device_tree/install_dt_manually.sh

also i'm sorry i'm not super experienced in linux device trees and environment paths, what does this script do? Do I need to install the script or is it already installed and I just need to run it?

Chazlazer commented 2 years ago

thanks for that, we will have to dig a little deeper as "The overlay and device tree source files here don't actually get compiled or installed since they are part of the beagleboard image now" so you should not need to explicitly do that as I mentioned earlier.

I'm not sure if this has anything to do with it but I also installed xfce which is a gui for graphics

Chazlazer commented 2 years ago

didn't mean to close it

Chazlazer commented 2 years ago

I think I will try reflashing and see if that fixes it.

Chazlazer commented 2 years ago

Update: I've tried reflashing with version 10.3 but to no success. I am still getting the errors. I will try with a different image.

DhruvaG2000 commented 2 years ago

Probably you should try ssh into the board, and use the AM3358 Debian 10.3 2020-04-06 1GB SD console image from latest-images?

Chazlazer commented 2 years ago

Hi, Thank you for the reply

I have not tried it with Debian 10.3 console yet, but I want to use a program that only works with ubuntu right now so I want to try to get the library to work with it.

Update: I've tried with other images. I used an old version of the library on a pre-configured ubuntu 18.04 image and it was working.

I then tried to do a fresh install of ubuntu 18.04 and installed the robotics cape 1.0.5 again because I didn't want to use the image mentioned above and I am getting similar errors again.

root@beaglebone:~# rc_test_servos -p 1.0 ERROR in rc_pru_stop opening remoteproc driver: No such file or directory PRU probably not enabled in device tree ERROR in rc_servo_init, failed to start PRU1

Is there a way to enable it in the device tree or should I just use an old version of the library? Or any idea on what is causing this issue? Do you think its my board or the library, or maybe I have to do extra steps after "sudo apt-get install librobotcontrol" because I am using a new bare-bones image?