Reference Home

Error Management

Description

WiFi shield can detect some transmission problems. The deault management provides a complete Arduino automatic reset if error is < 73.

But you can chose to manage error in customized way.

If you want manage error create a function and assign its name to a WiFi function pointer MWiFi.errorHandle

"errorHandle" function pointer has an argument that is the error code number:

void (*errorHandle)(int);

Example : MWiFi.errorHandle=myFun ; where myFun: void myFun(int code){....}

Error Codes

    60 - baud rate generator error
    61 - invalid connection profile ID
    62 - Wi-Fi already connected error
    63 - Wi-Fi already disconnected error
    64 - Close socket failed error
    65 - Socket Sendto time out error (ARP request Timed Out)
    66 - Scan index out of range error
    67 - ICMP ping flood error
    68 - ICMP ping in use error
    69 - Socket RecvFrom failed
    71 - Serial transmit buffer allocation error error
    72 - General Assert error
    73 - invalid powersave mode error
    74 - busy (hibernate mode) error
    75 - busy (scan mode) error

Default

If ERRORLOG define is 1 : code is printed.

If code < 73 : reset . Else nothing.

N.B. Wi-Fi connection lost is not a error code and in this case reset is always performed (another routine manages this asyncronous event)

Reference Home