Giter VIP home page Giter VIP logo

udp-sniffer's Introduction

UDP COM (serial) port Sniffer/Proxy

GitHub release license GoDoc Go Report Card

UDP COM port Sniffer/Proxy is used for debugging communication between apps and devices.

Tool receives and sends UDP traffic logging it to the console in the HEX format.

.-----.                        .-------.               .--------.                      .---------.         .--------.
| App |------UDP---->[proxyApp]|  App  |--+-channel--->| Device |------UDP---->[device]| com2tcp |---COM-->| Device |
|     |[app]<----UDP-----------| proxy |<-+-channel-+--| proxy  |[proxyDevice]<--UDP---|         |<--COM---|        |
'-----'                        '-------'  |         |  '--------'                      '---------'         '--------'
                                          v         v
                                         .-----------.
                                         | Standard  |
                                         | text      |
                                         | console   |
                                         '-----------'

App and Device proxies are in this tool.

App, proxyApp, device, and proxyDevice are UDP endpoints (IP + port). App endpoint is autodetected from the first packet as in most cases it's dynamic. Other endpoints are input for the tool.

Com2tcp is used to add UPD interface to COM device. Manual: http://com0com.sourceforge.net/doc/UsingCom0com.pdf

Communication between App proxy and Device proxy is done using Go channels (toDevice, fromDevice in the code).

Usage

For usage information execute udp-sniffer -h:

$ udp-sniffer -h
Usage of udp-sniffer:
  -deviceIP string
		IP of device (default "127.0.0.1")
  -devicePort int
		UPD port of device (default 11000)
  -proxyAppIP string
		IP for this tool to communicate with device app
  -proxyAppPort int
		UPD port for this tool to communicate with app (default 11000)
  -proxyDeviceIP string
		IP for this tool to communicate with device
  -proxyDevicePort int
		UPD port for this tool to communicate with device (default 11010)
  -v	Show app version

Here is an example of session:

$ udp-sniffer
2016/01/05 03:08:03 Started...
2016/01/05 03:08:03 appProxy: >> listen on :11000 and send to unknown yet
2016/01/05 03:08:03 appProxy: app's IP and port will be autodetected from the first data packet
2016/01/05 03:08:03 deviceProxy: << listen on :11010 and send to 192.168.1.34:11000
2016/01/05 03:08:05 Last app address: 192.168.1.35:11000
2016/01/05 03:08:05 >> 00 00 0E 12
2016/01/05 03:08:05 << 00 00 11 00
^C2016/01/05 03:08:08 Stopped...

Installation

You can download binaries and packages compatible with your operation system.

To compile you need the Golang v1.12. Run make (or just go build) command in the project folder.

Status

This project is feature complete. No future development is expected.

Support

For me it's one time tool. So, no active support or development is planned. I will try to apply PRs if they will be created.

Similar apps for COM ports

udp-sniffer's People

Contributors

stepin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

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.