> This page is for Firmware, version 3.2.
> For other versions, use one of these documentation indexes:
> - 4.0 (default): https://docs.ouster.com/sensor-docs/firmware/4.0/llms.txt
> - 3.2: https://docs.ouster.com/sensor-docs/firmware/3.2/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.ouster.com/sensor-docs/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.ouster.com/sensor-docs/_mcp/server.

# Get all Multipurpose IO (MIO) channel states

GET http://os-992244000006.local/api/v1/sensor/mio

Get the current state of all Multipurpose IO (MIO) hardware channels including aliases, configuration, and pin values. MIO channels provide configurable input/output functionality for external hardware integration.

### MIO Channel Availability

The availability of MIO channels for general-purpose use is determined by the sensor's configuration settings. When a channel is used for a specific function (like time synchronization), it is not available for general MIO operations.

* __Channel 0 (SYNC_PULSE_IN):__ This channel is reserved for time synchronization when `timestamp_mode` is set to `TIME_FROM_SYNC_PULSE_IN`. In this mode, it is not available as a general-purpose MIO. To enable it for general use, set `timestamp_mode` to a different value (e.g., `TIME_FROM_INTERNAL_OSC` or `TIME_FROM_PTP_1588`).

* __Channel 1 (MULTIPURPOSE_IO):__ This channel's function is controlled by `multipurpose_io_mode`. It is available for general-purpose MIO use only when `multipurpose_io_mode` is set to `OFF`. In all other modes (e.g., `INPUT_NMEA_UART`, `OUTPUT_FROM_SYNC_PULSE_IN`), it is reserved for its specific function.

Reference: https://docs.ouster.com/sensor-docs/firmware/api-reference/ouster-http-api/sensor-metadata/get-mio

## Response

### 200

Multipurpose IO hardware states for all channels

- `input_bitmask` (uint, required) — Input pin states as a binary bitmask (read-only). The least significant bit (LSB) maps to MIO0, with each subsequent bit mapping to higher channel indices.
- `enable_bitmask` (uint, required) — MIO enable states as a binary bitmask. Indicates which channels are enabled for MIO operation. The least significant bit (LSB) maps to MIO0, with each subsequent bit mapping to higher channel indices.
- `channels` (list of MioChannel, required) — Per-channel detailed information

## Errors

### 500 Internal Server Error

Unexpected response format from sensor

- `any`

## Types

### MioChannel

- `aliases` (list of string, required) — Alternative names for the channel
- `input` (boolean, required) — Current input state of the channel (read-only).
- `enable` (boolean, required) — Whether the channel is enabled for MIO operation.
- `config` (enum, required) — Current channel configuration mode. 'OTHER' indicates the channel is not available for MIO operation. If enable is not set and config is OTHER, the channel is used by another service.
  - Allowed values: `INPUT`, `OTHER`

## Examples

**Response**

```json
{
  "input_bitmask": 1,
  "enable_bitmask": 3,
  "channels": [
    {
      "aliases": [
        "MIO0",
        "SYNC_PULSE_IN"
      ],
      "input": false,
      "enable": true,
      "config": "OTHER"
    },
    {
      "aliases": [
        "MIO1",
        "MULTIPURPOSE_IO"
      ],
      "input": true,
      "enable": true,
      "config": "INPUT"
    }
  ]
}
```

**SDK Code**

```python
import requests

url = "http://os-992244000006.local/api/v1/sensor/mio"

response = requests.get(url)

print(response.json())
```

```javascript
const url = 'http://os-992244000006.local/api/v1/sensor/mio';
const options = {method: 'GET'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "http://os-992244000006.local/api/v1/sensor/mio"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("http://os-992244000006.local/api/v1/sensor/mio")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("http://os-992244000006.local/api/v1/sensor/mio")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'http://os-992244000006.local/api/v1/sensor/mio');

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("http://os-992244000006.local/api/v1/sensor/mio");
var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "http://os-992244000006.local/api/v1/sensor/mio")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```