Module Integration Guides
...
Integrate Over The Air Updates
App Update
10 min
this guide talks about how to update an application binary of the remote device from the bytebeam cloud app update replaces the existing binary on the system with the binary uploaded on the bytebeam cloud we have provided an example application on our https //github com/bytebeamio/uplink/tree/main/examples/rpi/updates/app update page there are four files in the example hello app prints "hello from bytebeam" every 3 seconds app update sh this script replaces the old application with new application update sh this is a wrapper script for app update sh script make firmware update sh it creates the update tar file step1 prepare update tar firstly on your linux system, we need to create an update tar file for raspberry pi for that, download all the files mentioned above from github next, we need to change the permissions for all these files using chmod command chmod a+x hello app chmod a+x app update sh chmod a+x update sh chmod a+x make firmware update sh next run make firmware update sh to create a tar gz file /make firmware update sh step 2 upload update tar next, we need to upload the tar to https //cloud bytebeam io/ for that go to device management panel and click on the firmware versions tab under the firmware version tab, you will find an option to create a firmware version number and upload your updated tar file enter the new firmware version number and click on choose file to upload tar file then click on create step 3 set the application path in step 1 we have already assumed that you want to update the hello app that exists on your remote device and we created an update tar accordingly on the remote device, the app is expected to be in /usr/local/bin location if it's not there then create a new hello app in /usr/local/bin hello app #!/bin/bash while \[ 1 ] do sleep 3 echo "hi from bytebeam" done if the application location and app name are different, set the path in app update sh script in step 1 app update sh app name=hello app app bin path=/usr/local/bin step 4 create systemctl service to debug update changes to debug your changes after the app update, let's create a service that runs hello app so, c reate this service named \<app name> service and place it in /etc/systemd/system hello app service \[unit] description=simple application service after=network target auditd service \[service] execstart=/usr/bin/bash /usr/local/bin/hello app killmode=process restart=on failure type=simple \[install] wantedby=multi user target reload systemctl daemon and start the service sudo systemctl daemon reload sudo systemctl enable hello app service sudo systemctl start hello app step 5 trigger "update firmware" action from bytebeam cloud now let's proceed with our ota update for that, go to the device management panel and select the device next, click on the update firmware in the next prompt choose the firmware version and click on next monitor the progress of firmware updates in the action panel and on your remote device, you can see updated hello app update uplink using these steps we can update the uplink as well steps to follow step 1 in the example, replace the hello app with the uplink binary step 2 change the uplink path and application name in app update sh step 3 run make firmware update sh step 4 upload the generated update tar file to bytebeam cloud
