Kiwid can't start on BB-AI after update [spidev issue, problem disappeared with reinstall]

edited December 2019 in BeagleBone AI
Hello, after I update OS on BB-AI kiwid don't start:
/usr/local/bin/kiwid -debian 9 -use_spidev 1 -bg
SHMEM=42.160 MB: ipc=0.007 spi=0.207 rx=2.002 wf=4.268 wspr=33.231 drm=2.378
Sun Dec 29 20:36:16 00:00:00.301 KiwiSDR v1.363 --------------------------------------------------------------------
Sun Dec 29 20:36:16 00:00:00.305 compiled: Dec 29 2019 19:50:20
Sun Dec 29 20:36:16 00:00:00.308 -debian 9
Sun Dec 29 20:36:16 00:00:00.309 /etc/debian_version 9.11
Sun Dec 29 20:36:16 00:00:00.309 background mode: delaying start 30 secs...
Terminated

How I can fix it?

PS
Sun Dec 29 21:34:59 00:00:31.227 .............. ### using SPI_DEV
Sun Dec 29 21:34:59 00:00:31.228 .............. SYS_PANIC: "open spidev" No such file or directory (platform/beaglebone/spi_dev.cpp, line 154) No such file or directory

Comments

  • jksjks
    edited December 2019
    What does ls -la /dev/spidev* say? (note asterisk at end)

    If those devices are not found reboot the Beagle and try again. If they are still not found: Since it was last working, have you done any updating of the Beagle software as discussed in the first post of the "BBAI Alpha test instructions" topic? It is better if you don't update the Beagle software once it is working in case the Beagle guys break something.

    What does the command dog say? It should be something like this:
    root@ai:~# dog
    Debian 9.11
    BeagleBoard.org Debian Image 2019-08-03
    Linux ai 4.14.108-ti-r123 #1 SMP PREEMPT Fri Nov 1 06:59:43 UTC 2019 armv7l GNU/Linux
    
    Your kernel might be earlier than r123 which is okay. As long as it's a 4.14 kernel.

    What does dmesg|gr spi say? Should contain stuff like this:
    [   16.624255] Modules linked in: omap_remoteproc virtio_rpmsg_bus rpmsg_core 8021q garp mrp stp llc iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack usb_f_ecm usb_f_mass_storage iptable_mangle usb_f_rndis u_ether iptable_filter libcomposite cmemk(O) uio_pdrv_genirq uio binfmt_misc spidev pruss_soc_bus pru_rproc pruss pruss_intc ip_tables x_tables
    [  553.109312] [ 5939]     0  5939   149839     7837     102       0        0             0 kiwi.spi
    
  • looks like problem with my board, - no devices :(
  • jksjks
    edited December 2019
    What do you mean? That the "ls" produced no output? That does not necessarily mean you have a hardware problem. What about output from the commands I listed above? And also this one pmux|gr spi Should be:
    P9.22b                   240  A26 0 fast rx  up  spi2_sclk        kiwisdr (cape_pins_kiwi)
    P9.21b                   241  B22 0 fast rx down spi2_d1          kiwisdr (cape_pins_kiwi)
    P9.18a                   242  G17 0 fast    down spi2_d0          kiwisdr (cape_pins_kiwi)
    P9.17a                   243  B24 0 fast     up  spi2_cs0         kiwisdr (cape_pins_kiwi)
    
  • pmux | gr spi
    Can't locate Inline/Files.pm in @INC (you may need to install the Inline::Files module) (@INC contains: /etc/perl /usr/local/lib/arm-linux-gnueabihf/perl/5.24.1 /usr/local/share/perl/5.24.1 /usr/lib/arm-linux-gnueabihf/perl5/5.24 /usr/share/perl5 /usr/lib/arm-linux-gnueabihf/perl/5.24 /usr/share/perl/5.24 /usr/local/lib/site_perl /usr/lib/arm-linux-gnueabihf/perl-base) at /opt/scripts/device/bone/show-pins.pl line 11.
    BEGIN failed--compilation aborted at /opt/scripts/device/bone/show-pins.pl line 11.
  • dog
    Debian 9.11
    BeagleBoard.org Debian Image 2019-08-03
    Linux beaglebone 4.14.108-ti-r124 #1 SMP PREEMPT Sat Nov 9 05:05:41 UTC 2019 armv7l GNU/Linux
  • dmesg | gr spi
    [ 28.913265] Modules linked in: omap_remoteproc virtio_rpmsg_bus rpmsg_core 8021q garp mrp stp llc usb_f_ecm usb_f_mass_storage usb_f_rndis u_ether libcomposite iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack iptable_mangle iptable_filter cmemk(O) uio_pdrv_genirq uio binfmt_misc spidev pruss_soc_bus pru_rproc pruss pruss_intc ip_tables x_tables
    [ 28.914909] [] (__irq_svc) from [] (_raw_spin_unlock+0x18/0x60)
    [ 28.914956] [] (_raw_spin_unlock) from [] (__d_lookup+0x158/0x15c)
  • jksjks
    edited December 2019
    I forgot: for pmux do pki libinline-files-perl first.
  • And after you rebooted the Beagle still no devices from ls /dev/spidev* ?
  • edited December 2019
    Sorry, I reinstalled the OS image from microSD, updated it, build Beagle_SDR_GPS again, and now KiwiSDR is working fine.
    I don't know why I had this trouble with previous installation, it's worked good more then one month, before I tried to update OS and kernel.
    I installed 2nd Ai and just wanted to have the same OS/kernel versions on both boards, but something went wrong...
    Thanks for help!
  • edited February 2020
    Maybe I found out why I had this problem - when updating the software on my AI, I also update the kernel, but after updating the kernel am5729-beagleboneai-kiwisdr-cape.dtb is not in /boot/dtbs/4.14.108-ti-r124 folder ...
    To fix this situation, I copied this dtb to /boot/dtbs/4.14.108-ti-r124 and added the line dtb = am5729-beagleboneai-kiwisdr-cape.dtb to /boot/uEnv.txt and rebooted - KiwiSDR works fine again ...
    @jks sorry, I'm not sure - is this the right way to solve this problem or maybe it can be made easier?
  • jksjks
    edited February 2020
    Neat. I did not know that would work. After a kernel upgrade you can also do:
    root@ai:~# cdp
    root@ai:~/Beagle_SDR_GPS# make install_kiwi_device_tree
    install Kiwi device tree to configure GPIO pins
    4.14 4.14.108-ti-r123
    cp platform/beaglebone_AI/am5729-beagleboneai-kiwisdr-cape.dts /opt/source/dtb-4.14-ti/src/arm
    (cd /opt/source/dtb-4.14-ti; make)
    make[1]: Entering directory '/opt/source/dtb-4.14-ti'
      DTC     src/arm/am5729-beagleboneai-kiwisdr-cape.dtb
    make[1]: Leaving directory '/opt/source/dtb-4.14-ti'
    cp /opt/source/dtb-4.14-ti/src/arm/am5729-beagleboneai-kiwisdr-cape.dtb /boot/dtbs/4.14.108-ti-r123
    cp /opt/source/dtb-4.14-ti/src/arm/am5729-beagleboneai-kiwisdr-cape.dtb /boot/dtbs/4.14.108-ti-r123/am5729-beagleboneai.dtb
    
    Where all references to 4.14.108-ti-r123 above will be 4.14.108-ti-r124 in your case (it gets it from doing a "uname --r"). Restart after doing this.
    rz3dvp
Sign In or Register to comment.