How to find all serial devices (ttyS, ttyUSB, ..) on Linux without opening them?

What is the proper way to get a list of all available serial ports/devices on a Linux system? In other words, when I iterate over all devices in /dev/, how do I tell which ones are serial ports in...

How to set baud rate to 307200 on Linux?

Basically I'm using the following code to set the baud rate of a serial port: struct termios options; tcgetattr(fd, &options); cfsetispeed(&options, B115200); cfsetospeed(&options,...

Low latency serial communication on Linux

I'm implementing a protocol over serial ports on Linux. The protocol is based on a request answer scheme so the throughput is limited by the time it takes to send a packet to a device and get an...

Serial communication with minimal delay

I have a computer which is connected with external devices via serial communication (i.e. RS-232/RS-422 of physical or emulated serial ports). They communicate with each other by frequent data...

How to add more than 4 serial tty devices in Linux?

When I run command "dmesg | grep tty", then it displays just 4 ttyS devices from 0 to 3. I used #MAKADEV and makenode commands and they created ttyS... files in /dev folder. So now, I cannot use...

Instantiating Groovy class in Java

Hi I have a Groovy classs which looks like this : class CustomVanityDetails { private String serial; private String abbv; private String desc; public String getSerial() { return serial; ...

Don't understand how method "delete" work in linkedlist

please help me to understand how does the method delete (with specifying value) work? I understood everything except this point. I wrote method delete but don't understand how changing field next...

Setting /dev/ttyS0 baud rate to >115200

I am trying to set the baud rate of the serial port (/dev/ttyS0) to 1Mb (1000000). I've tried writing code using cfsset{i|o}speed() + tc{g|s}etattr(). Anything >115200 is ignored. #include...

Set 16550A UART Hardware FIFO interrupt level from Linux Userspace

I am currently using a 16550-compatible UART, and I want to be able to change the FIFO interrupt trigger level (I am dropping bytes under high UART loads and I want to reduce the threshold - it's...

How to select fields in spring data?

I have entity as follow. @Entity @Table(name = "BankProduct") public class Product { @Id @GeneratedValue(strategy = GenerationType.AUTO) private Long id; private String name; ...

Setting a value and checking with null not working

I am really confused.I need this code to check if serial has a value and if not to set the value otherwise to display that message. public class Calculator { public static void main(String[]...

USB serial (CDC ACM) device requires RTS negated

I am using a USB Serial (CDC ACM) device (an Astrosys GBA ST2 Bill Validator), but the device won't answer requests unless the RTS signal is negated. On Windows, usbser drivers will configure the...

Jackson: how to wrap object with a key, which is one of the properties of serialized object?

I would like to achieve following JSON structure: "laptops":[ { "apple":{ "serial":"value", "manufacture_date":"some_date" }, ...

Baud rate of inb and outb commands - linux

I want to pass binary data from my PC to my micro-controller through the real serial port in my computer. At this time, I'm thinking of using INB and OUTB functions so I don't have to put up with...

Does an OMNET++ / Veins simulation get very slow if both Vehicles and RSUs broadcast messages periodically?

Let me give a brief context first: I have a scenario where the RSUs will broadcast a fixed message 'RSUmessage' about every TRSU seconds. I have implemented the following code for RSU broadcast...

overriding tostring() method and passing object reference without getting hash

I'm trying to override the toString() method and print without the hash. When I use my tostring() method when trying to print it requires me to create another object like asset server = new...

What's the maximum baud rate in MATLAB?

Ubuntu 16.04 & MATLAB R2017a. I'm trying to set serial port like that: s=serial_port('/dev/ttyUSB0','BaudRate',115200,'DataBits',8,'InputBufferSize',80000) It's working fine, but when I try to...

Omnet++, A cRuntimeError exception is about to be thrown

I'm currently using Omnet++, and veins, and I have this runtime error appearing suddenly, and I am not able to understand it in order to fix it properly. <!> Error in module (TraCIDemoRSU11p)...

com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_ARRAY but was BEGIN_OBJECT at line 1 column 101 path

I am parsing the API using retrofit but it is giving on response from onFailure. I have tried every possible solution I researched but the result is still the same. My Api looks as...

com.google.gson.stream.MalformedJsonException: Unterminated string at line 1 column 1273834 path

I have used retrofit for api parsing. But got stuck with the error. I researched and tried every possible solution to solve but could not solve it. The full json response error printed in log is ...

Error populating Jlist with data from ArrayList

I'm making a program that will generate Emails for names pulled from an excel sheet. The issue I'm having is that when i try to transfer my Arraylist data to the Jlist ListModel, nothing shows up...

How to flash a pixhawk from docker container?

I do my first step in developing on the PX4 using Docker. Therefore I extend the px4io/px4-dev-nuttx image to px4dev with some extra installations. Dockerfile FROM px4io/px4-dev-nuttx RUN apt-get...

How to check if a device is using RS232 or RS422?

Suppose we have a device which can operate on both RS232 and RS422 protocols. we know which serial port is connected to the device, lets say /dev/ttyS4. In Linux environment using setserial, dmesg...

Method setSerial(boolean serial) gone in Liferay 7

I am working on a code migration project from Liferay 6.2 to Liferay 7.1. In Liferay 6.2 there is a class BaseBackgroundTaskExecutor containing a method setSerial(boolean serial). However in...

How to solve HHH000346 Error using hibernate 5 and mysql?

I'm studying restful service and views. Regarding it, I use mysql and hibernate 5. My data tables are two and have reference relation. The problem occurs when I update the primary key. When I add...

Can't read data from a serial port ttymxc

So I'm trying to connect an embedded linux device with a server over a serial port connection RS485. I'm using an USB/RS adapter to connect it to my laptop. The server is able to receive the...

How to set serial port to run in PIO mode (not DMA) in Linux

I'm using ubuntu and need my serial port to run extrictly in PIO mode for a high precision reading requirement (highly deterministic parity error detection). I can not determine if my /dev/stty0...

serial port not responding in Linux (EC2)

I have an EC2 instance. I want to set up a listener on a serial port. However, I cannot get the serial port to respond. Nothing seems to fail, I can connect to it in dio (PHP) without error. But...

Event on ComBox which inside TableView cell JavaFx?

I have TableView and when my program start TableView has only one row, also I have ArrayList of ComboBoxes and create one ComboBox for each row in the TableView, when user edit (Product Name) cell...

Using sed to print content of files in columns

I have an file , my file name is lookup.txt. Sometimes this file content is 100 lines , so everything scroll while printing. Thats why i like to print it on screen in 2 or more columns. my bash...