i totally no idea how to make it work, please give a little trick to start!
i connect the max485 to raspberry from this website https://www.homegear.eu/index.php/RS485_Serial_Module
but i totally no idea how to start B4J to make raspberry to receive or send data form device.
is it using jSerial to connect or need to use jPi4J?
i try jSerial but no luck.
here is my code
didnt receive any data at all.
please help
i connect the max485 to raspberry from this website https://www.homegear.eu/index.php/RS485_Serial_Module
but i totally no idea how to start B4J to make raspberry to receive or send data form device.
is it using jSerial to connect or need to use jPi4J?
i try jSerial but no luck.
here is my code
B4X:
Dim BaudRate As Int = config.Get("BaudRate")
Log("BaudRate: " & BaudRate)
Dim DataBits As Int = config.Get("DataBits")
Log("DataBits: " & DataBits)
Dim StopBits As Int = config.Get("StopBits")
Log("StopBits: " & StopBits)
Dim Parity As Int = config.Get("Parity")
Log("Parity: " & Parity)
sp.Open(config.Get("serial_port_path"))
Log("Serial Port Path: : " & config.Get("serial_port_path"))
sp.SetParams(BaudRate,DataBits,StopBits,Parity)
astream.Initialize(sp.GetInputStream, sp.GetOutputStream, "astream")
didnt receive any data at all.
please help