Setting Up MCC USB DAQ Devices

Build an ARM64 container for the MCC Universal Library for Linux (uldaq), pass an MCC USB DAQ device into it, and deploy it on ALPON X5 AI or ALPON X4 through ALPON Cloud with a /dev/bus/usb device mapping.

Set Up MCC USB DAQ Devices on ALPON

Build an ARM64 development container for the MCC Universal Library for Linux (UL for Linux, uldaq), pass an MCC USB DAQ device into it, and deploy it on your ALPON X5 AI or ALPON X4 through ALPON Cloud. The container reaches the DAQ through a /dev/bus/usb device mapping, so you can run uldaq scripts against the hardware from a Shell Access session.

ALPON X5 AI ALPON X4 MCC DAQ uldaq USB passthrough
ALPON · Tutorial · Containers · Data acquisition
How do I use an MCC USB DAQ device on ALPON?

Write a Dockerfile that compiles a verified libuldaq release and installs the uldaq Python package, build it for linux/arm64 with docker buildx, test it on your computer with --device=/dev/bus/usb, then push the image to your Sixfab Container Registry. Deploy it from the Applications → Deploy panel on ALPON Cloud with a Read/Write volume mapping /dev/bus/usb to /dev/bus/usb, keep Privileged off unless the bind mount is not enough, and use Shell Access to run uldaq commands against the DAQ.

Overview

Measurement Computing (MCC) USB DAQ devices are USB data-acquisition modules for reading analog and digital signals. The MCC Universal Library for Linux (uldaq) is the C library and Python binding that drives them. This guide packages that library into an ARM64 container, gives the container access to the USB bus, and deploys it on an ALPON X5 AI or ALPON X4 so acquisition scripts run on the edge device and stay manageable through ALPON Cloud.

The steps below are identical on ALPON X4 and ALPON X5 AI. Confirm that your exact DAQ model is supported by the selected UL for Linux release before building.

Before you start
  • MCC USB DAQ device — ensure the device is compatible with the uldaq library, and plug it into a USB port on the ALPON.
  • An ALPON X5 AI or ALPON X4 registered on ALPON Cloud.
  • Docker (with buildx) installed on your personal computer to build and test the image before deploying it.
  • The SHA-256 of the UL for Linux release archive you intend to build — published by the project or independently verified.

