B4J Library jSerial library

Status
Not open for further replies.

SimonElck

Member
Licensed User
Ok here's the result:
The program runs without problem when started with java -jar Monitor.jar

So no logs to indicate what goes wrong when running as .exe
 

SimonElck

Member
Licensed User
Any ideas?
What's the difference between the .exe and the .jar prog?
Is it to do with Windows 10 maybe? Still stuck!
 

SimonElck

Member
Licensed User
1. yes
2. I don't know how. The packager does not prompt me for it, nor does the installer(= the exe that the packager creates)
Instead I manually copied the directory to C:\chat (didn't work either) and then to E:\chat same result.
 

SimonElck

Member
Licensed User
Thanks for your troubles.
It's not the version, but must be something in Windows 10. I tried compatibility modes.
Would not be the first problem with W10 now would it
Thanks again
 

marco.canta

Active Member
Licensed User
Longtime User
This library (Serial) also works with NON-UI apps?
I made an app UI that receives data from the serial and it all works.
Now I did the same app but NOT-UI version, but does not work.
With the logs I saw that the serial port is open and without errors, but the "NewData" event never comes.

B4X:
Sub AStream_NewData (Buffer() As Byte)
    Try   
        ValRX = BytesToString(Buffer, 0, Buffer.Length, "UTF8")
        Log(ValRX)
    Catch
        Log("ERROR - NewData")
    End Try
End Sub

Thanks Marco
 

skeedsr

Member
hi erel i try to use the chat, if i use with b4j consolle ( debug or release or offiscated) iys well, byt if i comile and run jar file the application stop.

if i takeoff 'sp.open("Com4") the app function , but as normal dont recieve message,

the serial port in my pc is emulated by a software emulator ( virtual serial port emulator) that function well, when i try with the consolle b4j all is well.

i try to start program with a bat file as administrator but nothing good..

thanks!!

livio
 

wcieslik

Member
Licensed User
Longtime User
Hello,
Is it possible to get the status of the DCD line ? (eg like CTS and DSR) ?
 

wcieslik

Member
Licensed User
Longtime User
Try this:
B4X:
Dim jo As JavaObject = serialport
Dim DCD As Boolean = jo.GetFieldJO("sp").RunMethod("isRLSD", Null)
Thanks Erel, I tried this this morning and the second line, (Dim DCD .... ), generates an exception w.r.t. the field "sp" not found anywhere ...
"java.lang.RuntimeException: Field: sp not found in: anywheresoftware.b4j.serial.Serial"

Is there a way to list/find all of the valid field names ?
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…