question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

jserialcomm 2.6.2 problem

See original GitHub issue

on jserialcomm 2.6.2, have problem with SetComPortParameter.

My java code `/** * Open Serial Port for communication * @param serialname : serial port name * @param baudrate : baud rate, typically 4800, 9600, 144400, 19200, 38400, 57600, 115200 * @param databit : data bit length , typically 8 * @param stopbit : typically 1 * @param parity : 0 = None, 1 = Odd, 2 = Even, 3 = Mark, 4 = Space * @return true if success */ public boolean Open(String serialname, int baudrate, int databit, int stopbit, int parity) { sp = new SerialParameters();

	sp.setDataBits(databit);
	sp.setDevice(serialname);
	sp.setStopBits(stopbit);
	sp.setBaudRate(BaudRate.getBaudRate(baudrate));
	sp.setParity(Parity.getParity(parity));
	
	SerialUtils.setSerialPortFactoryJSerialComm();
	
	try {
		
		modbus = ModbusSlaveFactory.createModbusSlaveRTU(sp);
		
		modbus.addListener(listener);
		
		modbus.listen();
		return true;
	} catch (SerialPortException e) {
		raise_log("Open failed, Msg : "+e.getMessage());
		return false;
	} catch (ModbusIOException e) {
		raise_log("Modbus Listen failed, Msg : "+e.getMessage());
		return false;
	}
}`

Log : java.lang.NoSuchMethodError: com.fazecast.jSerialComm.SerialPort.setComPortParameters(IIII)V at com.intelligt.modbus.jlibmodbus.serial.SerialPortJSerialComm.open(SerialPortJSerialComm.java:71) at com.intelligt.modbus.jlibmodbus.net.ModbusConnectionSerial.openImpl(ModbusConnectionSerial.java:60) at com.intelligt.modbus.jlibmodbus.net.ModbusConnection.open(ModbusConnection.java:45) at com.intelligt.modbus.jlibmodbus.slave.RequestHandlerSerial.run(RequestHandlerSerial.java:51) at java.lang.Thread.run(Thread.java:748)

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:2
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
kochedykovcommented, Nov 15, 2022

I guess this project is dead.

it’s still alive!)

1reaction
emilmcommented, Nov 14, 2022

I guess this project is dead.

Read more comments on GitHub >

github_iconTop Results From Across the Web

jSerialComm
jSerialComm is a Java library designed to provide a platform-independent way to access standard serial ports without requiring external libraries, ...
Read more >
Program that can log from many multimeters.
1) You do not have access to serial ports (This problem is not present ... jserialComm with a few different versions (2.5.3, 2.6.1,...
Read more >
jSerialComm: failed to open port (Arduino Mega 2560)
i am working on a project in internship and i have some issues for trying to cummunicate a Java Programme to a ...
Read more >
Fazecast
Created 1 year ago in Fazecast/jSerialComm with 0 comments. ... the library and are now using the latest 2.6.2 and all of them...
Read more >
jSerialComm
jSerialComm. A platform-independent serial communications library for Java. homepage: fazecast.github.io/jSerialComm ... 2.6.2 (30.4.2020) release central ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found