Open pvr-sdk to listen on public IP - the fast way

WIth pvr fastcopy allowing allowing us to rename stuff it is easy for me to publish config examples to allow for everyone to copy them to their devices.

For now, lets start with pvr-sdk. pvr-sdk has an amazing feature called the pvr httpd service which allows pvr to speak to your device as if it would speak to to clone,post from and to your device without having to go through pantahub.

Once pvr-sdk is installed and is configured to open its port to IP you will be able to iterate on your device in a fully airgapped environment.

To achieve this do the following:

Install PVR-SDK

If your device does not yet have pvr-sdk installed, install it. Easiest way is for now to do a pvr fastcopy from one of our reference devices, e.g. if you look for an arm64v8 pvr-sdk use our rpi64:

pvr fastcopy -m "install pvr-sdk from rpi64_initial_latest" pantahub-ci/ rpi64_initial_latest#pvr-sdk YOURNICK/YOURDEVICE

Open pvr sdk port to public

Note that pv-httpd does not offer authentication nor TLS right now. So once you use your device directly through the public port with pvr you are basically in a very unprotected setup. But for developers using their device locally attached to their laptop this is usually more than good enough.

Now to open the port simply copy the _config/ example to your pvr-sdk:

pvr fastcopy -m "open pvrsdk port" \
    asacasa/pvr-sdk-config-examples#_config/ \

pvr clone/post to your device locally

Once applied you can then pvr clone and post to your device directly through IP:

export DEVICE_IP=Your.Device.Ip.Here
pvr clone http://$DEVICE_IP:12368/cgi-bin/pvr mydevice

And post back a zero change update to convert your device

cd mydevice
pvr post -m "no change - go local"

Note: now your device will change into what we call “local” mode. In local mode your device wont talk to pantahub at all anymore, you can just iterate locally like above.

If you want to put your device back into remote mode, we recommend you ssh into the pvr-sdk container and run pantahub-goto where you select a remote revision (those without locals/ prefix).

1 Like