Skip to content

Boot Sequences Operations

Zachary Sasser edited this page Mar 12, 2021 · 3 revisions

Boot Operations

Code Archaeology:

The image of the OS is setup in a pretty specific way. A lot of things are setup for the Wombat within files like /boot/config.txt

I'm not 100% of all the things that are setup within linux files such as boot instead of a software by KIPR. I did some digging and found that the software is started on boot using a crontab. You can see this by navigating to /var/spool/cron/crontabs and opening the file "pi". There the crontabs are:

#@reboot /usr/bin/enableAP.sh
#@reboot /home/pi/task.sh
#@reboot /home/pi/zoobee_launcher.sh

As you can see, it is commented out, which means that this was how it was done early in development.

zoobee_launcher is a .sh that opens botui, and starts the node.js server (harrogate). When you click on the botguy icon in the desktop, this is what is being called. task.sh seems to be an earlier version of enableAP.sh which explains the directory choices. They both just do standard turning on wlan0, setting the ip to 192.168.125.1/24, etc.

How it works now:

It took me a little longer of digging to find where it actually called on boot. Another way to call a script on boot is to put it in /etc/init.d/ /etc/init.d/botui starts a file /home/pi/.config/autostart/start.desktop

start.desktop just calls zoobee_launcher.sh (and kills botui on close), which has the following:

echo [ZOOBEE] Launching harrogate server.js and botui GUI
sudo python wifi_configurator.py & 
cd harrogate
sudo node server.js &
sudo botui &

Note for Non-Linux Users: "&" runs the command on the left as a background task, the same as the SD writer script.

-Zachary

Clone this wiki locally