Hi There!
I have a Chirpstack v4 running on R-PI and Thingsboard C.E on a ubuntu server.
I have several devices working, but for the first time I need to set up a downlink to enable/disable the relay output in a Dragino LT-22222-L device.
I’ve followed many many guides and a long chat with ChatGPT…and Im completly stuck as the HTTP API command that should work to send downlinks to devices, doesn’t work at all.
I’ve been able to send commands with the QUEUE option with some hexa bytes, so downlink itself works on the device, but the API call does not
This what Im trying in CURL:
curl -v -X POST http://*serveraddress*:8081/api/devices/a84041XXXXXXXXXXX/down -H "Authorization: Bearer XXXXXXXXXXXXXJhbGciOiJIUzI1NiJ9.eyJhdWQiOiJjaGlycHN0YWNrIiwiaXNzIjoiY2hpcnBzdGFjayIsInN1YiIXXXXXXXXXzMtNGRkNi1iN2JmLThlMDhjNGFlODRhZCIsInR5cCI6ImtleSJ9.JrxQgNqGce4JXXXXXXXXXXXXXXXXXXXXXXXXX -H "Content-Type: application/json" -d '{"confirmed": true,"fPort": 2,"data": "AQ=="}'
Ok I hid some data iwth XXX but other than that, it’s all the same
The Authorization was taken from the section:API KEYS, inside TENANT, although I tried another key created outside the tenant, same result
The port is correct, 8081 is where my Chirpstack “lives”, what I use to enter the web application and manage all.
a84041XXXXXXXXXXX is the actual DevEUI from the Dragino LT-22222-L
And the reply from this POST is:
* Host XXXXXXX.org:8081 was resolved.
* IPv6: (none)
* IPv4: XX.XX.XX.91
* Trying XX.XX.XX.91:8081...
* Connected to XXXXXXX.org (XX,XX,XX.91) port 8081
> POST /api/devices/a84041ccXXXXXX/down HTTP/1.1
> Host: XXXXXXXXXXXX:8081
> User-Agent: curl/8.7.1
> Accept: */*
> Authorization: Bearer XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYZZZZZZZZZZZZZZZZZZZZZZZ -H Content-Type:
>
* Request completely sent off
< HTTP/1.1 400 Bad Request
< content-length: 0
< date: Tue, 03 Sep 2024 21:36:52 GMT
<
* Connection #0 to host XXXXXXX.org left intact
* URL rejected: Malformed input to a URL function
* Closing connection
curl: (3) URL rejected: Malformed input to a URL function
* URL rejected: Malformed input to a URL function
* Closing connection
curl: (3) URL rejected: Malformed input to a URL function
* URL rejected: Malformed input to a URL function
* Closing connection
curl: (3) URL rejected: Malformed input to a URL function
Is there anything I need to install on Chirpstack to allow downlinks?
Is there anythign else I could be missing?
Am I misunderstanding any of the parameters?
Thanks in advance!