HJTrost Posted June 28, 2023 Share Posted June 28, 2023 I am working on converting my Turbo PMAC software to Power PMAC and have made some good progress. My application program starts, initialized the 3-stage system (Cartesian x, y z) and makes abs-linear moves, abs-rapid moves and velocity jog oves just fine. Homing is also under control. My problem is that as soon as I take a 1 minute break before asking for the next move, the controller does not respond any longer - actually, no command goes through to the controller. I have a Power PMAC Clipper 465. My control program sits on a Windows 10 laptop. I use the libssh2 implementation from Observatory Sciences to let my control program talk to the PMAC. OF the many "system" calls in the Observatory Sciences package, I use just 3: _connect(192.168.0.200, root, password, 22, use-minus-2) _sendCommand(command,reply) _disconnect() When the accident happens, _sendCommand reports no bytes written. One level down in the package, this function attempts writing by a call to _write(buffer, buffersize, byteswritten, timeout) which issues the report that _sendCommand offers. The calling continues into SSHDriver::write(buffer, buffersize, byteswritten, timeout) and that finally calls libssh2_channel_write(channel, buffer, buffersize) This function is part of the libssh2 library, specifically version 1.4.3, of which Observatory Sciences included the finished DLL but no source. It reports an error -43, which I found in another source (for libssh2 1.10.0) to be named LIBSSH2_ERROR_SOCKET_RECV. At this point I have to close my program - the _disconnect() call apparently succeeds. Starting my application right away does also work, same whole story, so disconnect/connect clears the problem. That is of course not anacceptable behavior. If I keep a terminal window open on my laptop, I can ping the controller just fine after the accident has happened. If I start the Power PMAC IDE before my application program and just let it sit (connected to the PMAC), it will take and execute a simple jog command like #1j:50000 (about 37 mm distance) after the accident has happened. The Power PMAC IDE does not show any such behavior, it survices tea time just fine. Question: Has anybody seen this or similar behavior before, and if so, what was the solution? Cheers, Jochen Quote Link to comment Share on other sites More sharing options...
leandro.martins Posted June 29, 2023 Share Posted June 29, 2023 Hello @HJTrost Your problem seems similar to the described on this topic: It might worth to try increase the ClientAliveInterval setting, or setting to 0 to disable the timeout. Quote Link to comment Share on other sites More sharing options...
HJTrost Posted June 29, 2023 Author Share Posted June 29, 2023 Leandro, it sure looks like it. However: I do not have the selection "Tools -> Options -> Power PMAC -> Communication Settings available. There are no entries ClientAliveCountMax or ClientAliveInterval in /etc/ssh/ssh_config. There is an entry "ConnectTimeout 0" in /etc/ssh/ssh_config. I am working with Power PMAC IDE 4.4.0.99 with firmware 2.5.2.0. I have a newer version of the IDE at hand but not a 2.6.x version of the firmware, and the newer IDE does not like the 2.5.x firmware. My host system is Windows 10 but my application program is 32-bit, having a 25+ year history of development in it. So what are my options now? Quote Link to comment Share on other sites More sharing options...
HJTrost Posted June 29, 2023 Author Share Posted June 29, 2023 More trials. ClientAliveCountMax=3 and ClientAliveInterval=15 are in /etc/ssh/sshd_config. Setting ClientAliveInterval=150, uploading it with my WinSCP FTP client and the running my application does not change my results, i.e., after a wait time of 60 seconds I do not get a response anymore. I tried successively 15, 20, 25, ... , 65 seconds, and at 65 seconds the accident happened. If I power-cycle the PMAC, the uploaded version of sshd_config has reverted to the old original (imported from /.readonly/etc/ssh/sshd_config ?). As my application logs in separately from the FTP client (and Putty which I have open for looking), where does it get its settings? Cheers, Jochen Quote Link to comment Share on other sites More sharing options...
leandro.martins Posted June 30, 2023 Share Posted June 30, 2023 10 hours ago, HJTrost said: If I power-cycle the PMAC, the uploaded version of sshd_config has reverted to the old original (imported from /.readonly/etc/ssh/sshd_config ?). Yes, to make it permanent it will be necessary to apply those changes in the .readonly. I'm without ideas, maybe someone from ODT will help you more. Anyway, I would suggest to send an email to the support, since it could be a problem of incompatibility between the Power PMAC FW and the SSH application. Quote Link to comment Share on other sites More sharing options...
HJTrost Posted September 18, 2023 Author Share Posted September 18, 2023 As I am now working with a CK3C AX1100 and PMAC IDE 4.6.0.14 and still observe the same problem, I revisited the topic (SSH Timeout) that Leandro pointed to in one of his answers. It does indeed solve my problem. I set ClientAliveInterval=0 through the IDE as shown there, and it even takes care of making it permanent. The earlier version of the PMAC IDE that I was using (4.4.0.99) does not offer this access to the Client-Alive parameters. Quote Link to comment Share on other sites More sharing options...
steve.milici Posted September 18, 2023 Share Posted September 18, 2023 Edit the “/.readonly/etc/ssh/sshd_config” to make it permanent. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.