--- title: "COM Ports" slug: "com-ports" updated: 2026-09-17T10:39:37Z published: 2026-09-17T10:39:37Z canonical: "support.dise.com/com-ports" --- > ## Documentation Index > Fetch the complete documentation index at: https://support.dise.com/llms.txt > Use this file to discover all available pages before exploring further. # COM Ports The TemplateFramework supports platform-independent serial-communication through the same API. > [!WARNING] > Currently Linux, Windows, and BrightSign are supported. Nexmosphere devices can be connected to a Tizen 7+ device via a COM port. The API has a single method in TemplateController, **connectToSerial()**. This accepts a COMOptions object: ```typescript export interface COMPortOptions {  port: number | string;  baudSpeed: number;  byteSize: number;  parity: number;  stopBits: number;  minSendInterval?: number; // ms between send commands. Optional. } ``` **connectToSerial()** returns a **ICOMConnector** object: ```typescript interface ICOMConnector {  portId: number;  onData?: (data: any) => void;  onClose?: () => void;  send(data: string): Promise;  close(): void; } ``` Behavior on different platforms may vary. For example, onClose may not always be called until the next attempted send(). Whether calls to close() will in turn call back onClose is undefined. Currently text payloads are primarily supported but converting back and forth to an Uint8Array can be done: ```typescript function DataArrayAsString(arr: Uint8Array): string {    return [...arr].map((v) => String.fromCharCode(v)).join(''); } function StringAsDataArray(str: string): Uint8Array {    const res = new Uint8Array(str.length);    for (let i = 0; i < str.length; i++)        res.set([str.charCodeAt(i)], i);    return res; } ``` > [!NOTE] > Example: > > [See the ‘Nexmosphere’ sample project.](https://bitbucket.org/diseinc/sampletemplates/src/main/) ## Developing a COM-dependent Template using PlayerSimulator A NodeJS-project is available that exposes COM-traffic to and from a WebSocket-server. The [PlayerSimulator](/dise/docs/player-simulator) supports this on ‘ws://localhost:7501’. This module is available here - [https://bitbucket.org/diseinc/com2ws.](https://bitbucket.org/diseinc/com2ws.) If real-hardware is unavailable to test on the COM0COM driver can be used to emulate a "Null modem cable" in combination with COM2WS. The signed COM0COM can be found here - [https://code.google.com/archive/p/powersdr-iq/downloads](https://code.google.com/archive/p/powersdr-iq/downloads).