Vinthub error

Supporting 2.6 and up
mtlazaro
Fresh meat
Posts: 1
Joined: Wed Jun 12, 2019 1:02 am
Contact:

Vinthub error

Postby mtlazaro » Wed Jun 12, 2019 1:25 am

Hi,
we are using several Phidgets components in our robot.
Our setup includes a SBC4 to which 2 rotary encoders, 1 potentiometer, 1 DC Motor Controller and 1 Analog Voltage Output are attached to the VINT ports.
The SBC4 is attached to a network switch where it shares a LAN with a more powerfull computer. We are running our C++ program to control the Phidgets and read data from them on this computer.

Following the scheme provided in the examples we use the "CheckError" mechanism to stop the program if any phidget function from libphidget22 fails.

We are having very frequent "CheckErrors" that make our program to crash after few minutes running.

By inspecting the NetworkServer log on the SBC4 we observe these messages each time it crashes:

Code: Select all

ERR [phidget22][2019-06-10T13:34:13 hubdevice.c+405 PhidgetHubDevice_dataInput()]: Got an unexpected MSG in vint data: 0xff
ERR [phidget22][2019-06-10T13:34:13 spi.c+91 PhidgetSPIReadThreadFunction()]: SPI ReadThread continuing - PhidgetDevice_read returned: 0x1c - Unexpected Error
ERR [phidget22][2019-06-10T13:34:13 vintdevice.c+88 PhidgetVINTDevice_bridgeInput()]: Failed to send VINT_PACKET_TYPE_PHIDGET_RESET message: 0x04 - Op Interrupted
ERR [phidget22][2019-06-10T13:34:13 phidget.c+2553 Phidget_close()]: Failed to send BP_CLOSERESET to device: 0x04 - Op Interrupted
ERR [phidget22][2019-06-10T13:34:14 vintdevice.c+88 PhidgetVINTDevice_bridgeInput()]: Failed to send VINT_PACKET_TYPE_PHIDGET_RESET message: 0x03 - Timed Out
ERR [phidget22][2019-06-10T13:34:14 phidget.c+2553 Phidget_close()]: Failed to send BP_CLOSERESET to device: 0x03 - Timed Out
ERR [phidget22][2019-06-10T13:34:15 vintdevice.c+88 PhidgetVINTDevice_bridgeInput()]: Failed to send VINT_PACKET_TYPE_PHIDGET_RESET message: 0x03 - Timed Out
ERR [phidget22][2019-06-10T13:34:15 phidget.c+2553 Phidget_close()]: Failed to send BP_CLOSERESET to device: 0x03 - Timed Out
ERR [phidget22][2019-06-10T13:34:16 spilinux.c+229 PhidgetSPISendPacket()]: write timeout
ERR [phidget22][2019-06-10T13:34:16 phidget.c+1422 sendpacket()]: PhidgetSPISendPacket() returned: 0x03 - Timed Out
ERR [phidget22][2019-06-10T13:34:16 vintdevice.c+88 PhidgetVINTDevice_bridgeInput()]: Failed to send VINT_PACKET_TYPE_PHIDGET_RESET message: 0x03 - Timed Out
ERR [phidget22][2019-06-10T13:34:16 phidget.c+2553 Phidget_close()]: Failed to send BP_CLOSERESET to device: 0x03 - Timed Out


Furthermore I inspect the /var/log/syslog and I see these type of messages after the crash:

Code: Select all

[10919.777300] vinthub (err): Incoming packet too small: 0
[10919.777311] vinthub (err): Incoming packet too small: 0
[10919.777314] vinthub (err): Incoming packet too small: 0
[10919.777317] vinthub (err): Incoming packet too small: 0
[10919.777320] vinthub (err): Incoming packet too small: 0
[10919.777323] vinthub (err): Incoming packet too small: 0
[10919.781502] vinthub (err): Incoming packet too small: 0
[10919.781505] vinthub (err): Incoming packet too small: 0
[10919.781509] vinthub (err): Incoming packet too big: 226
[10922.358942] vinthub (err): spi_xfer timeout (>200ms) - retransmitting
[10922.559042] vinthub (err): spi_xfer timeout (>200ms) - retransmitting
[10922.759136] vinthub (err): spi_xfer timeout (>200ms) - retransmitting
[10922.959188] vinthub (err): spi_xfer timeout (>200ms) - retransmitting
[10923.159261] vinthub (err): spi_xfer timeout (>200ms) - retransmitting
[10923.196354] vinthub (err): write timed out


Access to the Phidgets encoders data and commands to the motor and analog output is done at 5Hz (every 200ms).

Does anyone know about those "unexpected errors" registered by the hubdevice and what can be the reason? Our SBC4 is updated to the last libphidget22 version and we also updated the hub firmware.

Return to “Linux”

Who is online

Users browsing this forum: No registered users and 1 guest