> ## 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.

# ANX Labs Frequently Asked Questions

> Answers to common questions about ANX Labs hardware compatibility, firmware updates, development environments, and purchasing additional modules.

This page answers the most frequently asked questions about ANX Labs products. If your question is not listed here, check the [common issues guide](/troubleshooting/common-issues) for step-by-step diagnostics, or reach out through the support channels listed at the bottom of this page.

<Accordion title="Can I use the ANX dev module with Arduino IDE?">
  Yes. ANX Labs publishes an official Arduino board support package (BSP) that adds the ANX dev module to the Arduino IDE board manager.

  <Steps>
    <Step title="Add the BSP URL to Arduino IDE">
      Open **File → Preferences** (or **Arduino IDE → Settings** on macOS). Paste the following URL into the **Additional boards manager URLs** field:

      ```text theme={null}
      https://boards.anx-labs.io/package_index.json
      ```
    </Step>

    <Step title="Install the package">
      Open **Tools → Board → Boards Manager**, search for **ANX Labs**, and click **Install**.
    </Step>

    <Step title="Select the board and port">
      Go to **Tools → Board**, choose your ANX module from the ANX Labs section, then select the correct port under **Tools → Port**.
    </Step>
  </Steps>

  <Note>
    ANX Labs recommends using the ANX CLI and SDK for production development — the Arduino BSP is best suited for quick prototyping and evaluation.
  </Note>
</Accordion>

<Accordion title="Does the module support 5 GHz Wi-Fi?">
  No. The ANX dev module supports **2.4 GHz Wi-Fi only** (802.11 b/g/n). It cannot associate with a 5 GHz access point.

  Many modern routers broadcast both bands under the same network name (SSID). When this happens, your phone or laptop may connect on 5 GHz while the ANX module fails silently because it cannot see the 5 GHz band at all.

  To resolve this, configure your router to broadcast the 2.4 GHz band on a **separate, dedicated SSID** (for example, `MyNetwork_2G`) and connect the ANX module to that SSID.

  <Tip>
    2.4 GHz has better range and wall penetration than 5 GHz, making it a practical choice for IoT deployments even if your router supports both bands.
  </Tip>
</Accordion>

<Accordion title="What is the maximum current I can draw from a GPIO pin?">
  Each GPIO pin can **source or sink up to 12 mA**. The total simultaneous current across all GPIO pins must not exceed **50 mA**.

  For loads that exceed 12 mA — such as LEDs at full brightness, relay coils, or small motors — use a transistor or MOSFET driver circuit controlled by the GPIO pin rather than powering the load directly.

  <Warning>
    Exceeding the 12 mA per-pin or 50 mA aggregate limits can permanently damage the module's GPIO circuitry. Always calculate your load current before connecting a peripheral directly to a GPIO pin.
  </Warning>

  A standard small-signal NPN transistor (e.g., 2N2222 or BC547) is sufficient for most low-power switching applications. The GPIO drives the transistor base through a current-limiting resistor, and the transistor switches the load independently.
</Accordion>

<Accordion title="Can I power the module from a LiPo battery?">
  Yes. The ANX dev module includes an onboard LiPo charger and power management circuit, making it well suited for battery-powered applications.

  Connect a **single-cell 3.7 V LiPo battery** to the **BAT+** and **BAT-** pads on the underside of the module. When USB is also connected, the onboard charger (**MCP73831**) automatically charges the battery at **200 mA**.

  <CardGroup cols={2}>
    <Card title="Battery connection pads" icon="battery-full">
      **BAT+** and **BAT-** are exposed pads on the module underside. Use 22–24 AWG wire and a JST-PH 2.0 connector for a secure, removable connection.
    </Card>

    <Card title="Charge rate" icon="plug">
      The MCP73831 charges at 200 mA by default. Do not connect a battery with a capacity below 200 mAh, as this may stress the cell.
    </Card>
  </CardGroup>

  <Warning>
    Always use a LiPo battery with a built-in protection circuit (PCB). Unprotected cells can enter thermal runaway if over-discharged or short-circuited.
  </Warning>
</Accordion>

<Accordion title="How do I update the ANX CLI itself?">
  Run the built-in update command to fetch and install the latest CLI version:

  ```bash theme={null}
  anx update
  ```

  The CLI checks for updates automatically each time you run a command while connected to the internet, and prints a notice when a newer version is available. Running `anx update` applies the update immediately.

  To check your current CLI version without triggering an update:

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

  <Tip>
    Keep the CLI up to date to ensure compatibility with the latest ANX OS firmware images and new module hardware revisions.
  </Tip>
