First of all, thanks a lot for this very valuable forum and keeping it running!
I'm trying to set up a very basic project that reads sensor data and then posts it to an Adafruit IO feed using the SIM7600 module and its builtin HTTP stack.
I'm running into the same problem described here: viewtopic.php?p=923075&hilit=406#p923075 (but it's locked, so I cannot follow up)
My log looks awfully similar to the post about the same issue:
Code: Select all
AT+HTTPINIT
OK
AT+HTTPPARA="URL","https://io.adafruit.com/api/v2/mdymczyk/feeds/temperature/data"
OK
AT+HTTPPARA="CONTENT","application/json"
OK
AT+HTTPPARA="USERDATA","X-AIO-Key: <edited out>"
OK
AT+HTTPDATA=42,5000
DOWNLOAD
{"value": 39, "lat": 23.1, "lon": "-73.3"}
OK
AT+HTTPACTION=1
OK
+HTTPACTION: 1,406,45
HTTP/1.1 406 Not Acceptable
On the other hand, using curl with the same feed and the API key works totally fine:
Code: Select all
curl -H "Content-Type: application/json" -d '{"value": 39, "lat": 23.1, "lon": "-73.3"}' -H "X-AIO-Key: <edited out>" https://io.adafruit.com/api/v2/mdymczyk/feeds/temperature/data
What would e406 even mean in this context?
Do you maybe have any idea how could I better pinpoint the source of the issue? Is this about authentication, data format, API key?