> For the complete documentation index, see [llms.txt](https://docs.ceruleansonar.com/c/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ceruleansonar.com/c/cerulean-ping-protocol/general-packet-definitions/set_sync_channel_number.md).

# SET\_SYNC\_CHANNEL\_NUMBER

### ID: 170

When operating multiple sonars together, it is usually important for them to ping simultaneously so that they do not interfere with each other. This can be accomplished using this SET\_SYNC\_CHANNEL\_NUMBER command to assign a channel number and a number of channels. Channel number 0 is the "master," so one of the channels must be assigned number 0 and the others should be assigned sequentially 1, 2, 3 etc.&#x20;

The devices synchronize their pinging via UDP messages. The master device sends a UDP broadcast message on port 51201, so all the devices must be on the same subnet. The "slave" devices acknowledge their readiness with a UDP message back to the specific master. This usually achieves synchronization within less than 100 uSec.

{% hint style="info" %}
NOTE: This functionality is currently only implemented on Omniscan, but the intention is to add support for other Ethernet capable sonars.
{% endhint %}

<table><thead><tr><th width="191">Data Type</th><th width="219">Name</th><th>Description</th></tr></thead><tbody><tr><td>u8</td><td>channel_number</td><td>channel number assigned to this device</td></tr><tr><td>u8</td><td>number_of_channels</td><td>number of sonars to be synchronized</td></tr></tbody></table>

Response is ACK. See [SYNC\_CHANNEL\_NUMBER](/c/cerulean-ping-protocol/general-packet-definitions/sync_channel_number.md) if you need to query a device for it's assigned sync channel number.&#x20;


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.ceruleansonar.com/c/cerulean-ping-protocol/general-packet-definitions/set_sync_channel_number.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
