Giter Site home page Giter Site logo

comm2ip's Introduction

About

The Comm2IP utility application is used to create an interface between a (normal or virtual) serial port and an IP endpoint.

Information / Usage

What is Comm2IP?

The Comm2IP interface is used to create an interface between a (normal or virtual) serial port and an IP endpoint. You can use it, for example, for mapping your COM1 serial port to 127.0.0.1:52000 IP endpoint. Once the link has been created, all traffic sent to the IP endpoint will be forwarded to the serial port and vice verca.

Comm2IP is written in C#/.NET Framework, with a tiny size and minimal dependencies, and targets Win32/64 environments. I've used .NET v4 to build it, however you can safely built it with .NET v2 as well (you may need to modify the log4net configuration or references for .NET v2).

It comes in two flavors:

  • The Comm2IP library, which you can reference and use in your applications.
  • The Comm2IPService standalone application, which can be used either from the command line or as a Windows Service.

Comm2IP library

TODO

Comm2IPService application

Use this to create a Serial-To-IP link without writing code. There are two modes of operation: command line and Windows Service. Run Comm2IPService from the command prompt for syntax help.

Using Comm2IPService from the command prompt

Run:

C:>Comm2IPService -a 127.0.0.1 -p 12000 -c com1 -b 19200

to create a link between COM1 (baud rate @19200) and localhost, port 12000

Using Comm2IPService as a Windows service

The Windows service supports up to 5 links (code configurable).

To alter the links, edit Comm2IPService.exe.config and check the Bindings sections. Each Binding accepts the same syntax that you use for the command line invocation.

Use:

C:>Comm2IPService --install

to install Comm2IPService as a Windows service.

Use:

C:>Comm2IPService --uninstall

to uninstall Comm2IPService Windows service.

License

Licensed under the Apache License, Version 2.0 (the "License"); You may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

comm2ip's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

comm2ip's Issues

Prevent comm2ip from echoing back the commands I send it to the terminal.

I'm running the comm2ip service on a windows 7 box.

I have a comm port connected to a Cisco router's console port.

I connect to the win 7 box running the service via putty and I'm redirected to the comm port connect to the router.

So far the program has been working great except for one thing. It echos back all of the commands I type to the terminal. For example if I type "show interfaces" it will echo "show interfaces" back to the terminal before running the actual command.

Is there a way to disable this behavior?

Supporting more than 5 links?

You say it supports up to 5 links (code configurable).

By "code configurable" do you mean I can just add more bindings in the config file and it will just work or I have to modify the source code and recompile?

If this requires editing the source could you give me a little clue as to where I should make this change?

Thanks a lot! Hope the issue tracker is an ok place to ask this question.

Bombs

At least on Windows 10 64 bit, this bombs if you use any other than 127.0.0.1 as an address. The service mode doesn't show any sign of bombing - but doesn't work.

Serial port not accessible for fast reconnect.

I found a little trouble in case of serial reconnect. If the serialport is closed and opened just after I got a "System.UnauthorizedAccessException" for unavailable port.
To reprocude it, try to do a fast socket reconnection.

Note from SerialPort.Close method msdn docs:

The best practice for any application is to wait for some amount of time after calling the Close method before attempting to call the Open method, as the port may not be closed instantly.

To avoid this I suggest to create a single SerialPort per port and use always the same object for each tcp socket thread. Moreover, I think the Send() method to SerialPort should be synchronized between threads.

Anyway, thanks for this nice library!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.