jtrotta / monoserialport Goto Github PK
View Code? Open in Web Editor NEWSerial port library for .Net / Mono, that can be used with virtual usb port
License: MIT License
Serial port library for .Net / Mono, that can be used with virtual usb port
License: MIT License
This repository should contain a license file
https://help.github.com/articles/licensing-a-repository/
This would help to clarify if and how other users are allowed to use this library in private/commercial projects
Thanks for your share of MonoSerialPort.
Is it possible to use this library to create virtual serial port device ? Just like the Virtual COM Port Driver tool on Win10?
I'm trying to connect to serial port by USB Sinlabs converter, but it doesn't work
var devices = usbManager.DeviceList.Values.ToList();
if (devices != null && devices.Count > 0)
{
foreach (var device in devices)
{
if (device.ProductName.Contains("CP2102"))
{
if (!usbManager.HasPermission(device))
{
var pi = Android.App.PendingIntent.GetBroadcast(context, 0, new Android.Content.Intent("ACTION_USB_PERMISSION"), 0);
context.RegisterReceiver(null, new Android.Content.IntentFilter("ACTION_USB_PERMISSION"));
usbManager.RequestPermission(device, pi);
}
else {
var _serialPort = new SerialPortInput(device.DeviceName, 115200, MonoSerialPort.Port.Parity.None, 8, MonoSerialPort.Port.StopBits.One, MonoSerialPort.Port.Handshake.None, true);
serialPort.Connect();
}
}
}
}
I set IsVirtual both "True" and "False", but it doens't work.
The deviceName is "/dev/bus/usb/001/002"
Microsoft.Windows.Compatibility
Mono.Posix.NETStandard
thanks for sharing! this sore my question
I want to use SerialPort do more controls, thanks!
I'm trying to read messages from a serial connection that sends small messages quite rapidly. The 100ms wait in your reader loop will prevent (near) real time messaging. In my opinion this should be reduced drastically or removed altogether.
For testing purposes i set it to two (Line 296 of SerialPortInput), and CPU usage didn't change.
below is my code
SerialPortInput _serialPort = new SerialPortInput();
_serialPort.SetPort("COM3", 9600);
_serialPort.ConnectionStatusChanged += SerialPortLib2_ConnectionStatusChanged;
_serialPort.MessageReceived += SerialPortLib2_MessageReceived;
if (!_serialPort.IsConnected) {
_serialPort.Connect();
}
after open COM3 success it close self and open again on loop(close and open). could you help me? it's a bug or something wrong?
my environment is Windows 64bit and usb serial port.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.