Skip to content

Latest commit

 

History

History
50 lines (36 loc) · 1.3 KB

fake-register.md

File metadata and controls

50 lines (36 loc) · 1.3 KB

Testing/Troubleshooting

This project includes a simple fake-lmp-device-register tool. This tool mimics the behavior of lmp-device-register, enabling you to quickly test this project's API without a real device.

Running the fake-lmp-device-register

Dependencies:

  • Python 3
  • requests Python library
  • openssl command-line tool
  • curl command-line tool

Usage:

To Register the Device:

You will need define a directory where the fake device config and certificates by using the --sota-dir flag:

pip3 install requests
python3 fake-lmp-device-register --registration-url "http://<IP of docker-compose host>:80/sign" --factory <factory> --sota-dir <path-to-sota-dir>

To Verify Connectivity with the Server

  1. Inspect the server URL configured in the sota.toml file:
cd path/to/sota-dir
$ cat sota.toml 

You should see an output similar to:

[tls]
server = "https://ec056c71-d698-41a6-bea0-1f1ac8c44bde.ota-lite.foundries.io:8443"
ca_source = "file"
pkey_source = "file"
cert_source = "file"
...
  1. Use curl to verify connectivity with the server:
$ ./curl https://ec056c71-d698-41a6-bea0-1f1ac8c44bde.ota-lite.foundries.io:8443/repo/root.json