Detach/Attach cycling at night

General PhidgetSBC Discussion.
berkinet
Phidget Mastermind
Posts: 153
Joined: Thu Sep 17, 2009 12:17 pm
Contact:

Detach/Attach cycling at night

Postby berkinet » Sun Mar 10, 2019 3:06 am

I am having an odd issue in which the Hub continually detaches and re-attaches at night! This issue seems to coincide with sunset and sunrise and is happening nightly.

The system is: a 3133 Load Cell connected to a DAQ1500_0 connected to a HUB0000_0 connected to an SBC3. All Phidget software is current. All of these devices are located in enclosed containers, outside, and subject to temperature changes between around 4ºC and 20ºC. The client code is written in Python 2.7 and is running on MacOS 10.14.3.

Starting around dusk I begin to see occasional Detach events followed by attach events on the client. Soon thereafter, and up until around dawn this pattern then occurs around 30 times over a 12 hour period and the time between events is between 1 minute and 3 hours. This does not happen during daylight hours.

phidget22networkserver.log on the SBC3 shows event sequences like this one:
    ERR [phidget22net][2019-03-10T03:10:50 servers.c+752 runClientConnection()]: 'CasaMilagro-Portail-103' failed for client phid22device://192.168.5.138:53600
    server.c+615 handleDeviceClient() : (Timed Out) failed to handle client request

    ERR [phidget22net][2019-03-10T03:31:27 servers.c+599 checkKeepAlive()]: phid22device://192.168.5.138:51603: keepalive [4000000 usec] timeout [282555873954 usec < 282555874275 usec]

    ERR [phidget22net][2019-03-10T03:31:27 servers.c+599 checkKeepAlive()]: phid22device://192.168.5.138:53973: keepalive [4000000 usec] timeout [282555874771 usec < 282555875901 usec]

    ERR [phidget22net][2019-03-10T03:31:27 servers.c+752 runClientConnection()]: 'CasaMilagro-Portail-102' failed for client phid22device://192.168.5.138:51603
    server.c+615 handleDeviceClient() : (Timed Out) failed to handle client request

    ERR [phidget22net][2019-03-10T03:31:27 servers.c+752 runClientConnection()]: 'CasaMilagro-Portail-104' failed for client phid22device://192.168.5.138:53973
    server.c+615 handleDeviceClient() : (Keep Alive) failed to handle client request
    [0xb5e054d0]subiop complete 0xb5e05920
    server.c+586 handleDeviceClient() : (Keep Alive) handleNetworkRequest() failed
    servers.c+688 handleNetworkRequest() : (Keep Alive) failed to read request
    network.c+585 readRequestHeader() : (Keep Alive) failed to read request header


    ERR [phidget22net][2019-03-10T06:28:46 servers.c+599 checkKeepAlive()]: phid22device://192.168.5.138:54723: keepalive [4000000 usec] timeout [293194974092 usec < 293194974410 usec]

Ideas?

User avatar
Patrick
Lead Developer
Posts: 3064
Joined: Mon Jun 20, 2005 8:46 am
Location: Canada
Contact:

Re: Detach/Attach cycling at night

Postby Patrick » Tue Mar 12, 2019 11:28 am

These detaches are not the USB hub detaching on the SBC, but detaches cause by network issues.

How are your SBC and Mac connected? WiFi/Ethernet? Are you sure that your Mac is not going to sleep at night?

If you set up a Ping test from the mac to the SBC overnight, do you see any dropped packets or really large latencies?

-Patrick

berkinet
Phidget Mastermind
Posts: 153
Joined: Thu Sep 17, 2009 12:17 pm
Contact:

Re: Detach/Attach cycling at night

Postby berkinet » Wed Mar 13, 2019 10:54 am

I thought the detach was between the server running phidgets22NetwrokServer and the USB connected Phidget. Is that not the case.

Anyway, to answer your questions, the Mac is connected by wired Ethernet (100-BaseT). The Mac does sleep at night, but, I see the problems when I am at the Mac.

However, while I saw this same set of events for three nights in a row, they have not reappeared for the last 2 night. AFAIK, other than another reboot because of a problem with the Phidget21 libs on the SBC, nothing has changed.

I can't fix what isn't broken. So, I will monitor this for a while and post back if it happens again or I learn something new.

Thanks


Return to “General”

Who is online

Users browsing this forum: No registered users and 2 guests