Finally I managed to get the downlink scheduled and sent from DataCake. (Guide says that node expects it to be on fport 2, I have tried the same on port 1 as well)
Hello beegee,
Thanks for response.
I do see JSON down in my GW logs:
Feb 17 13:26:15 rak-gateway ttn-gateway[2118]: JSON up: {"rxpk":[{"jver":1,"tmst":3852626973,"chan":7,"rfch":0,"freq":867.900000,"mid": 9,"stat":1,"modu":"LORA","datr":"SF10BW125","codr":"4/5","rssis":-41,"lsnr":13.5,"foff":92,"rssi":-41,"size":23,"data":"gAszUQEAEgABbKfM2GEFGZoV19fUAEo="}]}
Feb 17 13:26:15 rak-gateway ttn-gateway[2118]: INFO: [up] PUSH_ACK received in 77 ms
Feb 17 13:26:15 rak-gateway ttn-gateway[2118]: INFO: [down] PULL_RESP received - token[150:135] :)
Feb 17 13:26:15 rak-gateway ttn-gateway[2118]: JSON down: {"txpk":{"imme":false,"rfch":0,"powe":14,"ant":0,"brd":0,"tmst":3853626973,"freq":867.9,"modu":"LORA","datr":"SF10BW125","codr":"4/5","ipol":true,"size":12,"data":"YAszUQGgCgAGm3E5"}}
Also, I am not sure the Downlink I see in Chirpstack is the one sent from DataCake.
From DataCake, f.eg one of the parameter is the number of Gateways seen by the node. As show on below snapshot from DataCake - it is 1
Is Chirpstack version V4 or V3?
I never tried it on V4, the tutorial was made with Chirpstack V3. I had a lot of problems with Chirpstack V4 with the integrations and gave up on it for now.
Could be related to Chirpstack V4. V4 has many changes and at first try the integration with Datacake didn’t work at all anymore. I talked with Datacake and they had to make some adjustments to work with Chirpstack V4.
But I never tried the Field Tester with Chirpstack V4.
I saw your question on ChirpStack forum on this topic from last year. So the problem still remains.
Do you know if there is any alternative to DataCake which I can use with RAK10701?
I had such hopes for this device, as I am using DIY field tester at the moment
I wrote the guide for Datacake because I am very familiar with it.
But theoretically it should work with others like Ubidots, or just a simple web server running javascript (or PHP/Python/…) to receive the downlinks, analyze them and create the uplink.
I am good with end-devices, but not with server applications, so I cannot help you with creating it.
I suspect that problem might be in CS API side. From V4, chirpstack-rest-api should be installed separately, before it was installed by default. So now I simply do not have it, nothing is listening to the downlink. I will be checking again once I configure the CS API. Hope that is the only reason
Ok I decided to go different way, since DataCake support is not responding. I am going to listen to MQTT and then enqueue downlink myself once the EUID of my RAK tester is mached.
f.eg below python script (example taken from ChirpStack documentation), will send downlink to the given EUID
import os
import sys
import grpc
from chirpstack_api import api
# Configuration.
# This must point to the API interface.
server = "[Chirpstack server IP]:8080"
# The DevEUI for which you want to enqueue the downlink.
dev_eui = "[RAK EUID]"
# The API token (retrieved using the web-interface).
api_token = "[API from Chirpstack]"
if __name__ == "__main__":
# Connect without using TLS.
channel = grpc.insecure_channel(server)
# Device-queue API client.
client = api.DeviceServiceStub(channel)
# Define the API key meta-data.
auth_token = [("authorization", "Bearer %s" % api_token)]
# Construct request.
req = api.EnqueueDeviceQueueItemRequest()
req.queue_item.confirmed = False
req.queue_item.data = bytes([0x01, 0x9A, 0x9E, 0x01, 0x01, 0x0F])
req.queue_item.dev_eui = dev_eui
req.queue_item.f_port = 2
resp = client.Enqueue(req, metadata=auth_token)
# Print the downlink id
print(resp.id)
Here is how bytes([0x01, 0x9A, 0x9E, 0x01, 0x01, 0x0F]) payload looks like on the end node - so the downlink problem is solved.
Next, I have another piece of python code (will share later), to subscribe to the MQTT topic and listen to the uplinks.
Main challenge will be to port the Javascript decode scripts into python and merge all in one. This final py script will be running on the same chirpstack server as a service, so I will get rid of the 3rd party dependency.
I am confused.
The link in your message goes to the Payload Decoder and has nothing to do with the firmware. The bug with the distances was not in the firmware but in the Payload Decoder used in Datacake.
DON’T INSTALL A STANDARD AT COMMAND FIRMWARE ON THE RAK10701. YOU WILL LOOSE ALL FUNCTIONALITY OF THE DEVICE.
The RAK10701 is not listed in WisToolBox yet. It will be added in the future.
That’s bad news, I was not aware of it. I already did it as wistoolbox suggested that there is one fw update available. Now device is not starting up at all, however I can still access it via wistoolbox.
Can you share the stable working firmware so I can flash it again?