Serial Server

SerialServer is a simple HTTP server for Windows that allows you to send and receive commands via HTTP for a serial-attached device (such as an Arduino)

How to use

Before you begin

First make sure your serial device can communicate with Windows by installing the necessary drivers. The device must appear as a COM port in Task Manager.

Configuration

The SerialServer.exe.config file allows you to configure several important parameters including the COM port, baud rate, and web server URL/port number. Each parameter is documented in the file.

Note that due to system security requirements, you will only be able to listen on localhost unless you manually add a specific URL via the netsh command. Alternatively you can run SerialServer.exe as an administrator to listen across the network.

Running the server

To start Serial Server, simply double-click the SerialServer.exe file or invoke it from your script. The program will connect to your device and keep the connection open until it is terminated. The console will display which URL the server is accessible at and which COM port it is connected to. As you send it HTTP commands, information will also be printed to the console. If you navigate to the default page in a web browser, you will be able to send it commands via a simple text box and receive the output.

Commands

Serial commands are entered by performing a GET request to /?cmd=. This command is sent directly to your serial device, so its behavior depends entirely on how the device handles it. The following control commands are also available, which are entered directly.

/ping

Returns a "Server up" message

/flush

Flushes the input and output buffers. USeful if your serial device was connected after the server was already running.

/stop

Stops the server

License

You are allowed to use Serial Server with virtually no restrictions. However, you may NOT use this software as part of your own projects or compilations without permission from the developer.

Source code is available to download at the download link if you would like to further customize the software to your particular needs.

Comments (0)

Leave a comment

 
three plus two is (Huh?)
Comment moderation is enabled.
Your comment will appear on the page after it has been reviewed.