New to container deployment? Start with Containerize Apps for ALPON.

  1. 1

    Prepare UL for Linux

    Use a versioned base image and verify the downloaded UL for Linux release archive. Save the following as Dockerfile in an empty project directory. Supply the SHA-256 published or independently verified for the selected release at build time through the ULDAQ_SHA256 build argument:

    Dockerfile
    FROM debian:bookworm-slim
    
    ARG ULDAQ_VERSION=1.2.1
    ARG ULDAQ_SHA256
    
    RUN test -n "$ULDAQ_SHA256" \\
        && apt-get update \\
        && apt-get install -y --no-install-recommends \\
           ca-certificates build-essential curl libusb-1.0-0-dev \\
           python3 python3-pip python-is-python3 \\
        && rm -rf /var/lib/apt/lists/*
    
    WORKDIR /opt/uldaq
    RUN curl -fL \\
          "https://github.com/mccdaq/uldaq/releases/download/v${ULDAQ_VERSION}/libuldaq-${ULDAQ_VERSION}.tar.bz2" \\
          -o /tmp/uldaq.tar.bz2 \\
        && echo "${ULDAQ_SHA256}  /tmp/uldaq.tar.bz2" | sha256sum -c - \\
        && tar -xjf /tmp/uldaq.tar.bz2 --strip-components=1 \\
        && rm /tmp/uldaq.tar.bz2 \\
        && ./configure \\
        && make -j"$(nproc)" \\
        && make install \\
        && ldconfig \\
        && pip3 install --no-cache-dir --break-system-packages "uldaq==${ULDAQ_VERSION}"
    
    CMD ["sleep", "infinity"]

    The build fails early if ULDAQ_SHA256 is empty or the archive checksum does not match, so an unverified library never ends up in the image. The sleep infinity command keeps the container alive so you can open a shell into it later.

  2. 2

    Build and test the Docker image locally

    To ensure the container is fully compatible with your MCC USB DAQ device, a local test is essential. This allows any necessary adjustments to be made before deployment. Build and test the image on your personal computer before pushing it to ALPON Cloud; Docker must be installed to build and run it.

    Build the Docker image

    Run the following command from the directory that contains the Dockerfile:

    bash · build the image
    docker buildx build --load --platform linux/arm64 \\
      --build-arg ULDAQ_SHA256=<verified-sha256> \\
      -t uldaq-container:<version> .

    Run the container locally

    To test the container with your MCC USB DAQ device plugged into your computer, use the following command:

    bash · run with USB access
    docker run --rm --device=/dev/bus/usb -it uldaq-container:<version>

    The --device option grants access to the USB bus without granting the container all host capabilities. If access fails, verify host udev permissions and the DAQ device path before considering broader privileges.

    Verify that the container can interact with the DAQ device by running a test script or uldaq commands inside it.

  3. 3

    Build and push to the Sixfab Container Registry

    Once the test script or uldaq commands confirm the container's functionality, prepare it for deployment on the ALPON. The image must be built on your personal computer for the ARM64 architecture:

    bash · build for linux/arm64
    docker buildx build --load --platform=linux/arm64 \\
      --build-arg ULDAQ_SHA256=<verified-sha256> \\
      -t uldaq-container:<version> .

    Push to the Sixfab Container Registry

    Log in to ALPON Cloud, open the Sixfab Container Registry page, click + Add Container, and follow the prompts to push uldaq-container:<version> to the registry.

    Deploy Applications

    Visit the Deploy Applications page for all the necessary details on pushing your container image to the Sixfab Container Registry.

  4. 4

    Deploy the container on ALPON

    Once the container image is uploaded to the Sixfab Container Registry, open your device in ALPON Cloud, go to the Applications section, and click + Deploy. In the Deploy Container window, use these settings:

    Container Name The application name, e.g. uldaq-container.
    Image The uldaq container image and tag you pushed to the Sixfab Container Registry.
    Volumes Click + Add More in the Volumes section and add the USB bus mapping in the table below.
    Privileged Start with Privileged disabled. Enable it only if the reviewed driver workflow cannot operate through the /dev/bus/usb bind mount and the broader host-access risk is acceptable.
    Read/WriteLocal PathTarget Path
    Read/Write/dev/bus/usb/dev/bus/usb
    Use Privileged mode deliberately

    The /dev/bus/usb volume is the ALPON Cloud equivalent of the --device=/dev/bus/usb flag you tested with in step 2 and is normally all a USB DAQ needs. Privileged mode gives the container access to every host device, so treat it as a last resort rather than a default.

    ALPON Cloud Deploy Container window with the uldaq container image selected and the /dev/bus/usb volume mapped
    The Deploy Container window in ALPON Cloud with the uldaq image and the /dev/bus/usb volume configured.

    Click + Deploy to launch the container on the device.

  5. 5

    Verify and use the application

    After deployment, go back to the Applications section of your asset on ALPON Cloud, locate the deployed container, and click the Shell Access button to open a terminal session inside it.

    ALPON Cloud Applications section showing the running uldaq container and its Shell Access button
    Open a Shell Access session on the running uldaq container from the Applications section.

    In the shell, run uldaq commands or your acquisition scripts to interact with the MCC USB DAQ device connected to the ALPON — exactly as you did during the local test in step 2.

Ready when…
  • The uldaq-container application shows as running in the Applications section.
  • A Shell Access session opens inside the container.
  • Your uldaq test script or commands see and read the MCC USB DAQ device through /dev/bus/usb.

You have set up and deployed the MCC USB Series DAQ system on the ALPON using uldaq and Docker. This setup enables reliable data acquisition and lets you manage and monitor the system through ALPON Cloud. Regular updates and testing are recommended to ensure optimal performance. For library details and examples, see the MCC Universal Library for Linux repository.

Production image policy: Replace floating :latest references with a reviewed immutable tag or digest, then record the selected version for rollback.


Did this page help you?