virtual-serial-port

Communication speed over USB (PC/Arduino) using SerialPort in C# seems to “clip”

三世轮回 提交于 2021-01-29 06:45:36
问题 Prepare for a lengthy explanation - sorry. I'm building an application in C#, using Visual Studio 2019, that will communicate with some Arduino MEGA 2560 R3 devices. The connection is through USB Serial (if I'm not mistaken, this is USB CDC, right?). Communication runs fine over all kinds of baudrates, even up to 2000000. To make sure that my Arduino can "follow" the command rate sent by my PC, I'm using an ACK-protocol, which is as simple as my Arduino confirming each command with the

Create a virtual serial port connection over TCP

邮差的信 提交于 2021-01-20 15:33:39
问题 I am developing an application that should be able to write to a virtual serial port and receive data through the same port from remote clients over network. The application runs on a linux server. I am new in using serial ports and I have some questions on this topic. Clients The client can establish a TCP connection to a server. When we setup a client, we have to provide the IP address of the server, a tcp port (usually 8080) and a virtual com port. The client then will automatically try to

Create a virtual serial port connection over TCP

梦想与她 提交于 2021-01-20 15:32:28
问题 I am developing an application that should be able to write to a virtual serial port and receive data through the same port from remote clients over network. The application runs on a linux server. I am new in using serial ports and I have some questions on this topic. Clients The client can establish a TCP connection to a server. When we setup a client, we have to provide the IP address of the server, a tcp port (usually 8080) and a virtual com port. The client then will automatically try to

Create a virtual serial port connection over TCP

北城以北 提交于 2021-01-20 15:32:11
问题 I am developing an application that should be able to write to a virtual serial port and receive data through the same port from remote clients over network. The application runs on a linux server. I am new in using serial ports and I have some questions on this topic. Clients The client can establish a TCP connection to a server. When we setup a client, we have to provide the IP address of the server, a tcp port (usually 8080) and a virtual com port. The client then will automatically try to

SerialPort Sniffing

和自甴很熟 提交于 2020-01-23 02:57:26
问题 I have a device that connects to pc via USB, which gets mapped to virtual serial port by driver and a software, that connects to that serial port and allows me to manage the device. I don't know what protocol software uses to connect with the device. I could figure out the protocol by looking at communication between device and software, but the thing with serial ports is that once software connects to serial port, there is not way other software could connect to that port too (which makes

Using Linux pseudoterminal to test QSerialPort

戏子无情 提交于 2020-01-02 16:23:12
问题 I would like to test an application using Qt serial ports with a pseudoterminal. According to the man pages I implemented: // open master QSerialPort master("/dev/ptmx"); master.open(QSerialPort::ReadWrite); int master_fd = master.handle(); // get device name of slave pseudoterminal constexpr size_t PTSNAME_BUFFER_LENGTH = 128; char ptsname_buffer[PTSNAME_BUFFER_LENGTH]; if (ptsname_r(master_fd, ptsname_buffer, PTSNAME_BUFFER_LENGTH) != 0) return 0; // grant access to the slave if (grantpt

Pyserial does not play well with virtual port

放肆的年华 提交于 2019-12-31 22:48:11
问题 Motivation I want to start leraning how to use the python library Pyserial. It seems like a really nice library that works for a lot of people. I want to use it for an upcoming project in which I have to automate serial communications. Environment I'm running Ubuntu 15.04. I'm using Python 2.7. Setting up virtual ports I don't currently have a device that I can communicate with over a serial port. I'm using the socat application to create two virtual ports that are connected to each other

Virtual Serial Port for Linux

≡放荡痞女 提交于 2019-12-27 11:07:34
问题 I need to test a serial port application on Linux, however, my test machine only has one serial port. Is there a way to add a virtual serial port to Linux and test my application by emulating a device through a shell or script? Note: I cannot remap the port, it hard coded on ttys2 and I need to test the application as it is written. 回答1: You can use a pty ("pseudo-teletype", where a serial port is a "real teletype") for this. From one end, open /dev/ptyp5 , and then attach your program to

Accessing Bluetooth virtual COM port on Windows without manual pairing

好久不见. 提交于 2019-12-23 15:08:07
问题 I need to connect to a Bluetooth device through virtual COM port created in Windows. It's easy when the port has been already created during manual pairing procedure. But I would like my application to relieve an user from the manual pairing of a device. I would like to present all devices in the range, allow user to chose one, and then create virtual COM port connected with the selected device. I'm not trying to avoid the pairing procedure itself, but rather I would like to invoke it by my

How to discover the virtual COM port name knowing the PID and VID in C#

左心房为你撑大大i 提交于 2019-12-23 05:16:09
问题 I am trying to find the correct way of finding the COM port name if I know the PID and VID. So far I wrote the workaround but i do not believe that there is no more elegant and correct way. BTW (I know that I can use REGEX). This was written only to test the workaround. I know that there is a lots of space for improvements and I am not asking for a code review Any ideas are more than welcome :) namespace ConsoleApplication1 { using System; using System.Globalization; using System.Collections