Sotware reset command on a 5270
Sotware reset command on a 5270
Hi, can someone please tell me if there is a way for an application to issue a reset command that will have the same effect as pressing the onboard reset button, I am using a 5270 on a dev 70 development board.
Thanks, Bill
Thanks, Bill
-
- Posts: 513
- Joined: Sat Apr 26, 2008 7:14 am
Re: Sotware reset command on a 5270
the function is ForceReboot();
See: C:\Nburn\docs\NetBurnerRuntimeLibrary\NetBurnerRuntimeLibraries.pdf,
Section 22.26. ForceReboot
Section 22.26.1. Example
See: C:\Nburn\docs\NetBurnerRuntimeLibrary\NetBurnerRuntimeLibraries.pdf,
Section 22.26. ForceReboot
Section 22.26.1. Example
Re: Sotware reset command on a 5270
Thanks Ridgeglider once again you have come to my rescue.
i have an app that collects data from three serial ports and once a minute connects via TCP to a remote webserver and uploads the latest results, this has been working OK for a couple of months now, if I disconnect or power down the cable modem connection for a few minutes and then bring it back up again the app once again is able to communicate with the webserver, however if I disconnect the power to both the netburner board and the cable modem and then resore it, the apps first attempt to communicate with the webserver is before the cable modem has restablished its link to my ISP, this seems to confuse the TCP software such that all following attempts (after the link is up) fail on the connect stetement, so I want to try a reset to see if it resolves the problem.
Bill
i have an app that collects data from three serial ports and once a minute connects via TCP to a remote webserver and uploads the latest results, this has been working OK for a couple of months now, if I disconnect or power down the cable modem connection for a few minutes and then bring it back up again the app once again is able to communicate with the webserver, however if I disconnect the power to both the netburner board and the cable modem and then resore it, the apps first attempt to communicate with the webserver is before the cable modem has restablished its link to my ISP, this seems to confuse the TCP software such that all following attempts (after the link is up) fail on the connect stetement, so I want to try a reset to see if it resolves the problem.
Bill
-
- Posts: 513
- Joined: Sat Apr 26, 2008 7:14 am
Re: Sotware reset command on a 5270
you could also do a simpole delay after any power up, and perhaps a ping off a known ip. if that succeeds, continue your app.
Re: Sotware reset command on a 5270
thanks for your suggestions, I will give them a try.
Bill
Bill
Re: Sotware reset command on a 5270
If your cable modem is suppling a DHCP address, and that is the reason the connection fails, you can loop a certain number of times with a delay, checking until you have a valid DHCP lease.
Re: Sotware reset command on a 5270
Hi, thanks for the suggestion, but I am using fixed addressing, somehow if the first connect fails then all further connects fail even though the link has come up. If the first connect is OK then disconnecting and reconnecting the link does not cause a problem. I need to do some more investigation and monitor the result code from the connect statement.
Thanks, Bill
Thanks, Bill
Re: Sotware reset command on a 5270
what error code(s) are you getting from the connect?
what version of the s/w are you using?
and rev of the mod5270?
i've seen a simlar problem so please post whatever you find
out with this problem. thanks.
what version of the s/w are you using?
and rev of the mod5270?
i've seen a simlar problem so please post whatever you find
out with this problem. thanks.
Re: Sotware reset command on a 5270
Hi GreenGene, I am still investigating and will reply further when I have more info.
Thanks, Bill
Thanks, Bill
Re: Sotware reset command on a 5270
Hi GreenGene, I have now investigated further and found that a software bug in my app was causing the problem. The connect statement was returning with a timeout because the host IP address was not setup. I was using a single GetHostbyname statement in the app initialization to get the host IP address, if this was actioned before the cable modem was ready then it failed, and from that point onwards all connects would fail. The solution was to move the Gethostby name statement out of the initialization and insert it just before the connect statement.
I hope that this helps with your problems.
Thanks, Bill
I hope that this helps with your problems.
Thanks, Bill