Questions tagged [libserial]

LibSerial is a C++ library for serial port programming on POSIX OSs.

LibSerial is a C++ library that aids in serial port programing on POSIX OSs by exposing serial ports as iostream objects. It has support for USB-to-Serial converters as well.

The source code is available on SourceForge at https://sourceforge.net/projects/libserial/.

37 questions
0
votes
0 answers

Flutter flutter_libserialport to communicate from PC to Arduino Uno recognizes port is open but only writes 1-2 bytes and stops

I am writing bytes from a flutter application to an Arduino Uno. The Uno has some very simple code: void setup() { Serial.begin(9600); randomSeed(analogRead(0)); pinMode(LED_BUILTIN, OUTPUT); } void loop() { if (Serial.available() > 0) { …
Alex Proshkin
  • 125
  • 1
  • 9
0
votes
2 answers

libserial is not detected in my dart programm

I made a minimalistic dart software that interfaces a serial port: import 'package:libserialport/libserialport.dart'; import 'dart:typed_data'; void main(List arguments) { final port = SerialPort("/dev/pts/4"); if…
Dimitrios Desyllas
  • 9,082
  • 15
  • 74
  • 164
0
votes
1 answer

Libserial 1.0 library: linker cannot find methods

I downloaded and built libserial 1.0 from https://libserial.readthedocs.io to my OpenSuse Leap 15.3. To test the functionality, I built a small program: #include #include int main() { LibSerial::SerialStream…
0
votes
1 answer

wrong sequence of libserial received data

I'm now working on a project which uses libserial for serial port communication under Ubuntu. we modified the libserial source code to allow MARK/SPACE parity. but when doing data receiving test, sometimes (about 5% chance) the incoming data…
ruhoo
  • 11
  • 2
0
votes
2 answers

How do I prevent libserial to eat up characters like 0x0A, 0x0D, or 0x0F coming from my serial device?

When communicating with a serial-over-USB device (a GNS FM9 receiver for getting road traffic alerts) by using libserial's SerialStream object, I found out that not all characters coming from the device are in fact being read. This is what I always…
Neppomuk
  • 1,102
  • 1
  • 11
  • 24
0
votes
1 answer

libi2c-dev, libserial-dev how to add to "Yocto"?

I have a question about how to add two libraries to "Yocto". The libraries are: libi2c-dev libserial-dev Did anyone of you try to add it to the system generated by "Yocto" and maybe have suggestions about how to start and how to add it? Target is…
frank
  • 223
  • 1
  • 3
  • 14
0
votes
0 answers

Cant read from std::cin while reading from serial port using libserial

I am trying to read from the serial port using libserial. The code sets up the serial port communication with the sensor(arduino) and then asks for an input from the user for reading data from serial port for a fixed number of times. The code…
user27665
  • 673
  • 7
  • 27
0
votes
1 answer

std::out_of_range error in c++ code using libserial library

I am kind of new at c++. I have been using a library to handle serial communication in UNIX environments called libserial. I made a very simple test to try the library writing something to a peripheral and receiving an answer. The test went pretty…
Daniel Lara
  • 52
  • 1
  • 7
0
votes
1 answer

libserial undefined reference to symbol

I compiled libserial-0.6.0rc2 from source in Ubuntu 16.04 and am now trying to compile a simple test program: #include #include using namespace LibSerial; int main(int argc, char** argv) { SerialStream serial_port; …
0
votes
0 answers

GCC not finding LibSerial even with -lserial flag [Ubuntu]

I'm trying to get LibSerial to work but I am getting some linker errors when I try to compile my app using LibSerial. The errors are as follows: /tmp/ccnVfHa2.o: In function `main': index.cpp:(.text+0x26): undefined reference to…
Jlegend
  • 531
  • 1
  • 6
  • 19
0
votes
1 answer

C++ libserial serial connection to Arduino

I'm trying to send data via serial connection (USB) from my PC (Ubuntu 14.04) to an Arduino Uno. The Arduino should display the received data for testing purposes. (I'm happy, if I receive anything...) I use libserial to send the data but the…
0
votes
0 answers

Undefined reference to SerialStream::Open in QT

I'm trying to make use of libserial for my project in qt. I've installed the library and added it to my .pro file using LIBS += -L/usr/local/lib/ -lserial I have a class class SerialComm { public: SerialStream node; …
user4563563
0
votes
0 answers

No data read with libserial

I'm having trouble communicating over a serial connection. I am trying to connect to a robot using the LibSerial library. My code seems to not open the connection correctly, and I don't know why. The robot is automatically sending multiple messages…
0
votes
1 answer

'SerialStream' does not name a type

I'm using Ubuntu 14.04. I want to use libSerial for project like described here. I installed the library using sudo apt-get install libserial-dev. I've written a little program (well, it's not really a program): #include "SerialStream.h" #include…
PEAR
  • 685
  • 3
  • 10
  • 20
0
votes
1 answer

How to compile libserial on linux?

My program needs to communicate with a serial device. I am developing it on Ubuntu 14.04 LTS. I found libserial, and tried to use it, but it does not compile. I downloaded, compiled and installed v0.6.0rc2. Yeah, it is a rc, but it is more popular…
daltonfury42
  • 3,103
  • 2
  • 30
  • 47