Questions tagged [jssc]

jSSC (Java Simple Serial Connector) - library for working with serial ports from Java

jSSC supports Win32(Win98-Win8), Win64, Linux(x86, x86-64, ARM), Solaris(x86, x86-64), Mac OS X 10.5 and higher(x86, x86-64, PPC, PPC64).

118 questions
2
votes
1 answer

how to read data frome serialport using jssc in java?

I used jssc library to read and write data from serial port. package serial; import jssc.*; public class Serial { public static void main(String[] args) { String[] portNames = null; portNames = SerialPortList.getPortNames(); for…
AminFarajzadeh
  • 346
  • 5
  • 17
2
votes
1 answer

Serial Communication via Bluetooth on COM port

I was trying to create a Java program which communicates with a Bluetooth module (attached to SPARKI). I'm using JSSC for the serial communication. The Bluetooth module is connected to my Windows 7 x64 PC on COM8 port. The robot is also connected to…
2
votes
1 answer

Read and Write Timeouts in JSSC

In SerialPort.java, I would like to know the following on writeBytes and readBytes methods: Would those block? How to interpret the return --boolean-- code?
2
votes
1 answer

How to read a usb serial port in JAVA?

I add some detail to my question. I receive on my Xbee device a flow of GPS coordinates but I'm unable to read and stock these data on a buffer. My Xbee device is connected to my laptop on a usb serial port, that's why I want to create a program…
user3607632
  • 21
  • 1
  • 2
1
vote
1 answer

EXCEPTION_ACCESS_VIOLATION: No Core Dump Will Be Written

I am attempting to write a serial communication class in Java that will connect to an Arduino UNO using the Java Simple Serial Connector library. Whenever I attempt to open the port, however, I run into this error with the Native Code: # # A fatal…
1
vote
2 answers

Java jssc read from multiple COM ports, simultaneously, write all data out on one port

I have several COM ports bringing data in every 1-2 seconds. Each line, from every device, starts with a $ and ends with a CR and LF. Every line is a different length, none more than 82 bytes long. I am trying to combine four 4800 baud inputs and…
ian5142
  • 21
  • 2
1
vote
0 answers

How do I pass multiple types of data over a serial port connection using JSSC?

I am tasked with creating a program that can initiate a payment on an Ingenico card terminal. It is a smaller part to a larger project to create a custom P.O.S system for a business. But I am facing a variety of road blocks making this problem…
1
vote
0 answers

Java JSSC serial read consuming 100% CPU

I am trying to read GPS data from a serial port(ttyACM0) in java using jssc jar which I need to display as a label in a JavaFx application. I have a created a thread for reading the GPS data but this thread is consuming 100% CPU(checked using top…
Harry
  • 2,177
  • 1
  • 19
  • 33
1
vote
1 answer

NullPointerException thrown when running program but not when in debug mode Java jssc Serial port communication

This is my first time touching Java in a few years. I have been tasked with creating a runnable Jar file which will be called to communicate with an RFID card reader. Now, my code steps through fine in Debug mode, however, when I simply try to run…
c_k000
  • 21
  • 2
1
vote
0 answers

Wait all byte (JSSC)

I'm trying to read a String from my Sara g350 module. I'm using a serial port comunication. The code that I use is this one: private static SerialPort serialPort; public static void main(String[] args) { String[] portNames =…
Skiwo55
  • 71
  • 1
  • 5
1
vote
1 answer

Can I communicate with virtual serial device using jssc? Problem with ttyS0 configuration (Ubuntu)

I am working with jssc library. I want to emulate ELM327 device and I have already found OBDSim (https://icculus.org/obdgpslogger/obdsim.html). I am in dialout group. While mounting OBDSim on tty0, simple code: import jssc.SerialPort; import…
Sheb
  • 175
  • 2
  • 11
1
vote
0 answers

jssc SerialPort - my software stops running when readbytes

I'm reading Wiegand card code by a module throught a USB port. I added an event listener to my, it runs perfectly when I pass my card, but after reading the data my software stops running and get stuck, but if pass my card again, the event runs…
William
  • 11
  • 1
1
vote
1 answer

Unit testing serial port in java

I have a program that is communicating with a hardware serial port sensor. I use jssc as a connection abstraction library. I would like to crate a virtual serial port test class I can use to test my real production code without a hardware…
Gadi
  • 1,539
  • 22
  • 37
1
vote
0 answers

Using jssc in android studio

Downloaded jssc and added it to my project in android studio. SerialPort sp = new SerialPort("COM1"); try { if (sp!=null && sp.isOpened ()) { sp.closePort(); } try{ sp.openPort(); …
O.B
  • 95
  • 8
1
vote
2 answers

Com ports are not detected with jSSC

I'm trying to implement the transfering data with the help of Com ports in my java application. Firstly I decided to create SerialPort object like this. SerialPort serialPort = new SerialPort("COM1"); try { serialPort.openPort(); } catch…
Andrey-2310
  • 531
  • 1
  • 6
  • 13