All Projects → JTrotta → MonoSerialPort

JTrotta / MonoSerialPort

Licence: MIT license
Serial port library for .Net / Mono, that can be used with virtual usb port

Programming Languages

C#
18002 projects

Projects that are alternatives of or similar to MonoSerialPort

termiWin
termiWin: a termios porting for Windows
Stars: ✭ 43 (+2.38%)
Mutual labels:  serial-port, serial-communication
DrawingBotV3
DrawingBotV3 is a software for creating line drawings from Images
Stars: ✭ 161 (+283.33%)
Mutual labels:  serial-port, serial-communication
SuperSimpleTcp
Simple wrapper for TCP client and server in C# with SSL support
Stars: ✭ 263 (+526.19%)
Mutual labels:  mono
Paket.Unity3D
An extension for the Paket dependency manager that enables the integration of NuGet dependencies into Unity3D projects.
Stars: ✭ 42 (+0%)
Mutual labels:  mono
SerialTransfer
Arduino library to transfer dynamic, packetized data fast and reliably via Serial, I2C, or SPI
Stars: ✭ 273 (+550%)
Mutual labels:  serial-communication
micronova controller
Allows you to easily control via MQTT any Micronova equiped pellet stove. (MCZ, Extraflame, Laminox, and many others brands!)
Stars: ✭ 30 (-28.57%)
Mutual labels:  serial-communication
UniversalUnityHooks
A framework designed to hook into and modify methods in unity games via dlls
Stars: ✭ 78 (+85.71%)
Mutual labels:  mono
usbSerialPortTools
provide read and write debugging tools between USB serial port and serial port (UART ,RS232) under Android system
Stars: ✭ 38 (-9.52%)
Mutual labels:  serial-port
epicedit
Epic Edit, Track Editor for Super Mario Kart (SNES)
Stars: ✭ 30 (-28.57%)
Mutual labels:  mono
MonoAGS
AGS (Adventure Game Studio) reimagined in Mono
Stars: ✭ 26 (-38.1%)
Mutual labels:  mono
ably-dotnet
.NET, Xamarin and Mono client library SDK for Ably realtime messaging service
Stars: ✭ 32 (-23.81%)
Mutual labels:  mono
USB Serial Bridge
USB Serial Bridge for STM32F103C8Tx based ARM modules
Stars: ✭ 39 (-7.14%)
Mutual labels:  serial-communication
Nancy
Lightweight, low-ceremony, framework for building HTTP based services on .Net and Mono
Stars: ✭ 7,170 (+16971.43%)
Mutual labels:  mono
uno.toolkit.ui
A set of custom controls for the WinUI and the Uno Platform not offered out of the box by WinUI, such as Card, TabBar, NavigationBar, etc.
Stars: ✭ 45 (+7.14%)
Mutual labels:  mono
PureScript
A C# hot reload framework for Unity3D, based on Mono's MONO_AOT_MODE_INTERP mode.
Stars: ✭ 258 (+514.29%)
Mutual labels:  mono
BlackFire
The general framework for c# developer.
Stars: ✭ 35 (-16.67%)
Mutual labels:  mono
Portable-WebDAV-Library
Moved to codeberg.org - https://codeberg.org/DecaTec/Portable-WebDAV-Library - The Portable WebDAV Library is a strongly typed, async WebDAV client library which is fully compliant to RFC 4918, RFC 4331 and "Additional WebDAV Collection Properties". It is implemented as .NETStandard 1.1 library in oder to be used on any platform supporting .NETS…
Stars: ✭ 45 (+7.14%)
Mutual labels:  mono
SerialPortYmodem
串口通过 YMODEM 协议进行文件传输
Stars: ✭ 132 (+214.29%)
Mutual labels:  serial-port
PCLExt.FileStorage
Portable Storage APIs
Stars: ✭ 35 (-16.67%)
Mutual labels:  mono
Mono.Cecil.Inject
An extension to Mono.Cecil that provides helper methods for simple method injection.
Stars: ✭ 65 (+54.76%)
Mutual labels:  mono

nuget

MonoSerialPort

Serial port library for .Net / Mono, that can be used with virtual usb port

Notice

The project has been renamed from SerialPortLib2 TO MonoSerialPort

Prerequisites

The library is built against .NET Standard 2.0, which means it's supported by different Target Platforms like .NET Framework, .NET Core, Mono and more.
You can find a full list of the supported frameworks (and which version you need) here.

Dependencies

The library depends on two nuget packages:

Both of them are built against .NET Standard. If you don't use the nuget package but instead build the dll's on your own make sure to include those two libraries in your integrating project, otherwise it won't run!

Usage

Just create an instance, if the port is virtual usb, create the object with the second constructor SerialPortInput(true).

var _serialPort = new SerialPortInput(isVirtualPort);
_serialPort.SetPort(port, baudRate);
_serialPort.ConnectionStatusChanged += SerialPort_ConnectionStatusChanged;
_serialPort.MessageReceived += SerialPort_MessageReceived;

  public bool OpenConnection()
  {
      if (!_serialPort.IsConnected)
      {
          return _serialPort.Connect();
      }
      else
          return false;
  }
  
  public void CloseConnection()
  {
      if (_serialPort != null)
      {
          _serialPort.Disconnect();
      }
      _buffer = string.Empty;
  }      
  
  public bool write(byte[] packet)
  {
      return _serialPort.SendMessage(packet);
  }
  
  private void SerialPort_MessageReceived(object sender, MessageReceivedEventArgs args)
  {
      _buffer += Encoding.ASCII.GetString(args.Data);
      *Do something*
  }
  private void SerialPort_ConnectionStatusChanged(object sender, ConnectionStatusChangedEventArgs args)
  {
      if (OnConnecting != null)
          OnConnecting(this, new StateDeviceEventArgs(args.Connected));
  }

MIT License Copyright (c) 2018 Gerardo Trotta

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].