Skip to content

svefredrik/onvif-uplink-tunnel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ONVIF Uplink PoC

This this a proof-of-concept implementation of the device-side of the ONVIF Uplink Spec.

Requirements

  • Axis device
    • Chip: ARTPEC7 or later
    • Firmware: 10.9 or higher
    • Docker ACAP installed and started and SD card as storage
  • Computer
    • Either Docker Desktop version 4.11.1 or higher,
    • or Docker Engine version 20.10.17 or higher with BuildKit enabled using Docker Compose version 1.29.2 or higher

Include the Apache config

Copy the Apache config fragment to the target. This will enable h2 and h2c on 127.0.0.6 and set a 600 keep alive timeout on that address. This is to avoid having to reconnect constantly.

export DEVICE_IP=<actual camera IP address>
scp localhost-h2c.conf root@$DEVICE_IP:/etc/apache2/conf.d

Restart Apache:

ssh root@$DEVICE_IP "systemctl restart httpd"

Building and running the image

Export the environment variable for the architecture

Export the ARCH variable depending on the architecture of your camera:

# For arm32
export ARCH=armv7hf

# For arm64
export ARCH=aarch64

Build the Docker image

# Define app name
export APP_NAME=onvif-uplink-tunnel

docker build --tag $APP_NAME --build-arg ARCH .

Set your device IP address and clear Docker memory

export DOCKER_PORT=2376

docker --tlsverify --host tcp://$DEVICE_IP:$DOCKER_PORT system prune --all --force

If you encounter any TLS related issues, please see the TLS setup chapter regarding the DOCKER_CERT_PATH environment variable in the Docker ACAP repository.

Install the image

Next, the built image needs to be uploaded to the device. This can be done through a registry or directly. In this case, the direct transfer is used by piping the compressed application directly to the device's docker client:

docker save $APP_NAME | docker --tlsverify --host tcp://$DEVICE_IP:$DOCKER_PORT load

Run the container

With the application image on the device, it can be started using docker-compose.yml:

docker --tlsverify --host tcp://$DEVICE_IP:$DOCKER_PORT compose up

# Cleanup
docker --tlsverify --host tcp://$DEVICE_IP:$DOCKER_PORT compose down

License

Apache License 2.0

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published