MQTT gateway doesn't work with Thai API
Opened this issue · 9 comments
Hi,
I tried to reproduce the error using your message from the picture in a unit test, but I cannot manage to format the string properly. Could you post the message that is logged as plain text please?
I found the difference. The Thai API uses the same API versions as the European App. But unfortunately SAIC added a languageType field in the European app, without increasing the version number. Please try out #47. The login should work there, but there might be more problems.
The error message is a byte array, but it contains string data. You should be able to do new String(loginResponseMessage.getBody().getErrorMessage(), StandardCharsets.UTF_8)
to get the message.
The error message is a byte array, but it contains string data. You should be able to do
new String(loginResponseMessage.getBody().getErrorMessage(), StandardCharsets.UTF_8)
to get the message.
I'm just forgot to change API URI to Thailand SAIC URI. Currently, the Login API is working fine, but the other APIs are not functioning properly. I will now attempt to debug the other APIs one by one
It appears that the MQTT gateway is using the API asn1 schema v2.1, but for Thailand, the API uses asn1 schema v2.0. You can find more information about this at the following URI: https://iov-tap.mgthai.com/TAP.Web/ota.mpv20.
I have added some parts of the ASN.1 schema for version 2.0. Could you try it with them?