> ## Documentation Index
> Fetch the complete documentation index at: https://launchpad.anxlabs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Set Up the ANX Dev Module on Your Computer

> Install drivers, configure your development environment, and verify your ANX dev module connection on Windows, macOS, and Linux.

Setting up the ANX dev module takes only a few minutes. You'll install the USB-to-serial driver your OS needs to recognise the board, verify the serial port appears correctly, install the ANX CLI, and then run a quick connection test to confirm everything is working. The steps below cover Windows, macOS, and Linux so you can follow the path that matches your machine.

<Warning>
  Do not use a damaged, frayed, or charge-only USB cable to connect the module. A cable that can't reliably carry data causes intermittent disconnects, failed firmware flashes, and misleading error messages that are difficult to diagnose.
</Warning>

<Steps>
  <Step title="Install USB Drivers">
    The ANX dev module uses a CP210x USB-to-UART bridge. Driver support varies by operating system.

    <Tabs>
      <Tab title="Windows">
        Windows does not ship with the CP210x driver. Install it with winget:

        ```powershell theme={null}
        winget install SiliconLabs.CP210xDriver
        ```

        Restart your machine after the installer completes to ensure the driver is fully registered.
      </Tab>

      <Tab title="macOS">
        macOS 11 and later include the CP210x driver in the kernel. No additional installation is required — plug in the module and the serial port appears automatically.
      </Tab>

      <Tab title="Linux">
        The `cp210x` kernel module ships with all mainstream Linux distributions (kernel 2.6.12 and later). No additional installation is required. If your distribution uses a stripped kernel, load the module manually:

        ```bash theme={null}
        sudo modprobe cp210x
        ```
      </Tab>
    </Tabs>
  </Step>

  <Step title="Connect the Module">
    Plug one end of the USB-C cable into the ANX dev module and the other end into a USB port on your computer. Observe the LEDs on the board:

    * **Power LED (green, solid)** — the module is receiving power and the bootloader is running normally
    * **Status LED (blue, slow blink)** — the module is idle and waiting for a firmware command

    If the power LED does not illuminate, try a different USB port or cable before proceeding.
  </Step>

  <Step title="Verify the Serial Port">
    Confirm your OS has enumerated the serial port correctly.

    <Tabs>
      <Tab title="Linux">
        ```bash theme={null}
        ls /dev/ttyUSB*
        ```

        You should see at least one entry:

        ```
        /dev/ttyUSB0
        ```

        If you see a `Permission denied` error when accessing the port later, add your user to the `dialout` group:

        ```bash theme={null}
        sudo usermod -aG dialout $USER
        ```

        Log out and back in for the group change to take effect.
      </Tab>

      <Tab title="macOS">
        ```bash theme={null}
        ls /dev/cu.usbserial*
        ```

        You should see an entry similar to:

        ```
        /dev/cu.usbserial-0001
        ```
      </Tab>

      <Tab title="Windows">
        Open **Device Manager** (press `Win + X` and select **Device Manager**), then expand the **Ports (COM & LPT)** section. Look for an entry like:

        ```
        CP210x USB to UART Bridge (COM3)
        ```

        Note the COM port number — you'll need it when configuring your IDE or CLI.
      </Tab>
    </Tabs>
  </Step>

  <Step title="Install ANX CLI">
    The ANX CLI is the primary tool for flashing firmware, reading serial output, and managing connected devices. Install it using the ANX installer script for your platform, then verify the installation:

    ```bash theme={null}
    anx --version
    ```

    A successful install prints the CLI version string, for example:

    ```
    anx version 2.4.1 (build 20240910)
    ```

    If the command is not found, ensure the ANX CLI binary directory is on your system `PATH` and open a new terminal session.
  </Step>

  <Step title="Test the Connection">
    With the module still connected, run the device discovery command:

    ```bash theme={null}
    anx device list
    ```

    The CLI scans all available serial ports and prints a table of detected ANX devices:

    ```
    SERIAL              PORT              FIRMWARE
    ANX-0042A7F3C1      /dev/ttyUSB0      v1.3.2
    ```

    The output confirms the module's serial number and currently flashed firmware version. Your dev module is now fully set up and ready for firmware development.
  </Step>
</Steps>

## Troubleshooting

If you run into issues during setup, expand the relevant section below for targeted fixes.

<Accordion title="Module not detected by the CLI or operating system">
  Work through these checks in order:

  1. Try a different USB-C cable — charge-only cables have no data lines and will power the board but never enumerate a serial port.
  2. Try a different USB port on your computer, preferably one connected directly to the motherboard rather than a hub.
  3. On Windows, open Device Manager and look for an **Unknown device** or **Other devices** entry. If present, the driver did not install correctly — reinstall using `winget install SiliconLabs.CP210xDriver` and restart.
  4. Hold the **BOOT** button on the module while plugging in the USB cable to force the bootloader into DFU mode, then run `anx device list` again.
</Accordion>

<Accordion title="Wrong or unexpected COM port assigned on Windows">
  Windows assigns COM port numbers dynamically. If the number changes between sessions, pin it to a fixed value:

  1. Open **Device Manager** and right-click the **CP210x USB to UART Bridge** entry.
  2. Select **Properties → Port Settings → Advanced**.
  3. Change the **COM Port Number** to your preferred value and click **OK**.

  Update any IDE or CLI configuration files to match the new fixed port number.
</Accordion>

<Accordion title="Driver installation failure on Windows">
  If the winget install fails or the driver shows an error code in Device Manager:

  1. Download the installer directly from the [Silicon Labs CP210x downloads page](https://www.silabs.com/developers/usb-to-uart-bridge-vcp-drivers) and run it as Administrator.
  2. Disable **Driver Signature Enforcement** temporarily if you are on an older Windows 10 build: restart, press `F8` during boot, and select **Disable Driver Signature Enforcement** from the advanced startup options.
  3. After successful installation, re-enable driver signature enforcement and restart normally.
</Accordion>