</Accordion>

<Accordion title="Is the ANX SDK open source?">
  The ANX SDK is **source-available** under the **ANX Labs Developer License**.

  <CardGroup cols={3}>
    <Card title="Permitted" icon="circle-check">
      Read, modify, and use the SDK in your own applications — commercial and personal projects both included.
    </Card>

    <Card title="Restricted" icon="circle-xmark">
      Redistributing the SDK as a standalone package or library requires a separate commercial license from ANX Labs.
    </Card>

    <Card title="License file" icon="file-lines">
      The full license text is included in the `LICENSE` file at the root of the SDK repository.
    </Card>
  </CardGroup>

  If you need to redistribute the SDK or embed it in a product you sell, contact [support@anx-labs.io](mailto:support@anx-labs.io) to discuss commercial licensing terms.
</Accordion>

<Accordion title="What happens if an OTA update fails mid-update?">
  ANX OS uses a **dual-partition scheme** to make OTA updates safe by design. The update image is written to the **inactive partition** while the current firmware continues running normally on the active partition.

  Only after the new firmware is fully written and passes its startup health check does the bootloader switch the active partition pointer. If anything goes wrong — a failed hash check, a power loss, or a connectivity drop — the device automatically reboots back into the **previous stable firmware**.

  You never end up with a bricked device from a failed OTA update. Retry the update at any time with:

  ```bash theme={null}
  anx ota update --retry
  ```
</Accordion>

<Accordion title="How do I factory reset the module?">
  To restore the module to its out-of-box configuration, perform a hardware factory reset:

  <Steps>
    <Step title="Hold the BOOT button for 10 seconds">
      Press and hold the **BOOT** button. Keep holding it — do not release early.
    </Step>

    <Step title="Watch for the LED confirmation">
      After 10 seconds, the status LED flashes **red three times**. Release the button.
    </Step>

    <Step title="Module reboots">
      The module reboots automatically. `config.json` and all user files stored in the flash file system are erased.
    </Step>
  </Steps>

  <Note>
    A factory reset erases `config.json` and user data from the flash file system, but it does **not** change the firmware. Your installed ANX OS version remains intact. To also reinstall firmware, run `anx flash --latest` after the reset.
  </Note>
</Accordion>

<Accordion title="Can I run my own RTOS tasks alongside ANX OS?">
  Yes. ANX OS is built on **FreeRTOS**, and you can create additional tasks using the standard FreeRTOS API from within `app_main()`.

  ```c theme={null}
  #include "freertos/FreeRTOS.h"
  #include "freertos/task.h"

  void my_task(void *pvParameters) {
      while (1) {
          // Your task logic here
          vTaskDelay(pdMS_TO_TICKS(100));
      }
  }

  void app_main(void) {
      xTaskCreate(
          my_task,          // Task function
          "my_task",        // Task name (for debugging)
          2048,             // Stack size in bytes
          NULL,             // Task parameters
          tskIDLE_PRIORITY + 2, // Priority
          NULL              // Task handle (optional)
      );
  }
  ```

  <Warning>
    Assign your tasks a priority **lower than `tskIDLE_PRIORITY + 4`** to avoid starving the ANX OS system tasks, which handle Wi-Fi, MQTT, and OTA. Assigning a higher priority can cause connectivity failures or watchdog resets.
  </Warning>

  Refer to the [FreeRTOS documentation](https://www.freertos.org/Documentation/RTOS_book.html) for a full reference on task management, queues, and synchronization primitives.
</Accordion>

<Accordion title="Where can I get support?">
  ANX Labs offers several support channels depending on your needs:

  <CardGroup cols={3}>
    <Card title="GitHub Issues" icon="github" href="https://github.com/anx-labs">
      File a bug report or feature request on the ANX Labs GitHub. Include your CLI version, OS firmware version, and steps to reproduce.
    </Card>

    <Card title="Community Discord" icon="discord" href="https://discord.gg/anx-labs">
      Join the developer community at `discord.gg/anx-labs` for real-time help, project showcases, and announcements.
    </Card>

    <Card title="Commercial Support" icon="envelope" href="mailto:support@anx-labs.io">
      For priority support, SLA-backed responses, and production deployment assistance, email `support@anx-labs.io`.
    </Card>
  </CardGroup>

  When filing an issue or asking for help, include the output of `anx --version` and `anx device info` — this helps the team diagnose your problem faster.
</Accordion>
