Kiwi BBAI software installation instructions [updated 4-Mar-24]



  • edited July 2022

    With D9 kiwid works without problems, I wrote about D10 & BBAI.

    On my previous message I posted logs from same BBAI board with same D10 OS but different KiwiSDR version.

  • @rz3dvp Okay, I see what's wrong and will have a fix for you soon to test.

  • jksjks
    edited July 2022

    @rz3dvp Please try a change I just made by doing this (from a Linux root shell):








    I think that should do it.


  • jksjks
    edited July 2022

    It's a slightly long story. But basically the BBAI-64 changes cleaned up a bunch of code that determines which Beagle and Debian version are being used.

    In your logs see how with v1.539 (which works) it says BBAI DEBIAN-9 USE_SPIDEV and /etc/debian_version 10.11 ? Well, the DEBIAN-9 part is obviously wrong and got fixed in v1.545 to correctly report BBAI Debian 10.11 USE_SPIDEV

    But this triggered a bug. When someone tried D10 on a BBG/B a while ago (maybe it was you or Jim, I can't remember) it was found that the BBG/B D10 kernel started using spidev0 instead of spidev1 for some unknown reason (maybe a device tree change?). So code got added that used spidev1 only for Debian <= 9.

    This code ended up getting used for BBAI as well. But it seems the BBAI kernel always wants to use spidev1. So the code added for BBG/B should not be used for BBAI. v1.539 worked because it was incorrectly detecting D9 which forced spidev1 to be used..

  • @jks Thank you John, now v.1.547 start without any problems:

    05:47:55 kiwid[26105]: BBAI Debian 10.11 USE_SPIDEV
    05:47:55 kiwid[26105]: Starting kiwid
    05:47:55 kiwid[26105]: BBAI uses custom Kiwi device tree loaded via U-boot
    05:47:56 kiwid[26105]: Start kiwid: OK
    05:47:56 kiwid[26105]: Fri 29 Jul 2022 05:47:56 AM MSK
    05:47:56 kiwid: 00:00:00.795  KiwiSDR v1.547 --------------------------------------------------------------------
    05:47:56 kiwid: 00:00:00.795  compiled: 2022 05:35:07 on kiwisdr-ai
    05:47:56 kiwid: 00:00:00.795  /etc/debian_version 10.11
    05:47:56 kiwid: 00:00:00.795  background mode: delaying start 30 secs...
    05:48:26 kiwid: 00:00:30.880  reading configuration from file /root/kiwi.config/kiwi.json: 1783 tokens (21.3k bytes)
    05:48:26 kiwid: 00:00:30.883  reading configuration from file /root/kiwi.config/admin.json: 127 tokens (3.0k bytes)
    05:48:27 kiwid: 00:00:31.270  reading configuration from file /root/kiwi.config/dx.json
    05:48:27 kiwid: 00:00:31.281  DX: 887 label entries
    05:48:27 kiwid: 00:00:31.282 ..............        firmware: SDR_RX14_WF0
    05:48:27 kiwid: 00:00:31.283 ..............        firmware: rx_chans=14 wf_chans=0
    05:48:27 kiwid: 00:00:31.283 ..............        firmware: RX bufs=16 samps=48 loop=84 rem=0 intr_usec=4000
    05:48:27 kiwid: 00:00:31.284 ..............        firmware: WF xfer=9 samps=911 rpt=50 loop=18 rem=11
    05:48:27 kiwid: 00:00:31.284 ..............        webserver: listening on port 8073/8073 for HTTP connections
    05:48:27 kiwid: 00:00:31.291 ..............        webserver: OK, port [::]:8073
    05:48:27 kiwid: 00:00:31.531 ..............        ### using SPI_DEV /dev/spidev1.0
    05:48:28 kiwid: 00:00:32.277 ..............        FPGA version 1
    05:48:28 kiwid: 00:00:32.753 ..............        using DC_offsets: I -0.020000 Q -0.020000
    05:48:29 kiwid: 00:00:33.188 ..............        bl_GET: running..
    05:48:29 kiwid: 00:00:33.279 ..............        PROXY: NO dom_sel_menu=0
    05:48:29 kiwid: 00:00:33.328 ..............        UPDATE: check scheduled (startup)
  • Okay, thanks for testing.

  • Jim, but running Debian 9 or 10?

    If D10, does your log say ### using SPI_DEV /dev/spidev0.0 or /dev/spidev1.0 ?

    9.0, my oversight in replying

  • Okay, just wanted to be sure. I think this issue should be squared away for now.


  • edited June 2023

    Hi, I tried to reinstall Debian 9 on BBAI from image on the KiwiSDR QuickStart, and now it's more complicated than in our instruction.

    1. You will need correct Debian repositories:

    sudo sed -i -e 's/' -e 's|||g' -e '/stretch-updates/d' /etc/apt/sources.list

    2. I don't know why, but if you run apt update && apt upgrade afterwards, you won't be able to build the Kiwi software (make stopped with a fatal error "glib.h not found"), but I tried make && make install without upgrading the packages, and it was completed more successfully. I restored my kiwi.config from backup and kiwid start without any errors.

    3. After successfully running kiwid on AI with Debian 9, I tried to upgrade OS to Debian 10 and kiwid was run on BBAI after upgrade was completed.

    Maybe someone knows an easy way how to build kiwid on an AI board from a Debian 10 image?

  • edited June 2023

    I fixed my problem with Debian 10 BBAI image from BeagleBone site. After complite build Beagle_SDR_GPS on the folder /boot/dtbs/<kernel>/ not created file am5729-beagleboneai.dtb

    I copped it from other BBAI and kiwid started.

  • jksjks
    edited June 2023

    It sounds like has deprecated Debian 9 just like they did Debian 8 a while back. Same symptom: The change of the repositories to causes glib.h to not be found for some reason (used by the HFDL extension).

    How did you upgrade to D10? Did you do it incrementally as you've done in the past or re-flash using an image from

    The missing .dtb file would have been installed if you had done a make install_kiwi_device_tree in the source directory. For AI-64 this step is automatic and I need to change the Makefile to make it automatic for the AI as well.

  • edited June 2023

    Yes, I forgot about that. Thanks, JKS!

    For test I reinstalled the Beagle_SDR_GPS on my BBAI with latest Debian 10 image  AM5729 Debian 10.3 2020-04-06 4GB eMMC IoT Flasher ( and it was look good!

    I had error with kiwi.config/dx.json after first start kiwid, but I use backup copy and it's not important for me, but will be good, if you can fix this for new BBAI installation:

    1) Upgrade BBAI (from

     cd /opt/scripts && git pull && sudo tools/ --lts-4_19

     cd /opt/scripts/tools/developers/ && sudo ./

     sudo reboot now

    2) Debian Upgrade

     sudo apt update && sudo apt upgrade -y && sudo apt autoremove

    3) Crontab and up CPU frequency to 1.2GHz

     sudo systemctl enable cron && sudo crontab -e

    And add this string to end of cron file:

     @reboot sleep 10 && /usr/bin/cpufreq-set -f 1.176GHz > /dev/null

     sudo reboot now

    4) Install Beagle_SDR_GPS

     sudo su


     git clone

     cd Beagle_SDR_GPS

     make clean && make && make install

     make install_kiwi_device_tree

     reboot now

    5) Replaced/root/kiwi.config from backup then restart kiwid service.

    And now my KiwiSDR run on BBAI with Debian 10 official image.

    Also I disabled WiFi&BT and removed some cloud9 packages.

  • edited June 2023


    For upgrade from D9 to D10 I edited /etc/apt/sources.list:and replace each instance of stretch to buster, my file for example:

    deb buster main contrib non-free

    deb buster-updates main contrib non-free

    deb buster/updates main contrib non-free

    deb [arch=armhf] buster main

    Then I started upgrade:

    sudo apt update && sudo apt upgrade && sudo apt full-upgrade && sudo apt autoremove

    But using Debian 10 image looks more faster and cleaner.

  • About the error with dx_config.json etc: This is an example of what can happen when you run things out of the intended order and in unexpected ways.

    The migration of the label related information out of the kiwi.json configuration file into the new dx_config.json file is done very carefully by a combination of C code and Makefile rules. This is because there are a number of corner cases that have to be detected and handled properly.

    I would like to understand the exact sequence of events that lead to dx_config.json being expected, but not found. But this is probably not possible because you don't know the condition of the /root/kiwi.config directory before you did the re-clone and install of v1.610

  • edited June 2023

    @jks I can share the kiwi.config folder with the error if that's helpful. My step-by-step instruction always give broken kiwi.config.

    Maybe problem not only with dx_config.json:

  • Okay, that's great that it's reproducible. I'll try and replicate it here.

  • jksjks
    edited July 2023

    Okay, I think I've fixed this. Typo plus bug in the main Makefile. Any future gclone/install should work now.

  • @jks Today I reinstalled my BBAI with D10 again and now it's 100% successful without any problems! Thanks a lot!

  • Does anyone know what command to use to set the default cpu frequency to 1GHz?

    I set to Cf1 however, a reboot defaults back to 400MHz with this latest kiwi version 1.653

    Thank you in advance.


  • Put a cpufreq-set -f 1GHz at the end of the file /root/.bashrc.local

Sign In or Register to comment.