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

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

jksjks
edited May 2 in BeagleBone AI
[updated 4-Mar-24]
SUBSEQUENT UPDATES:
If you subsequently update the Beagle software on your AI, 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)

[updated 9-Feb-22]
If you need to re-flash your BBAI with a Beagle Debian 9 factory image there are now instructions for doing so on the website: http://kiwisdr.com/quickstart/index.html#id-dload Afterwards, you will still need to follow the instructions below to install the Kiwi software. Currently there is no BBAI image file that already has the Kiwi software pre-installed.

[updated 3-Jun-21]
Do NOT power the Kiwi + BBAI combination from the Kiwi DC jack. The common-mode choke on the Kiwi board may not handle the combined current and can burn up. Power from the BBAI USB-C jack instead. The Kiwi board will receive power from the BBAI.

[original message 10/2019]

Using a BeagleBone AI with the KiwiSDR board is currently UNDER DEVELOPMENT and UNSUPPORTED.
Only attempt the following if you have Linux, system/networking admin and electronics skills.
Use at your own risk. We have NO RESPONSIBILITY if you burn up your BBAI and/or Kiwi due to improper cooling/operation.

REQUIRED:
You MUST monitor the BBAI cpu temperature via the Kiwi stats UI or shell commands. Try and keep the temp below 50C.
You sometimes get weird behavior above 50C I've found even though 50C isn't really that hot.
Use a 90 mm diameter or larger fan that moves *lots* of air. Point it at end of the board stack with the SMA connectors to maximize BBAI cpu cooling.
You could wire the fan to the black/red wires of a very short, cutoff USB-A cable that plugs into the BBAI USB back by the sd card slot.
Do NOT use the Kiwi metal enclosure with its stock 30mm fan. That fan will not move enough air across the cpu heatsink.
See later posts in this thread for examples of modified enclosures that are reported to work.
Use a 5V 3A minimum USB-C power supply.

HARDWARE NOTES:
BBAI WiFi has not been validated. Use Ethernet instead.
More optimized cooling has not been finalized.
e.g. smaller fan, different heatsinks, header risers to increase inter-board spacing, enclosure effects.
Note that the micro sd card slot is inverted compared to the Beaglebone Black/Green (i.e. flip cards over compared to BBB/G).

STATUS:
14-channel mode can be enabled (BBAI only) on admin "mode" tab.
14 simultaneous kiwirecorder connections can get audio underruns unless running at 1.5 GHz. This is being debugged.
Running more than 6 WSPR extensions doesn't work as well as first thought. This is being debugged.
Remember that you can put something like this in a bookmark:
my_kiwi:8073/?ext=wspr,40m&mute&win2&ext=wspr,30m&mute&win3&ext=wspr,20m&mute etc.

FIRST TIME SETUP:
Find Ethernet ip address assigned by your DHCP. Login using ssh/PuTTY as "debian" "temppwd".
"sudo bash" to get a root shell. With this Debian distro you cannot login as "root" [no password] anymore, i.e. it's more secure.

Use the instructions at the following webpage to update/upgrade the BBAI software:
Leave out the use of "sudo" as you are already root.

Important: Do not install the TI deep learning tools listed at the end of the "update distribution components" section ("install -y ti-tidl mjpg-streamer-opencv-python").

**Ignore** the sections about WiFi, USB and Cloud9. WiFi has not yet been tested with the Kiwi software.
====> https://beagleboard.org/upgrade

After rebooting from the update login again and from a root shell do:
cd [goes to /root]
git clone https://github.com/jks-prv/Beagle_SDR_GPS.git
cd Beagle_SDR_GPS
make clean
make
make install

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.
Kiwi server should be running ~45 seconds after reboot.

After the install/reboot the shortcut aliases in /root/.bashrc are available and also
tools for monitoring the cpu temperature and tuning the frequency (see "BBAI" section of /root/.bashrc).

Type "cf1" to set clock freq to 1 GHz from the default 500 MHz.
Type "ct" to check cpu temp (divide by 1000 for deg C).
Type "cm" for a continuous freq/temp monitoring.
Type "ht" for a nice process viewer to see cpu usage.

