The KiwiSDR 2 online store is open for orders! Please visit kiwisdr.nz

Kiwi BBAI-64 software installation instructions [Updated 28-Jan-24]

jksjks
edited May 2 in BeagleBone AI-64

[updated 28-Jan-24]

The instructions below are no longer valid due to changes at beagleboard.org.

Please follow the instructions here for installing the software from an SD card using the Kiwi Debian 11 image: https://forum.kiwisdr.com/index.php?p=/discussion/3099/debian-11-image-for-kiwis-using-beaglebone-ai-64-update-okay-to-use-again/p1

See here for correct mounting of the Kiwi board on the BBAI-64: https://forum.kiwisdr.com/index.php?p=/discussion/comment/14651/#Comment_14651

Part 1 of 3

It is very important that you read and understand these instructions before proceeding. If at any time you get an unexpected result STOP and ask for help on the Kiwi forum.


SUBSEQUENT UPDATES:

If you subsequently update the Beagle software on your AI via the instructions on https://docs.beagleboard.org/boards/beaglebone/ai-64/update.html, or via the pkug command, and that update installs a new kernel, then you will have to reinstall the kernel-related Kiwi changes manually as follows. First, make sure you are running the latest Kiwi update. Then type:

cdp

mst

make install_kiwi_device_tree

reboot (not just a server restart, a full Beagle reboot)


SPECIAL CONSIDERATIONS:

1) Export restrictions. Mouser will likely not ship an AI64 outside of the USA due to export controls on the TI TDA4VM CPU chip. However check the distributor okdo.com for deliveries within Europe. Distributors are listed here: beagleboard.org/ai-64

2) The Beagle P9 cape header connector has been changed on the AI64. It has extra power pins you MUST NOT accidentally use. It is now easier than ever to incorrectly install, and thus instantly destroy, the Kiwi board due to incorrect voltages being applied. Carefully check the installation step below (do NOT install the Kiwi board until instructed to below).

3) DO NOT power the Kiwi+AI64 combo through the Kiwi 5V DC barrel connector. Too much current is required and the Kiwi's common-mode choke will likely burn up. Unlike the AI, the AI64 has both a 2.1/5.5 mm DC barrel connector (same as the Kiwi) and a USB-C power input. Use these instead. The AI64 manual recommends 3A minimum and the Kiwi needs about 1.5A peak. So use a 4.5A minimum supply to avoid problems.

4) If you brick your AI64 (e.g. due to an incorrect sequence of software update steps) then recovery is especially difficult. As of this writing users are reporting problems using many brands of micro SD cards which are necessary to hold a bootable recovery image (see: forum.beagleboard.org/t/sdcard-guaranteed-to-work-with-ai-64/32480)

Also, if a failure causes the AI64 to stop in the bootloader (U-boot), before Debian is even loaded, then you can only recover using the BBAI serial port. You must purchase a USB-to-3.3V serial cable (e.g. uk.farnell.com/ftdi/ttl-232r-3v3/cable-usb-to-ttl-level-serial/dp/1329311) and also an adapter cable from the header of the serial cable to the AI64's tiny JST ZH connector (e.g. uk.farnell.com/element14/1103004000156/beaglebone-ai-serials-cable/dp/3291081)

5) On the plus side, the excellent heat sink of the AI64 is a vast improvement over the AI. A modest fan is all that is required. We use a 5V 120 mm fan spinning at a slow 1500 RPM to reduce noise. It can be powered from the AI64 fan connector (Molex 4-pin PicoBlade, see: forum.beagleboard.org/t/ai-64-fan-header-compatible-male-connector/32231/6) or from one of the USB-A connectors.

6) Do not attempt to make SD card backups on the AI64 using the admin page, backup tab. A different procedure is going to have to be developed.

Continue with Part 2 in the next post.


«1

