---
title: "Walkthrough: Standalone SDK on Windows"
description: "Walkthrough: Standalone SDK on Windows, Step by Step Guide"
---

[Skip to content](https://portal.sandgrain.eu/knowledge-base/walkthrough-standalone-sdk-on-windows#main-content)

English

Show submenu for translations

![SandGrain\_Logo\_RGB\_white-bijgesneden (1)](https://portal.sandgrain.eu/hs-fs/hubfs/SandGrain_Logo_RGB_white-bijgesneden%20(1).png?width=427&height=83&name=SandGrain_Logo_RGB_white-bijgesneden%20(1).png)

Open main navigation

Close main navigation

- English
  
  Show submenu for translations
- [Contact us](https://portal.sandgrain.eu/login)

[Contact us](https://portal.sandgrain.eu/login?hsLang=en)

 How can we help you?

- There are no suggestions because the search field is empty.

1. [Knowledge Base](https://portal.sandgrain.eu/knowledge-base?hsLang=en)
2. [SDK](https://portal.sandgrain.eu/knowledge-base/sdk?hsLang=en)
3. [SandGrain SDK](https://portal.sandgrain.eu/knowledge-base/sdk?hsLang=en#sandgrain-sdk)

October 6, 2026

# Walkthrough: Standalone SDK on Windows

**Who this is for:** Windows users who want to run the Device, Gateway, and a local Cloud agent on one machine, the fastest way to confirm your hardware and toolchain work.

**What you'll accomplish:** Get a **Mutual Authentication OK** result end to end, without the TrustBridge platform.

**Prerequisites:**

- [*Prerequisites on Windows*](https://portal.sandgrain.eu/knowledge-base/install-prerequisites-on-windows?hsLang=en) completed (Git, Node, Docker, WSL, usbipd, execution policy).
- [*Get the Code & Run the Setup Script*](https://portal.sandgrain.eu/knowledge-base/get-the-code-run-the-setup-script?hsLang=en) completed (`.\setup.ps1` has run).
- Your SandGrain Token plugged in and your CyberRock access package on hand.

### Start the Mosquitto broker (inside WSL)

Open a WSL shell (`wsl`), then run Mosquitto as a background service and confirm it's active:

```
sudo systemctl enable mosquitto sudo systemctl start mosquitto sudo systemctl status mosquitto
```

### Check the serial (COM) port

Confirm the COM port is set correctly in both config files:

- `poc_sdk_gateway/app/config_poc.h`
- `poc_sdk_device/app/config_poc.h`

On Windows, `USB_COM_PORT` is your COM port number (e.g. COM4 → `4`). See *USB & Serial Port Setup* if you're unsure which port your Token is on.

**CRC note:** CRC is disabled by default in this branch (`CRC_ENABLE 0`): no edit is needed for local testing. **CRC integrity checking is mandatory outside local testing**; re-enable it for any shared or production build by compiling with `-DCRC_ENABLE=1`. Do **not** edit files under `sdk_fw/`.

### Run everything

In PowerShell:

```
.\run_standalone.ps1
```

**The first prompt** attaches the USB Token to WSL from Windows. Make sure the BUSID you enter matches the one shown.

**The remaining prompts** are for environment variables (CyberRock base URL, Device ID, Cloudflare Access ID/secret, MQTT settings, tenant email/password). These come from your CyberRock access package, see *Access & Credentials*.

### Grant sudo and watch three terminals open

If the builds succeed, the Gateway and Device need sudo permission to read the Token's TID and access the serial port. After you provide it, **three terminals open**:

- **Left**: the Cloud agent (`sdk_cloud`)
- **Middle**: the Gateway (`poc_sdk_gateway`)
- **Right**: the Device (`poc_sdk_device`)

### Run Mutual Authentication

In the **Device** terminal, enter **Option 1: Mutual Authentication (no fault injection)**.

If it succeeds, the result shows:

![](https://portal.sandgrain.eu/hs-fs/hubfs/image-png-2.png?width=670&height=374&name=image-png-2.png)

**Mutual Authentication OK**

That confirms all three components are working together.

#### If something goes wrong

- **USB not detected in WSL** → re-run the attach step; see [*USB & Serial Port Setup*](https://portal.sandgrain.eu/knowledge-base/usb-serial-port-setup?hsLang=en).
- **Build needs sudo / can't read TID** → provide sudo when prompted.
- **Broker not reachable** → confirm `systemctl status mosquitto` shows *active*.

See [*Troubleshooting SDK Setup*](https://portal.sandgrain.eu/knowledge-base/troubleshooting-sdk-setup?hsLang=en) for the full list.

### Next step

- Want the web UI and device lifecycle? Move on to [*SDK + TrustBridge on Windows*](https://portal.sandgrain.eu/knowledge-base/walkthrough-sdk-trustbridge-on-windows?hsLang=en).
- Curious what each config value means? See [*Compile-Time Configuration*](https://portal.sandgrain.eu/knowledge-base/compile-time-configuration-sdk-sgr-config.h?hsLang=en) and [*Environment & Runtime Configuration*](https://portal.sandgrain.eu/knowledge-base/environment-runtime-configuration?hsLang=en).

- [User Documentation](https://portal.sandgrain.eu/knowledge-base/user-documentation?hsLang=en#main-content)

    - [Quick Starter Guide](https://portal.sandgrain.eu/knowledge-base/user-documentation?hsLang=en#quick-starter-guide)
    - [User Manual](https://portal.sandgrain.eu/knowledge-base/user-documentation?hsLang=en#user-manual)
    - [Whitepaper](https://portal.sandgrain.eu/knowledge-base/user-documentation?hsLang=en#whitepaper)
    - [Token Leaflet](https://portal.sandgrain.eu/knowledge-base/user-documentation?hsLang=en#token-leaflet)
    - [Claim Token Procedure](https://portal.sandgrain.eu/knowledge-base/user-documentation?hsLang=en#claim-token-procedure)
    - [Daisy Chain](https://portal.sandgrain.eu/knowledge-base/user-documentation?hsLang=en#daisy-chain)
    - [Release Note](https://portal.sandgrain.eu/knowledge-base/user-documentation?hsLang=en#release-note)
    - [Naming Convention](https://portal.sandgrain.eu/knowledge-base/user-documentation?hsLang=en#naming-convention)
    - [SandGrain SDK](https://portal.sandgrain.eu/knowledge-base/user-documentation?hsLang=en#sandgrain-sdk)
    - [TrustBridge](https://portal.sandgrain.eu/knowledge-base/user-documentation?hsLang=en#trustbridge)
- [API Documentation](https://portal.sandgrain.eu/knowledge-base/api-documentation?hsLang=en#main-content)

    - [Device API Integration](https://portal.sandgrain.eu/knowledge-base/api-documentation?hsLang=en#device-api-integration)
    - [Daisy Chain and Attestation](https://portal.sandgrain.eu/knowledge-base/api-documentation?hsLang=en#daisy-chain-and-attestation)
- [SDK](https://portal.sandgrain.eu/knowledge-base/sdk?hsLang=en#main-content)

    - [Core Functions](https://portal.sandgrain.eu/knowledge-base/sdk?hsLang=en#core-functions)
    - [SandGrain SDK](https://portal.sandgrain.eu/knowledge-base/sdk?hsLang=en#sandgrain-sdk)

[![SandGrain\_Logo\_RGB\_white-bijgesneden (1)-1](https://portal.sandgrain.eu/hs-fs/hubfs/SandGrain_Logo_RGB_white-bijgesneden%20(1)-1.png?width=427&height=83&name=SandGrain_Logo_RGB_white-bijgesneden%20(1)-1.png "SandGrain_Logo_RGB_white-bijgesneden (1)-1")](https://portal.sandgrain.eu/?hsLang=en)

<https://www.facebook.com/> <https://www.twitter.com/> <https://www.instagram.com/> <https://podcasts.apple.com/> [mailto:email@email.com](mailto:email@email.com)

Copyright © 2026, sandgrain.eu