XXX Only use "cf15" to run at 1.5 GHz if you have sufficient cooling airflow! XXX
Monitor your cpu temp carefully!
PowernumptyWA2ZKDHB9TMCrz3dvp
«134567

Comments

  • Posted just as I go out to work...
    Torture I tell you.
  • I NEED to get a BBAI.
    Ron
    KA7U
    WA2ZKD
  • Looks promising, not tried it at 1.5GHz yet as I don't trust my old case fan and want to put some hardware in to give a larger passive cooling affect.
  • jksjks
    edited October 2019
    Did you find any changes necessary from the install instructions? I don't know where to find the image they ship with. So I couldn't replicate my instructions without buying another AI. I had done lots of messing around prior to getting things working so it was difficult to put things back to original condition.
  • To be honest I had followed the getting started instructions that were presented so had already done the "update/upgrade the BBAI software".
    All seemed to work fine, one point it said to reboot hit enter but I still had to reboot it by command so 99.99% good so far.
    Keep laughing at the channel count. Slight under run on 14 ch but only as described above.
  • jksjks
    edited October 2019
    Okay, thanks. I see what the problem is with the reboot. I'll fix it.

    It's necessary because the first-time run of the Makefile builds and installs a new device tree with the Kiwi GPIO configuration. This now has to be done statically and made available to the boot loader versus how it is done in Debian 8.
  • I bet there are some fundamental software changes that affect choices made years ago.
    It has great potential showing even now.
    I think it will create two types of Kiwi, one for general use, solar powered etc. one for pushing what is possible in the form factor, I like the fact it is not making the current spin obsolete just offering a different focus.

    Idle low priority question can I clone another SDR configuration safely or should I just make changes as required?
  • Just ordered 2 units so will have something running next week
  • The fan issue is worth preparing for, even during setup it needs forced cooling.
    I have a small, decent quality but old, 60x60x20 case fan blowing straight onto it in a 2U rack case (side on currently just due to cable issues). I had it at work with a larger slow fan without the thing in an enclosure and I did manage to get it up to 84C by knocking the fan direction - it's an untidy bench to be honest.
    I've just put it online port 8074, not much different to the casual view but the extra clues are there won't leave it online at this stage.
  • The rationale for the device tree / kernel overlays change is given here: https://elinux.org/Beagleboard:BeagleBoneBlack_Debian#Where_did_the_slots_file_go.3F

    You should be able to use the "clone" admin function. All that does is copy over .json file to kiwi.config/ and do an immediate restart. You'll have to re-select 14-channel mode and anything else you've changed of course.
    Powernumpty
  • jksjks
    edited October 2019
    The BBAI cpu heatsink situation doesn't quite make sense. That heatsink has short fins and 4 mounting holes to accept a tiny 20mm fan that mounts directly on top of the heatsink. So technically that heatsink is not so good for external fan cooling where longer fins would dissipate more heat. Oddly, the BBAI SRM (system reference manual) lists as a "replacement" heatsink one with longer fins and no fan direct fan mounting. I'm not sure what this implies.

    But the fan is not supplied with the BBAI. Worse, there is no dedicated connection for fan power on the board. I consider this a bug. Using the USB-A for this purpose is not so bad however. You can buy USB connectors that have solder-cup connections that make attaching the fan wires easy (soldering required of course).

    I have not yet purchased and tested the cpu heatsink fan (see the BBAI SRM for spec). The other problem is that the PMIC (power management IC) runs almost as hot as the cpu. It has no heatsink. I added one myself. It has an internal temperature monitor connected to its I2C bus. But there is no software currently that monitors this.
  • I did wonder what else to include in any scheme, must borrow a thermal camera.
    The height of the heatsink almost invites a larger plate that goes outside of the BBAI footprint, that is what I was considering. I assume the gap is about 2.5mm and countersunk screws would just about seat in 2mm plate so I have tentatively marked out the location of the connector gaps and where the SM components on the Kiwi underside start. The bottom of the AI seems to get warm too so my thinking was thermal pad underneath, plate on top to take the heat out to side rails.
    I tend to over engineer stuff but if I can make the heatsink part of the case I figure the whole assembly should last longer in the event of a fan failure.
    Will look at the power management chip, it's all bit new to consider heat (so much) in these small boards (same issues as Pi 4 compared to earlier ones).

    I'm running the AI on one of the Stontronics PSU's at the moment, seems pretty good (cut the lead added XT-30 M/F to be able to swap ends for a barrel plug)

    One thing I notice is the FPGA seem solid at 37% at the moment, BBG 8ch is about 10-25 at a glance, just observation.

    Must go off and do some stuff before turning in so will leave it running for a while but probably not while I'm at work just yet (fan redundancy would be a fix for now).
  • I ordered a BBAI from Mouser. Now I'm looking to cool it down when it gets here. Looking at heat sinks and considering the KiwiSDR cape will just clear the existing heat sink. I don't find GPIO header extensions, but there must be such a thing?
    https://www.ebay.com/itm/4pcs-20x20x10mm-Black-Anodized-and-Slotted-Aluminum-Heatsink-/121799579083

    What is now considered an adequate solution for cooling this thing?
    Ron
    KA7U
  • Cooling: I intend to use much more forced air...
  • edited October 2019
    James,
    Thank you for the link to the header extensions. They state the pins are extra long to accommodate a PCB. But a snip would shorten them to the appropriate length. I was thinking about removing the existing heatsink for a larger model, but maybe bolting a fan to the processor would be the way to go, once there is room to mount it. Or the unit will need to be enclosed in a case and a fan setup to cool the interior. From what I'm reading the memory and other chips on the board also run hot, so a larger heatsink on the processor and a fan to cool the unit in an enclosure might be the right answer. The system reference manual at Github links to this fan to cool the processor. https://www.nidec-copal-electronics.com/e/catalog/dc-fan/f251r.pdf It adds 10mm of height +/- .5mm, so header extensions will be needed to use this fan. An enclosure or tape along the sides of the assembly would provide an air tunnel. Primary cooling on the processor and a draft across the rest of the board. It might suffice.

    I'm looking for the most elegant and reasonable solution.
    Ron
    KA7U
  • I searched stacking headers, when I first booted the AI, seems the most obvious route until they make a stacking cape with fan ;-).
    I'm still interested in reversing the stack to get the AI on top to open more passive cooling options, dug out some 26W ribbon today, just need to sort one end though I expect that route is fraught with noise issues.
    Laptop heat pipes should be another, option, I must have something in my pile of "can't bring myself to throw away" items.

    Dell PC's always have some nice air ducts to cool RAM CPU etc, larger slow fan with (3D printed) duct could be another route.
  • jksjks
    edited October 2019
    I am currently using a couple of those stacking headers with the extra-long 8.5mm tails. The trick is to insert the pins only partially into the AI headers. This is not difficult because the insertion force is so great. The problem is to get all 46 pins aligned and moving together without bending any. The Kiwi board can go flush onto the new headers as usual. It gives you about 12mm more spacing between the two boards.

    Not the best photo, but you can sort of get the idea. Also note the PMIC heatsink. It wasn't exactly what I wanted but is better than nothing. The random wires is a hack for the console serial port so I didn't have to wait on shipping for the special adapter cable from DigiKey. On the left going out of frame is the USB connection for the fan power.

    image

    Attachments:
    https://forum.kiwisdr.com/uploads/Uploader/57/d17d78105afb94c3d43187f60e009f.jpg
    PowernumptyG0LUJKA7Urz3dvp
  • Cool, looks like the "Extra space" route is going to be the least intrusive.
    Thingiverse or other share should be able to provide those users with 3D printers (but limited time) a quick mounting route. If I had a printer I'd have done one by now.
    Thanks for the image I know where the extra sink is required. I'm still going to try a plate as, if possible, it would require less modification of the kit case end panels.

    I've stuck this one on sdr.hu for now, (I forgot to sort the port forward to the right IP yesterday) hope that is OK, mentioned Apha code in case anyone gets critical.
    The antenna is shared with the one on :8076 in case anyone wants to compare.
  • This is a very interesting development.

    Do you think the new BBAI would have enough 'grunt' to support stacked KiWi boards, as was previously discussed a long, long, time ago.

    Regards,

    Martin - G8JNJ
  • I can't quite remember what this was. Surely not physically stacking boards as that won't work due to power and SPI addressing and bandwidth limitations.

    I think you mean the idea of allowing a single UI instance to aggregating channels from multiple Kiwis, instead of, say, the URL forwarding hack we have now.
  • regarding the getting a 46 pin header on..... I got out some ext. headers I had for an RPi and they are < 46 but then a Kiwi cape is even less, so you don't need to deal with all 46, just the Kiwi pin count making it easier
  • >
    >Surely not physically stacking boards as that won't work due to power and SPI addressing and bandwidth limitations
    >

    Er........

    OK, so that's not possible after all.

    I guess aggregating is the next best option.

    Regards,

    Martin - G8JNJ
  • If you need to reflash the eMMC, the production eMMC flash image is here: https://github.com/beagleboard/beaglebone-ai/wiki/System-Reference-Manual#223-rev-a1a


    Currently testing. Stable circa 31C with two fans and top cover off the case. Construction of a larger case pending. Thanks jks for continuing development.

    PowernumptyHB9TMCrz3dvp
  • Project needs a "Thermal Cape"
    I've ordered some bits as my scrap box only has a couple of heat pipes and both need a lot of work, would get round the space issue though.
    This is just waiting for some themally conductive double sided tape plus a pad for the PMIC and a bit more inspiration on physically retaining at the network end.
    G0LUJHB9TMCrz3dvpWA2TP
  • @Geoff Thank you for that.
    @Stu I must admit, that's actually pretty neat.
  • I'm taking a "just add air" approach.



    - removed internal fan
    - mounted BBAI on 1/4" standoffs
    - raised cape with extension headers
    - mounted fan from slot cooler on modified endplate
    - flipped and modified opposite endplate for connector clearance and better breathing
    rz3dvpWA2TP
  • Looks good, have not seen one of those fans for a while.
    My only dislike of forced air is it relies on the fan working, if there is an option that would work to, say 70% with the fan off, I'll go with that, much harder to stress the AI and things around it.
    I've not really played with Heat Pipes much so have been reading up and will probably go that route if I can work out how to make a decent set of fins or sink at home and also connect them in a sensible fashion.
    Fans are good for getting cooling to everything in the box, being item-specific I could leave some things out so I probably need a hybrid approach (similar to a laptop).

    Wish now that I had purchased a stock case as looks to have a good amount of potential space and surface area.

    I do find it a bit ironic that the AI is still in Altoids can shape but would really not like being in a can.
    It's a great BB addition but they do (IMHO) need to make more heatsink options E.G. one that can be bolted out the side for cape use.
  • maybe BBAI2 can address that heat issue and change the DRAM to 2G. I use an Odroid XU4 on one of my wspr loggers which is sans HDD or SDD and use 1G of DRAM as a RAMdrive to save emmc wear. I'd guess other projects could benefit from same.
  • edited October 2019
    Looking at how close some tiny SM components are to the fixing locations some small physical revisions wouldn't hurt too.

    I stuck my old laptop heatsink down and fired it up without a fan, it took a long time to do anything but gradually headed up to about 51C before I went back down to the room it is in (open no case right now) and put a 12V fan at 8V over it, back to the PC and I thought I'd messed up as it was still showing 47C.
    It takes an age to change with that much copper on it, small improvements take about five minutes to fully reflect.
    Should be good once I actually duct a fan for it.

    Glad to hear the Odroid is working so well, I think I take advantage of that one most days.

    --later--

    Stuck it back in the 2U rack case, case fan only but now blowing in the same direction as the fins (distance about 2" 50mm, no ducting).
    Clocked it up to 1.5GHz (don't intend to leave it there) 14 wsprdaemon channels running and it levelled out at 43/44C. the room is probably 4C colder than the 1GHz run with supplied heatsink.

    WA2ZKDG0LUJ
Sign In or Register to comment.