B4J Question Raspberry Pi FTP Download Server SSH Response Error

rwblinn

Well-Known Member
Licensed User
Longtime User
Hi,

when downloading via FTP a file from a local Raspberry Pi, follow error occurs:
B4X:
Download not completed.
Error: org.apache.commons.net.MalformedServerReplyException: Could not parse response code.
Server Reply: SSH-2.0-OpenSSH_6.7p1 Raspbian-5+deb8u1

SSH is active on the Raspberry Pi. Project file attached.

Any hints how to resolve?
 

Attachments

  • remlogviewer.zip
    3.4 KB · Views: 244

rwblinn

Well-Known Member
Licensed User
Longtime User
Thanks for the hint.
Tried but getting error when calling:
B4X:
SFTP.getFile(FTPRemoteFile, File.DirApp, 10)

B4X:
main._sftp_downloadstart (java line: 230)
java.lang.NoClassDefFoundError: android/util/Log
    at b4a.jk.ssh.Ssh2Wrapper.connectIfNeeded(Ssh2Wrapper.java:496)
 
Upvote 0

rwblinn

Well-Known Member
Licensed User
Longtime User
Thanks for the hint - got it to work and also able to download several times.

Will share the sample app next days or so (just completing the settings form).
 
Upvote 0

rwblinn

Well-Known Member
Licensed User
Longtime User
As promised find attached the sample app to read on a PC, remote openHAB log files (openhab.log and events.log).
The log files are stored on a Raspberry Pi in a local network. SSH is used to transfer.
The configuration settings are managed via two modal forms and data is stored in a file as a type by randomaccessfile.
Two iconnized buttons are used to quickly refresh a log file.

The source code is attached. The jKSSH2 library is not included.


 

Attachments

  • openhablogviewer.zip
    11.3 KB · Views: 280
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…