[En-Nut-Discussion] Opened TCP connection. Watchdog timers going ok here. Realtek stopping for a breather.
Brett Abbott
Brett.Abbott at digital-telemetry.com
Sun May 30 22:45:08 CEST 2004
Hi
We have observed and measured noticable periods of "hang" when the ethernet port is enabled, configured and idle with a listener running.
We had a unit which needed to communicate in a tight rs232 handshake with a connected device and we were getting timeouts. With a serial analyser, we detected delays were >50ms and less than 300ms, during which the interupts appear not to run. Whilst following the "turn everything off bit by bit till it goes" mantra, I found that the problem went away when the ethernet adaptor wasnt initialised at all. If the adaptor was initialised, it was intermittent, although more frequent when not being watched (via ethernet). This later observation could be similar to what you were seeing as I hadnt the time to see if my monitoring TCP connection impacted the results - I certainly didnt assume that heavier traffic would improve the situation.
Im using Ethernut 1, ref F. Nutos 330, but are planning to upgrade at the next release.
We have the Watchdog up and running but had to allow for the realtek Ethernet adaptor when making it go. A few tips:
1. We had to set the watch dog timeout at 2secs. anything less meant that (a) initialising the ethernet adaptor would cause reboot. (b) idle states (above issue) could trigger reboot.
2. Care to be taken when initialising the adaptor. If you write big unweildy code like me, you will need to place a "WDR" before and after the call to initialise the adaptor.
3. Place your code to initialise the Watchdog and establish a 2 second tick in the nutinit code otherwise you may not have enough time to enter the "main" section before the big R.
How did I fix the 1st problem? Didnt need the ethernet adaptor except for debugging. Turned it off. PPP works fine.
I'd be very interested in how others have implemented the Watchdog, if at all, please let me know off list and if there is interest, I could publish a combined paper for Harald and Oliver.
If the "ethernet hang/pause" is a known issue, I'd also appreciate any guidance or pointers.
Regards
Brett
------------------------------
Message: 4
Date: Thu, 27 May 2004 16:00:47 -0400
From: "Alexander Baranov" <Baranov at intech21.com>
Subject: [En-Nut-Discussion] opened TCP connection
To: <en-nut-discussion at egnite.de>
Message-ID: <001501c44425$4e2edfb0$1101000a at Alex>
Content-Type: text/plain; charset="koi8-r"
Hi.
I have to establish TCP connection and stay connected for a long time (e.g.
several hours). I create a socket 'dirsock' , start accepting the
connection with port 23 (telnet) - NutTcpAccept(dirsock, 23). When
connected, I go to an infinite looped command monitor. It works fine but if
I stop active data exchange (issuing monitor commands through telnet) it
hangs after 10-15 seconds of idle state and reboots through watchdog timer.
Is it natural behavior of connected sockets without active data transfer or
I miss something as usual?
Thanks,
Alexander Baranov
Intech21, Inc.
50 Glen Street,
Glen Cove, NY, 11542
www.intech21.com
--------------
-----------------------------------------------------------------
Brett Abbott, Managing Director, Digital Telemetry Limited
Email: Brett.Abbott at digital-telemetry.com
PO Box 24 036 Manners Street, Wellington, New Zealand
Phone +64 (4) 5666-860 Mobile +64 (21) 656-144
------------------- Commercial in confidence --------------------
More information about the En-Nut-Discussion
mailing list