command sending API problem

Prince Rajput 2 years ago

while i am sending command using traccar API it's working fine for the given :

868450045051396 (GT06)

but the same API for the given device not working ...

017018462864 (Hubao)

developers kindly help me out to resolve this.

Anton Tananaev 2 years ago

What's the problem exactly? Is there an error? You have to provide more details.

Prince Rajput 2 years ago
Illegal hexadecimal character # at index 3 - DecoderException (... < DataConverter: 29 < BaseProtocol: 100 < ActiveDevice: 55 < ...)
Anton Tananaev 2 years ago

The error means that the format you're using is wrong.

Prince Rajput 2 years ago

we are using given below for calling api --

curl --location 'http://{IP}:8082/api/commands/send' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic {dynamic token code}' \
--data '{
     "deviceId": 17018462815,
    "type": "custom",        
      "attributes": {

      "data": "{Command}"   
 }
}'
Anton Tananaev 2 years ago

I'm talking about the "{Command}" in your example. That format is incorrect.