Skip to content
This repository has been archived by the owner on Feb 9, 2024. It is now read-only.

Upgrade from 2.1 to 2.4.1

John Alexander (MSFT) edited this page May 3, 2021 · 8 revisions

The first 50 Moab units (SN-001 to SN-050) are version Moabian 2.1. Follow these steps to upgrade. Steps assume you can see moab.local

1. SSH into the pi

ssh [email protected]
password: raspberry

2. Upgrade Raspbian OS from 4.19 to 5.4

sudo apt update -y
sudo apt upgrade -y
sudo reboot now

3. SSH into the pi again

ssh [email protected]
password: raspberry

4. Clone Moabian and install

rm -rf moab moabian
git clone https://github.com/microsoft/moabian moab
cd moab
git checkout v2.4.1
sudo os/setup              # 5 minutes
sudo reboot now

5. SSH into the pi again

ssh [email protected]
password: raspberry

6. Build the moab/control docker image

sudo rm /usr/local/bin/{testmoab,ufetch,motd}       # only for 2.1 --> 2.4.1
./moab/sw/setup 2.4.1  # 6 minutes

7. Balance some ping-pong balls

up                # press y when prompted to continue

Commands

All commands below assume current directory is ~/moab

To... Type
Level 1 Diagnostic diagnose
Watch controller log logs
Watch all logs dc logs -f
Stop controller down
Start controller up
Restart controller restart
Lift plate half-way for level testing level 0.5
Quick firmware restart fw-restart
Shutdown Moab Hold down power button 3 sec or sudo shutdown now

Optional: install bare-metal packages for "control" development

New name is now moab.local

host % ssh [email protected]

cd moab/sw

sudo bin/packages     # ~8m : (for compilers, etc.) 
sudo bin/bcm2835      # 10s : makes /usr/local/lib/libbcm2835.a
sudo bin/pymoab       # 30s : makes /usr/local/lib/libmoab.a
sudo pip3 install -r requirements.txt



# Run moab now in one of two ways:
down                        # ensure docker version isn't running
sudo bin/start              # will auto start a brain
sudo python3 main.py        # without a brain

# press Ctrl-C to quit

Development Tips

If you plan on developing on the Moab unit, do this section first.

1. Set up an ssh shortcut

cd ~/.ssh
cat <EOF >> config
Host moab
    Hostname moab.local
    User pi
    IdentityFile ~/.ssh/moabkey
EOF

2. Setup an ssh keypair to share with your moab.

cd ~/.ssh
ssh-keygen -f moabkey -t ed25519
ssh-add moabkey
ssh-copy-id -i moabkey [email protected]