Comments

  • jksjks
    edited January 27

    Part 2 of 3

    FIRST TIME SETUP:

    1) WITHOUT the Kiwi board installed, provide airflow to the heatsink, connect Ethernet, and apply 5V @ >= 4.5A to the AI64 power input.

    2) Find the Ethernet ip address assigned by your DHCP. Login using ssh/PuTTY as "debian" password "temppwd".

    sudo su using the "temppwd" again to get a root shell. With this Debian distro you cannot login as "root" [no password] anymore, i.e. it's more secure.

    3) Update Debian. Follow the instructions at https://docs.beagleboard.org/boards/beaglebone/ai-64/update.html but note these differences:

    • Leave out the use of sudo as you are already root.
    • During apt upgrade a couple of times your connection will be placed into a blue-screen dialog panel. The first will mention how a new kernel will be installed and you should consider immediately rebooting. DELAY REBOOTING until specified in the instructions. If you reboot too soon (e.g. immediately after the apt upgrade command) your AI64 will become bricked! Just hit the return key to the "OK" prompt to exit the panel.
    • A second panel will show a bunch of options. Don't make any changes. Just hit the tab key to get to the "OK" prompt followed by the return key to exit the panel.
    • After the apt upgrade finishes make sure to perform the /opt/u-boot/bb-u-boot-beagleboneai64/install-emmc.sh and /opt/u-boot/bb-u-boot-beagleboneai64/install-microsd.sh commands BEFORE the reboot command as shown in the instructions.
    • After the reboot ignore the remaining steps in the instructions: update xfce (window system), ti-edge-ai, cleanup.

    4) After the reboot login again, sudo su, and from the root shell do:

    cd /opt/source/dtb-5.10-ti (or perhaps "dtb-5.10-ti-arm64" if the other directory isn't found)

    git pull -v

    This should display a bunch of output as files are updated. You may see a warning saying "hint: Pulling without specifying how to reconcile divergent branches is discouraged." Ignore this warning.

    5) Build and install the Kiwi code (at this point the Kiwi board is still NOT YET installed).

    cd [changes current directory to /root]

    git clone https://github.com/jks-prv/Beagle_SDR_GPS.git

    cd Beagle_SDR_GPS

    make clean

    make

    make install

    The make step will take a while (up to 40 minutes) as many packages have to be installed prior to building the Kiwi software.

    Press the return key when prompted to reboot.

    If you are never prompted to reboot or there are any obvious errors in the build process STOP, take some screenshots of the error messages (or cut/paste), and ask for help on the Kiwi forum.

    6) Login again after the reboot, sudo su, and type halt to power down the AI64.

    Continue with Part 3 in the next post.

  • jksjks
    edited July 2022

    Part 3 of 3

    7) With the AI64 powered off install the Kiwi board. Refer to the image below. Note the square "notch" in the Kiwi board to orient it properly. Align the Kiwi pins flush with the end of the P8 connector as shown by the green rectangle. On the other side, the P9 connector, the first 2 rows of pins MUST be skipped (as shown in the red rectangle) if the board is aligned properly. Triple check this before seating the Kiwi board onto the AI64 headers.

    [click image for larger]


    8) Apply power to the AI64. After about 60 to 90 seconds the Kiwi server should be running. Try connecting on port 8073. Configure as usual. The git clone above will have downloaded the most recent Kiwi release.


    CURRENT LIMITATIONS:

    1) The Kiwi software will display correct cpu temperature information. But cpu frequency information is not yet available. The Beagle guys are working on it. "2 GHz" is displayed by default as this should be the maximum supported.


    RESOURCES:

    Product information: beagleboard.org/ai-64

    System reference manual, schematic, block diagram: git.beagleboard.org/beagleboard/beaglebone-ai-64

    Forum: forum.beagleboard.org/tag/bbai64


    [end of instructions]

  • putting a piece of tape over the "evil" pins on J9 is a good measure. Kapton tape a good choice if you have it

  • Great idea!

  • jksjks
    edited August 2022

    If anyone buys one and tries it please let me know if this procedure works for you or not.

    Interestingly, BeagleBoard.org considers the BBAI-64 to be the "Rev B" of the BBAI, despite the fact that it turned out so different from the BBAI. From the BBAI-64 System Reference Manual:

    2.2.1. Rev B

    We are starting with revision B based on this being an update to the BeagleBone

    Black AI. However, because this board ended up being so different, we’ve decided

    to name it BeagleBone AI-64, rather than simply a new revision.

  • How many simultaneous demod channels can the BBAI-64 support? More than the 14 that the BBAI supports, or does the Beagle software still need updating for more channels?

  • Only 14 because it's limited by the amount of logic that can be crammed into the FPGA. The FPGA cannot hold another rx channel (when there are zero waterfall channels) beyond 14.

    It's always a race between FPGA logic space, SPI interface utilization and Beagle cpu cycles (SPI is the data path between the FPGA and Beagle).

  • edited August 2022

    I did not give myself particularly good odds performing this operation, but after carefully following the directions ... SUCCESS!

    Your mileage may vary, but for any other history majors sitting on the fence about this one, I can at least say that it worked for me.

    No issues with the external clock. 5V/5A buck converter off the shack Astron for power.

    I placed the BBAI64 heatsink down on top of an elevated 120mm fan that is drawing air downwards. CPU is at 39c at present. Is this a reasonable config?

    Presently running all 14 channels on WSPRDaemon, 2200m through 10m, including EU bands and 22m. Thanks, JKS.

    Edward

    W3ENR (listening) / K3WRG (beacon)

    Update: After running a few hours with the ambient temperature 20c here now (a bit cooler than usual), the CPU is fluctuating between 33-34c, with the USB fan on 'low'. It doesn't seem as if heat is likely to be a problem.

  • Thanks for the report. Glad it worked for you.

    I've been running some very heavy non-Kiwi stuff on mine. The temps never get above 39 degC. What a difference compared to the BBAI. Others on the AI-64 forum use a fan configuration like yours. So I think it's fine.

  • The System Reference manual says "A 5V ≥ 3A supply is mandatory" has anyone measured the actual peak and average current or power under Kiwi-like operating conditions? I don't see it described in the documentation.

  • What I observe with a cheap clamp-type meter is:

    1.7A running solo

    2.2-2.3A running with the Bodnar and fan attached to USB ports

    2.7A maximum registered on startup

  • Thanks for measuring. That's a lot more power than BBG or even, I think, than the BBAI. Perhaps fine where there is sufficient power budget but not clear to me that it is a good choice for a remote solar power site.

  • edited August 2022

    My goal is to be off-grid on the back 40 here. I run the K3WRG beacon, which is essentially untouched for a year now, and is solar powered.

    But it is very close to my receive setup, so I'm deaf on the default WSPR transmit cycle, and it causes issues for longer format FST4W on higher bands.

    On power, whereas

    3x BBG 3 Kiwis will run 24 channels, two BBAI-64 Kiwis will run 28. I run magloops. If my muddled brain has it right, my requirement will realistically be ~9a/5v for two BBAI64s versus ~6a/5v for three BBG, including Bodnar(s).

    So a ~30-35% increase in power requirement (with 4 more channels).

    I'm okay with that tradeoff, especially since I'm happy to oversize the solar system.

  • are the older BBAI no longer available?

  • Mouser has 39 in stock at the moment.

    Octopart search: https://octopart.com/search?q=BBONE-AI&currency=USD&specs=0

    (first result catches AI-64, so ignore that)

  • @perezoso I'll need a buck converter here as well. Mind sharing what model you're using? Seems to be a bit of a minefield on finding a quiet one.

  • edited August 2022

    These

    https://smile.amazon.com/gp/product/B01MQGMOKI/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1

    have shown themselves to work pretty well. They switch at just below 1 MHz and have quite small area so don't generate a lot of field. Some of us have been using these for several years with good results. Switching lines are not generally visible, even the fundamental.

  • @n6gn I know of those (getting some delivered tomorrow for a 5V cooling fan setup for my G90), so I’d love to find out similar proven 5A options might be: MP1584EN are only up to 3A.

  • Wow, can't help you there while there are higher current versions avaialbe I haven't found one that switches at higher rates and also has small area so as to minimize unwanted coupling. I think with some care you might be able to parallel two of the 3A versions. What happens if you put a small value series resistor in series with each and then connect via the resistor's junction? Pick a value for maybe 100 mV drop at stable conditions?

    If average current is 2.7A each R might be 2*.1/1.35. so maybe 100-200 milliohms. I'm not certain that this will work, I've never tried it, but it might.

  • Operation successfully performed on a second AI-64 (which are back in stock widely, and the brief price spike has subsided).

    One small hiccup. The "git pull -v" command resulted in a error, see image below. I exhaled and tried it again, whereupon it worked.



  • trying it all here now....

  • edited October 2022

    Things I found with the KiwiSDR upgrade from BB Green to BB AI-64

    Setting a fixed IP address for the ethernet port via admin/Network - fails, always stays DHCP, turns out that IP configuration is strictly managed by the files in /etc/systemd/network

    The work around using PuTTY is:-

    nano /etc/systemd/network/eth0.network

    [Match]

    Name=eth0

    Type=ether

    [Link]

    RequiredForOnline=yes

    [Network]

    DHCP=none

    Address=10.0.0.106


    Ctrl-O <ENTER> to write File

    Ctrl-X to exit nano


    Cheers Paul

    VK3KHZ

  • Host name set in /etc/hostname

    DNS's are set in /etc/resolv.conf

  • So the actual problem here is that Debian 11 (Bullseye) doesn't appear to have the connmanctl command (from the conman package) installed by default. Back in January (v1.487) we discovered that Debian 10 required connmanctl to be used to configure the Ethernet interface.

    So I'll add the installation of the conman package to the Kiwi Makefile. You can manually install it with the pki connman command.

  • Thanks John,

    I tried connman before my original post and came up with a IP4 problem, when using connman, the card ended up with both a static and a DHCP IP4 address, and there was no way to kill of the DHCP address... so I un-installed connman.

  • edited May 2023

    I followed the directions in the first post to build and configure the AI-64, but at the end of the process I don't seem to have a httpd or apache/apache2 server running. All connections to the ip @ 8073 are refused...

    The make step seemed abnormally quick...less than 10 minutes and I was expecting a half hour or more...

    EDIT: Seems I am having issues with SPIDEV:

    debian@BeagleBone:/var/log$ tail -n 50 syslog

    May 31 20:54:28 BeagleBone kiwid: 00:00:00.772 ....   ### using SPI_DEV /dev/spidev0.0

    May 31 20:54:28 BeagleBone kiwid: SYS_PANIC: "open spidev" No such file or directory (platform/common/spi_dev.cpp, line 202) No such file or directory

    May 31 20:54:28 BeagleBone kiwid: sys_panic: backtrace 0 0x49cfe8 /usr/local/bin/kiwid() [0x49cfe8]

    May 31 20:54:28 BeagleBone kiwid: sys_panic: backtrace 1 0x49d260 /usr/local/bin/kiwid() [0x49d260]

    May 31 20:54:28 BeagleBone kiwid: sys_panic: backtrace 2 0x424bb4 /usr/local/bin/kiwid() [0x424bb4]

    May 31 20:54:28 BeagleBone kiwid: sys_panic: backtrace 3 0x4941a8 /usr/local/bin/kiwid() [0x4941a8]

    May 31 20:54:28 BeagleBone kiwid: sys_panic: backtrace 4 0x413d30 /usr/local/bin/kiwid() [0x413d30]

    May 31 20:54:28 BeagleBone kiwid: sys_panic: backtrace 5 0xffff8f880e18 /lib/aarch64-linux-gnu/libc.so.6(__libc_start_main+0xe8) [0xffff8f880e18]

    May 31 20:54:28 BeagleBone kiwid: sys_panic: backtrace 6 0x410cc4 /usr/local/bin/kiwid() [0x410cc4]

    May 31 20:54:29 BeagleBone systemd[1]: kiwid.service: Main process exited, code=exited, status=255/EXCEPTION

    May 31 20:54:29 BeagleBone systemd[1]: kiwid.service: Failed with result 'exit-code'.

    May 31 20:54:29 BeagleBone systemd[1]: kiwid.service: Consumed 1.436s CPU time.

    May 31 20:54:39 BeagleBone systemd[1]: kiwid.service: Scheduled restart job, restart counter is at 9.

    May 31 20:54:39 BeagleBone systemd[1]: Stopped kiwi daemon.

    May 31 20:54:39 BeagleBone systemd[1]: kiwid.service: Consumed 1.436s CPU time.

    May 31 20:54:39 BeagleBone systemd[1]: Starting kiwi daemon...

    May 31 20:54:39 BeagleBone kiwid[1259]: BBAI-64 Debian 11.7 USE_SPIDEV

    May 31 20:54:39 BeagleBone kiwid[1259]: Starting kiwid

    May 31 20:54:39 BeagleBone kiwid[1259]: BBAI-64 uses custom Kiwi device tree loaded via U-boot

    May 31 20:54:40 BeagleBone kiwid[1259]: Start kiwid: OK

    May 31 20:54:40 BeagleBone kiwid[1275]: Wed May 31 20:54:40 UTC 2023

    May 31 20:54:40 BeagleBone systemd[1]: Started kiwi daemon.

    May 31 20:54:41 BeagleBone kiwid: 00:00:00.130  KiwiSDR v1.601 --------------------------------------------------------------------

    May 31 20:54:41 BeagleBone kiwid: 00:00:00.130  compiled: May 31 2023 20:01:11 on BeagleBone

    May 31 20:54:41 BeagleBone kiwid: 00:00:00.130  /etc/debian_version 11.7

    May 31 20:54:41 BeagleBone kiwid: 00:00:00.153  reading configuration from file /root/kiwi.config/kiwi.json: 153 tokens (1.4k bytes)

    May 31 20:54:41 BeagleBone kiwid: 00:00:00.153  reading configuration from file /root/kiwi.config/admin.json: 31 tokens (298 bytes)

    May 31 20:54:41 BeagleBone kiwid: 00:00:00.536  serial number from EEPROM: 5435

    May 31 20:54:41 BeagleBone kiwid: 00:00:00.536  reading configuration from file /root/kiwi.config/dx.json

    May 31 20:54:41 BeagleBone kiwid: 00:00:00.539  DX: 897 label entries

    May 31 20:54:41 BeagleBone kiwid: 00:00:00.539  DX: file = 897,f00bb3ec,42563

    May 31 20:54:41 BeagleBone kiwid: 00:00:00.540 ....   firmware: SDR_RX4_WF4

    May 31 20:54:41 BeagleBone kiwid: 00:00:00.540 ....   firmware: rx_chans=4 wf_chans=4

    May 31 20:54:41 BeagleBone kiwid: 00:00:00.540 ....   firmware: RX rx_decim=5555 RX1_STD_DECIM=505 RX2_STD_DECIM=11 USE_RX_CICF=0

    May 31 20:54:41 BeagleBone kiwid: 00:00:00.540 ....   firmware: RX srate=12001.062(12000) bufs=4 samps=170 loop=85 rem=0 intr_usec=14166

    May 31 20:54:41 BeagleBone kiwid: 00:00:00.540 ....   firmware: WF xfer=9 samps=911 rpt=50 loop=18 rem=11

    May 31 20:54:41 BeagleBone kiwid: 00:00:00.540 ....   webserver: listening on port 8073/8073 for HTTP connections

    May 31 20:54:41 BeagleBone kiwid: 00:00:00.542 ....   webserver: OK, port [::]:8073

    May 31 20:54:41 BeagleBone kiwid: 00:00:00.772 ....   ### using SPI_DEV /dev/spidev0.0

    May 31 20:54:41 BeagleBone kiwid: SYS_PANIC: "open spidev" No such file or directory (platform/common/spi_dev.cpp, line 202) No such file or directory

    May 31 20:54:41 BeagleBone kiwid: sys_panic: backtrace 0 0x49cfe8 /usr/local/bin/kiwid() [0x49cfe8]

    May 31 20:54:41 BeagleBone kiwid: sys_panic: backtrace 1 0x49d260 /usr/local/bin/kiwid() [0x49d260]

    May 31 20:54:41 BeagleBone kiwid: sys_panic: backtrace 2 0x424bb4 /usr/local/bin/kiwid() [0x424bb4]

    May 31 20:54:41 BeagleBone kiwid: sys_panic: backtrace 3 0x4941a8 /usr/local/bin/kiwid() [0x4941a8]

    May 31 20:54:41 BeagleBone kiwid: sys_panic: backtrace 4 0x413d30 /usr/local/bin/kiwid() [0x413d30]

    May 31 20:54:41 BeagleBone kiwid: sys_panic: backtrace 5 0xffff8a730e18 /lib/aarch64-linux-gnu/libc.so.6(__libc_start_main+0xe8) [0xffff8a730e18]

    May 31 20:54:41 BeagleBone kiwid: sys_panic: backtrace 6 0x410cc4 /usr/local/bin/kiwid() [0x410cc4]

    May 31 20:54:42 BeagleBone systemd[1]: kiwid.service: Main process exited, code=exited, status=255/EXCEPTION

    May 31 20:54:42 BeagleBone systemd[1]: kiwid.service: Failed with result 'exit-code'.

    May 31 20:54:42 BeagleBone systemd[1]: kiwid.service: Consumed 1.435s CPU time.


    Did I miss an important step somewhere maybe?

    EC

  • Okay, try this first please:

    cdp

    mst

    make install_kiwi_device_tree

    reboot

    If that doesn't help, and if the file /root/build.log is more than a few lines long (i.e. it still has the result of the last full build), please cut/paste and email the content of that file to support@kiwisdr.com

    Thanks

    p.s. You won't (shouldn't) find an httpd, apache or lighttpd process. The Kiwi code has a little web server built-in that follows the realtime rules.

  • Thanks for the reply. The 4 steps didn't make a difference, and it doesn;t seem like I have a build log:

    root@BeagleBone:~# cat /root/build.log

    cat: /root/build.log: No such file or directory

    root@BeagleBone:~#

  • What you posted does say "v1.601" though, which is the current version. So it must have built to some degree. Also, I see evidence of a recent feature I added.

    What's the output of the "dog" command? It should be something like:

    Debian 11.5

    BeagleBoard.org Debian Bullseye Xfce Image 2022-01-14

    Linux ai64 5.10.120-ti-arm64-r64 #1bullseye SMP Tue Sep 27 18:52:35 UTC 2022 aarch64 GNU/Linux

    Debian GNU/Linux 11 (bullseye)

    It's possible that BeagleBoard.org has changed something about their current update. I would have to update mine here to verify. I hate to do that though because it's my main build machine and it would be inconvenient if it got bricked. Maybe it's time to finally fix the Kiwi backup function on Debian 11 (the admin backup tab doesn't work on AI-64 because of changes needed with Deb 11).

Sign In or Register to comment.