Giter Site home page Giter Site logo

monoserialport'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  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

monoserialport's Issues

ReaderTask loop is too slow

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.

Thanks

thanks for sharing! this sore my question

Unable to connect to Sinlab CP2102 in UnoPlatform Android

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"

open port prolem

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.

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.