IQMESH BondNode: distinguish between causes of ERROR_FAIL
When a C bond node request fails with code 1 (ERROR_FAIL), it can mean any of the following:
- Nonzero ReqAddr is already used.
- No free address is available when ReqAddr equals 0.
- ReqAddr is out of range of valid addresses.
- Internal call to bondNewNode failed.
- Bonded [N]did not respond to the testing FRC.
ERROR_FAIL is also returned when local bonding is not invoked within 10s of receiving the request.
Proposed changes - perform additional requests and introduce additional error codes to distinguish between various situations.
- Perform C bonded nodes to see if requested address is used and return a unique code.
- Perform C bonded nodes to see if there is any free address and return a unique code.
- IQMESH service request should be invalidated by json schema rules.
- We have no way of knowing whether or not this happened.
- We have no way of knowing whether or not this happened.
For cases 4 and 5: If the request is executed from daemon, fails and returns 1, it has to be one of these cases, to be treated as timeout by not pressing node device button when attempting to bond a new node device.
Edited by Karel Hanák