Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

jserialcomm 2.6.2 problem #53

Open
rdkartono opened this issue Jul 7, 2020 · 8 comments
Open

jserialcomm 2.6.2 problem #53

rdkartono opened this issue Jul 7, 2020 · 8 comments

Comments

@rdkartono
Copy link

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)

@JardarM
Copy link

JardarM commented Jan 13, 2021

From what I understand there is only a rebuild required and updated reference to jseriallib 2.6.2 to make new release. Would be highly appreciated if somebody could do this?

@kochedykov
Copy link
Owner

The new release is coming soon.

@pfried
Copy link

pfried commented Jul 15, 2021

@kochedykov I know it is a bit annoying if people request things. But this release would really save me some real trouble since we are now somehow stuck with a inferior jserialcomm when using jlibmodbus. Could you make a new release?

@emilm
Copy link

emilm commented Jun 8, 2022

The new release is coming soon.

@kochedykov any news on this? :)

@emilm
Copy link

emilm commented Nov 14, 2022

I guess this project is dead.

@kochedykov
Copy link
Owner

I guess this project is dead.

it's still alive!)

@emilm
Copy link

emilm commented Nov 15, 2022

Haha good to hear :)

@ramen2k10
Copy link

Serial Communication support both stopbit 1 and 2 then why in the above code in parameters details it mentioned - @param stopbit : typically 1 ?? Is jSerialComm supports only stop bits 1 ?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants