Reputation: 69
I have created an application in Things Network for LoRaWAN. Also registered a device within that application.
Uplink payload from Things Network 01 67 00 FF
Now i want to send uplink message from postman or MQTT publisher client.
I tried to create a payload for postman i.e. Url : http://MyMachineIP:4061/iot/json?=MyDeviceId&k=APIKEY
JSON PAYLOAD
{
"app_id": "MyApplicationID",
"dev_id": "MyDeviceId",
"hardware_serial": "AAAAAAAAAAAAAAAA",
"payload_raw": "AWcA/w==",
"metadata": {
"gateways": [
{
"gtw_id": "TEST_1",
"rssi": 0,
"snr": 0
}
]
}
}
but got error Cannot POST /iot/json.
I also tried using MQTT Publisher Client:
Installed Eclipse Mosquitto providers a CLI to subscribe and to publish messages.
Start Mosquitto Service.
MQTT command to publish uplink measure:
mosquitto_pub -h eu.thethings.network -p 1883 -u applicationid-P ttn-account-v2.xXXXXXXXXXXXXXXXXXXXXXXXXX -t applicationid/devices/deviceid/up -m '{"port":1,"payload_raw":"AWcAuw=="}' -d
MQTT command to subscribe uplink measure:
mosquitto_sub -h eu.thethings.network -p 1883 -u applicationid -P ttn-account-v2.x2Q20IXXXXX
Upvotes: 2
Views: 424
Reputation: 55
I recommend you reading this IoT Agent LoRaWAN guide https://fiware-lorawan.readthedocs.io/en/latest/users_manual/index.html Device provisioning, config and read this part: In this case, the IoTA will subscribe to any observation coming from the LoRaWAN application server. Whenever a new update arrives, it will create the corresponding device internally and also in the Context Broker using the pre-provisioned configuration. Finally, it will forward appropriate context update requests to the Context Broker to update the attributes' values.
Regards!
Upvotes: 1