Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Installing and Running DAC Applications

Once the reference image has been flashed to the Raspberry Pi, follow the below instructions to install and run a sample DAC application onto the RPi. Two sample DAC applications are available here: https://github.com/stagingrdkm/lntpub/tree/master/bundle/rpi. These applications are in the OCI bundle format and have already been prepared for the Raspberry Pi.

For instructions on how to create your own application, see below. These instructions will use the Wayland EGL test application. You may need to install wscat first on your workstation to follow these instructions. $BOX refers to the IP of the raspberry pi.

1. Download the rpi-wayland-egl-test.tar.gz file from GitHub to your workstation

2. Create a simple web server on your workstation that is accessible from the Raspberry Pi, and use it to serve the downloaded tar.gz file. https://www.npmjs.com/package/http-server is a good, simple HTTP server that could be used for this purpose

3. Install the application on the Pi using Packager. Replace the IP address with the IP of your web server:

Code Block
wscat -c ws://$BOX/jsonrpc -s notification -x '{"jsonrpc":"2.0","id":1,"method":"Packager.1.install", "params":{ "pkgId": "mypkgid", "type": "DAC", "url": "http://192.168.1.147:8080/7218c-wayland-egl-test.tar.gz" } }'

4. Launch the application with RDKShell:

Code Block
wscat -c ws://$BOX/jsonrpc -s notification -x '{"jsonrpc":"2.0","id":1,"method":"org.rdk.RDKShell.1.launchApplication", "params":{ "client": "test", "mimeType": "application/dac.native", "uri": "mypkgid" } }'

5. You should see a flashing green square in the corner of the display. This is the sample application.

6. Suspend and resume the application by running the following:

Code Block
wscat -c ws://$BOX/jsonrpc -s notification -x '{"jsonrpc":"2.0","id":1,"method":"org.rdk.RDKShell.1.suspendApplication", "params":{ "client": "test" } }'
wscat -c ws://$BOX/jsonrpc -s notification -x '{"jsonrpc":"2.0","id":1,"method":"org.rdk.RDKShell.1.resumeApplication", "params":{ "client": "test" } }'

7. Kill the application:

Code Block
wscat -c ws://$BOX/jsonrpc -s notification -x '{"jsonrpc":"2.0","id":1,"method":"org.rdk.RDKShell.1.kill", "params":{ "client": "test" } }'

8. Get a list of installed applications and uninstall the sample app:

Code Block
wscat -c ws://$BOX/jsonrpc -s notification -x '{"jsonrpc":"2.0","id":1,"method":"Packager.1.getInstalled" }'
wscat -c ws://$BOX/jsonrpc -s notification -x '{"jsonrpc":"2.0","id":1,"method":"Packager.1.remove", "params":{ "pkgId": "mypkgid" } }'



App Development and Publishing

...