Sotware reset command on a 5270

Discussion to talk about software related topics only.
BillC
Posts: 72
Joined: Tue Oct 13, 2009 6:22 am
Location: Buckinghamshire, UK

Sotware reset command on a 5270

Post by BillC »

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
Ridgeglider
Posts: 513
Joined: Sat Apr 26, 2008 7:14 am

Re: Sotware reset command on a 5270

Post by Ridgeglider »

the function is ForceReboot();

See: C:\Nburn\docs\NetBurnerRuntimeLibrary\NetBurnerRuntimeLibraries.pdf,
Section 22.26. ForceReboot
Section 22.26.1. Example
BillC
Posts: 72
Joined: Tue Oct 13, 2009 6:22 am
Location: Buckinghamshire, UK

Re: Sotware reset command on a 5270

Post by BillC »

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
Ridgeglider
Posts: 513
Joined: Sat Apr 26, 2008 7:14 am

Re: Sotware reset command on a 5270

Post by Ridgeglider »

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.
BillC
Posts: 72
Joined: Tue Oct 13, 2009 6:22 am
Location: Buckinghamshire, UK

Re: Sotware reset command on a 5270

Post by BillC »

thanks for your suggestions, I will give them a try.

Bill
rnixon
Posts: 833
Joined: Thu Apr 24, 2008 3:59 pm

Re: Sotware reset command on a 5270

Post by rnixon »

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.
BillC
Posts: 72
Joined: Tue Oct 13, 2009 6:22 am
Location: Buckinghamshire, UK

Re: Sotware reset command on a 5270

Post by BillC »

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
greengene
Posts: 164
Joined: Wed May 14, 2008 11:20 am
Location: Lakeside, CA

Re: Sotware reset command on a 5270

Post by greengene »

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.
BillC
Posts: 72
Joined: Tue Oct 13, 2009 6:22 am
Location: Buckinghamshire, UK

Re: Sotware reset command on a 5270

Post by BillC »

Hi GreenGene, I am still investigating and will reply further when I have more info.

Thanks, Bill
BillC
Posts: 72
Joined: Tue Oct 13, 2009 6:22 am
Location: Buckinghamshire, UK

Re: Sotware reset command on a 5270

Post by BillC »

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
Post Reply