serial-port

serial port thread locking while processing data read from serial port

删除回忆录丶 提交于 2020-01-24 21:35:26
问题 I have an event handler that gets called anytime data is received on a serial port, once this event is called I process an individual byte of data until all data is processed. My question is, how do I make sure that this IBSerialPort_DataReceived event handler doesn't get called again asynchronously while I am stilling processing bytes from the first time it was called, ie I want to guarantee the ProcessByte method is only ever executing on one thread at a time. void IBSerialPort_DataReceived

NodeJS using node-serialport sometimes becomes unresponsive

那年仲夏 提交于 2020-01-24 17:05:40
问题 I'm using NodeJS to connect a barcode scanner to a web front-end. The barcode scanner's serial port runs to the PC (Windows7 pro x64) through a usb-to-serial converter. I'm using node-serialport. This setup is running at an installation in a museum. The computers reboot daily and sometimes the barcode scanner will work fine the whole day, but about 25% of the time it will stop working throughout the day. With stop working I mean that NodeJS isn't relaying the incoming serial stream anymore.

NodeJS using node-serialport sometimes becomes unresponsive

烈酒焚心 提交于 2020-01-24 17:04:55
问题 I'm using NodeJS to connect a barcode scanner to a web front-end. The barcode scanner's serial port runs to the PC (Windows7 pro x64) through a usb-to-serial converter. I'm using node-serialport. This setup is running at an installation in a museum. The computers reboot daily and sometimes the barcode scanner will work fine the whole day, but about 25% of the time it will stop working throughout the day. With stop working I mean that NodeJS isn't relaying the incoming serial stream anymore.

How to call methods on .so library in Android studio

泪湿孤枕 提交于 2020-01-24 05:37:45
问题 Edit: see my first answer. I'd like to use the android serialport api in my project. I have a lot of trouble doing so. There is an enormous amount of conflicting information about how to configure older versions of gradle or how to compile with NDK which both aren't useful. I am completely lost. The only thing I found that is probably correct is the following step: Progress #1. I placed the libserial_port.so in src/main/jnilibs/armeabi. It appears in the apk when I open it as a zip file. But

Can't write multiple times to same port (pyserial)

烈酒焚心 提交于 2020-01-23 12:38:37
问题 Solved: dsrdtr=True shouldn't have been used for software, only on the hardware being used Hi I'm trying to write telegrams to serial port and can send one successfully. If I send more than one nothing happens. The script has to be closed at which point the first telegram is successfully received. The manufacturer suggests a break of 50ms between telegrams, even with breaks >5s it still fails. s = serial.Serial( port='COM3', baudrate=9600, parity=serial.PARITY_ODD, stopbits=serial.STOPBITS

Can't write multiple times to same port (pyserial)

浪尽此生 提交于 2020-01-23 12:37:06
问题 Solved: dsrdtr=True shouldn't have been used for software, only on the hardware being used Hi I'm trying to write telegrams to serial port and can send one successfully. If I send more than one nothing happens. The script has to be closed at which point the first telegram is successfully received. The manufacturer suggests a break of 50ms between telegrams, even with breaks >5s it still fails. s = serial.Serial( port='COM3', baudrate=9600, parity=serial.PARITY_ODD, stopbits=serial.STOPBITS

C# Serial Port Check if Device is Connected

一个人想着一个人 提交于 2020-01-23 05:20:34
问题 I've been working with the SerialPort class a lot lately. Currently I'm trying to figure out the proper way to check if a device is connected to the comm port my application uses. Is there any proper way to check if a device is connected to the comm port? My current method is as follows: while (isReading == true) { try { received += serialPort.ReadExisting(); if (received.Contains('>')) isReading = false; } catch (Exception e) { } if (tick == 10000) if (received == "") { Console.WriteLine("No

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

Access the serial port in a platform-independant way [closed]

两盒软妹~` 提交于 2020-01-22 13:10:07
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 7 years ago . I have a task to create a program, that control a device over RS-232 from a desktop station. Currently I am at the planning stage and need some general help selecting a language and overall approach to the

Why don't serial ports work properly in Unity?

▼魔方 西西 提交于 2020-01-21 07:39:30
问题 I need help, I'm desperate During two weeks I have been working in my project, this uses serial port communication (a PIC serial board). I got to set the connection up, but I can not get data from the COM port. I've read some forums and the cause of the problem seems to be the incomplete implementation of System.IO.Ports class . When I try to get data of the COM port, the event SerialDataReceivedEventHandler (represents the method that will handle the DataReceived event of a SerialPort object