Add mechanism to send 7-bit error codes to MCU device. Reports errors in upper 7-bits of existing CONTROL Gatt characteristic which previously only used the lowest bit. Now instead of cluelessly observing mqtt timeouts, the MCU can get a sense of what triggered that TIMEOUT from the peer's error codes.
There is a companion PR in amazon-freertos for handling these error codes on MCU side.
Side Note:
Wanted to make full use of the exception reasons listed in org.eclipse.paho.client.mqttv3.MqttException.java and catch them in application layer but kept getting REASON_CODE_CLIENT_EXCEPTION claiming 'already connected 'despite adding triggers for other exception reasons, like deleting a policy that should be there. May be a separate issue, or I may need to look elsewhere in the code to retrieve that information.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Add mechanism to send 7-bit error codes to MCU device. Reports errors in upper 7-bits of existing CONTROL Gatt characteristic which previously only used the lowest bit. Now instead of cluelessly observing mqtt timeouts, the MCU can get a sense of what triggered that TIMEOUT from the peer's error codes.
There is a companion PR in
amazon-freertos
for handling these error codes on MCU side.Side Note: Wanted to make full use of the exception reasons listed in
org.eclipse.paho.client.mqttv3.MqttException.java
and catch them in application layer but kept gettingREASON_CODE_CLIENT_EXCEPTION
claiming 'already connected 'despite adding triggers for other exception reasons, like deleting a policy that should be there. May be a separate issue, or I may need to look elsewhere in the code to retrieve that information.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.