Skip to content
English
  • There are no suggestions because the search field is empty.

Troubleshooting SDK Setup

Who this is for: Anyone hitting an error during installation or the first run.

What you'll accomplish: Find the common failure, understand the cause, and apply the fix.

Installation issues

PowerShell: "running scripts is disabled" Allow scripts for the session, then re-run:

Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass 

Docker installer exit code 4294967291 (= -5) The UAC prompt was missed or denied during Docker Desktop install. Re-run the install and click Yes on the UAC prompt (check the taskbar for a flashing shield icon).

Configuration issues

Wrong COM / serial port Confirm the correct port in poc_sdk_gateway/app/config_poc.h and poc_sdk_device/app/config_poc.h. See USB & Serial Port Setup.

CRC errors on a non-local build CRC is disabled by default for local testing. For any shared or production build, enable it with -DCRC_ENABLE=1. A mismatch surfaces as SGR_SDK_CRC_ERROR.

Auth fails in an unexpected way Confirm SERVER_IP points at the Gateway, not the cloud server, this is a common mix-up.

Connection issues

Docker: "cannot find the file specified" / "cannot connect to the Docker daemon" Docker isn't fully started. Wait ~30 seconds and retry.

Linux: "permission denied" on the Docker socket You didn't log out/in after usermod -aG docker $USER. Run newgrp docker (or re-login), then retry.

Split deployment: hosts can't reach each other Ensure all hosts share the same IP subnet (see Split Deployment on Raspberry Pi → Network).

Runtime issues

Device/Gateway need sudo They require root to read the Token's TID and access the serial port / raw sockets. Provide sudo when prompted, or run the Device with --sudo.

Build complains about clock skew on a Pi Sync the clock:

sudo apt install -y systemd-timesyncd 
sudo systemctl enable --now systemd-timesyncd
sudo timedatectl set-ntp true

Gateway rejects the device immediately with SGR_SDK_NOT_REGISTERED The device's TID is not in the whitelist. Register the device in the TrustBridge frontend (which adds its TID to the Gateway whitelist), then retry.

USB device not detected in WSL

  • The attach is lost on unplug/reboot, re-run usbipd list and usbipd attach.

  • On usbipd ≥ 4.0, run usbipd bind --busid <BUSID> once (as admin) before the first attach.

  • Check the cable and port, some cables are charge-only.

  • Verify inside WSL with lsusb and dmesg | grep tty.

A cached Docker image is serving stale code

If a container is "Up" but behaves as though a code fix didn't land (e.g. the auth flow hangs at a gateway step), force a clean rebuild:

# Windows 
.\TrustBridge\TrustBridge-BE\start-all.ps1 rebuild


# Linux/macOS
./TrustBridge/TrustBridge-BE/start-all.sh rebuild