B4J Question serial crash in raspberry

MbedAndroid

Well-Known Member
Licensed User
Longtime User
after 8 month of good working suddenly i got this crash on my rasp.
Seems that some lib has been disappeared, but why?
testcode:
B4X:
'Non-UI application (console / server application)
#Region  Project Attributes
   #CommandLineArgs:
   #MergeLibraries: True
#End Region

Sub Process_Globals
   Private sp As Serial
   Private astream As AsyncStreamsText 
   Private toneteller=1 As Int
   Dim l As List
   Dim starttimer,waittimer As Timer
   Dim phonestring="" As String
   Private DataReceived="" As String
   Private waithrd=99 As Int
   Dim thrd=99 As Byte
   Dim js As JStringFunctions
   Public LAC="" As String
   Public CSQ="" As String
   Public smsconnected=False As Boolean
End Sub

Sub AppStart (Args() As String)
   smsStart
End Sub
Sub smsStart
   sp.Initialize("")
'   l.Initialize
'   js.Initialize
'   l=sp.listports
'   For i=0 To l.Size-1
'   Log(l.get(i))
'   Next
   Log("SerialPortSMS Init")
   Try
   sp.Open("/dev/ttyUSB1")
   sp.SetParams(9600,8,1,0)
   sp.RTS=True
   sp.DTR=True
'   astream.Initialize( Me ,"astream",sp.GetInputStream,sp.GetOutputStream )  
'   ''astream.Initialize(sp.GetInputStream,  sp.GetOutputStream, "Astream")
   Catch
     Log("commport bestaat niet")

     smsconnected=False
     Return
   End Try



   Log("setup done")
End Sub
View attachment 48997
 

Attachments

  • ScreenShot095.jpg
    76.2 KB · Views: 187
Last edited:

MbedAndroid

Well-Known Member
Licensed User
Longtime User
updated the rasp with apt-get update, apt-get upgrade and apt-get install libjssc-java , but this wont work
problem seems to be the hidden file in the root dir which i cannot access from remote location
as soon the port is opened, the code will crash. the USB/comm port are there checked it on the console
 
Upvote 0

MbedAndroid

Well-Known Member
Licensed User
Longtime User
tried also to update/install libc and libjssc*. Both are updated now, no results
think i have to reinstall raspian or fchk the SD card
 
Upvote 0

MbedAndroid

Well-Known Member
Licensed User
Longtime User
managed to copy a new version of libjSCC-2.6_armsf.so into that directory, didnt help. The problem must be somewhere else
Will try to update java and see that helps
 
Upvote 0

MbedAndroid

Well-Known Member
Licensed User
Longtime User
ok solved the problem

in such a case you need to reinstall java

sudo apt-get install openjdk-8-jre
after that if the new version is not selected, select the new update with
sudo update-alternatives --config java
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…