Nicholas
(nicholas)
June 23, 2020, 4:41am
21
Did you get into the network successfully? You must configure the correct parameters and join the network.
发件人: Pradeeka Seneviratne via RAKwireless Forum [email protected]
日期: 2020年6月23日周二 中午12:32
收件人: [email protected]
主 题: [RAKwireless Forum] [LPWAN Nodes] Reset RAK7205 Tracker
pradeeka
(Pradeeka Seneviratne)
June 23, 2020, 4:58am
22
Yes, my RAK7205 nodes are (I have 2) successfully sending data to the TTN. My activation method is ABP.
Nicholas
(nicholas)
June 23, 2020, 6:35am
23
EU433 No frequency plan yet. Submit a proposal!
I have a question, Can EU433 access TTN?
pradeeka
(Pradeeka Seneviratne)
June 23, 2020, 7:25am
24
For testing I have updated the gateway (RAK7244) config file to work with 433MHz. The gateway and two sensor nodes originally came with 433 antennas. So I can’t use other frequencies.
In my country CN470 overlaps UHF TV bands.
EU915/868 overlaps with Cellular.
Nicholas
(nicholas)
June 23, 2020, 7:28am
25
But it seems that TTN does not support EU433. You must choose another server.
pradeeka
(Pradeeka Seneviratne)
June 23, 2020, 7:36am
26
Okay. Thanks for the information. So I can use ChirpStack.
pradeeka
(Pradeeka Seneviratne)
June 23, 2020, 8:24am
28
Do you have a public ChripStack server supports with EU433?
nmcc
(Nick McCloud)
June 23, 2020, 8:25am
29
There aren’t any agreed frequencies for EU433 so you’d have to take a standard install and alter it to suit.
Nicholas
(nicholas)
June 23, 2020, 8:27am
30
The RAK Gateway comes with a built-in server available.
pradeeka
(Pradeeka Seneviratne)
June 23, 2020, 8:28am
31
Nicholas
(nicholas)
June 23, 2020, 8:46am
33
1 Like
pradeeka
(Pradeeka Seneviratne)
June 24, 2020, 2:12am
34
I moved my network to ChirpStack. It is working perfectly with EU433 and also I can send downlink messages. Now I can test the code for device ‘RESET’.
Nicholas
(nicholas)
June 24, 2020, 2:15am
35
You’re great, and you can add more features you need.
1 Like
pradeeka
(Pradeeka Seneviratne)
June 29, 2020, 1:36am
37
Hi All, I have added the following features to RAK7205. Now you can reset your node and set the ‘send time interval’ through downlink.
Downlink:
RESET: Type Code: 04 / Port: 8 / Buffer size: 2 (you should use 04FF)
SET SEND INTERVAL: Type Code: 01 / Port: 8 / Buffer size: 4 (Eg: for 60 seconds: 0100003C)
If you are running ChirpStack convert the hex value to base 64 before sending through the downlink.
Here is he modified code:
…\Products_practice_based_on_RUI\based on RAK811\app_5205\app_5205.c
void LoRaReceive_callback(RUI_RECEIVE_T* Receive_datapackage)
{
char hex_str[3] = {0};
RUI_LOG_PRINTF("at+recv=%d,%d,%d,%d", Receive_datapackage->Port, Receive_datapackage->Rssi, Receive_datapackage->Snr, Receive_datapackage->BufferSize);
if ((Receive_datapackage->Buffer != NULL) && Receive_datapackage->BufferSize) {
RUI_LOG_PRINTF(":");
for (int i = 0; i < Receive_datapackage->BufferSize; i++) {
sprintf(hex_str, "%02x", Receive_datapackage->Buffer[i]);
RUI_LOG_PRINTF("%s", hex_str);
}
}
RUI_LOG_PRINTF("\r\n");
if(Receive_datapackage->Port == 8 && Receive_datapackage->BufferSize == 2 && (Receive_datapackage->Buffer[0]<<8 | Receive_datapackage->Buffer[1]) == 0x04FF) // port: 8, size:2 bytes, type code: 0x04
{
rui_device_reset(); //restarts the device
}
if(Receive_datapackage->Port == 8 && Receive_datapackage->BufferSize == 4 && Receive_datapackage->Buffer[0] == 0x01) // port:8, size: 4 bytes, type code: 0x01, 3 bytes for time in seconds
{
int interval_time = Receive_datapackage->Buffer[1]<<16 | Receive_datapackage->Buffer[2]<<8 | Receive_datapackage->Buffer[3];
rui_lora_set_send_interval(1,interval_time); //sets send interval in seconds
}
}
1 Like
pradeeka
(Pradeeka Seneviratne)
June 29, 2020, 7:29am
39
Is there a way we can integrate this feature into the GitHub code base?
Fomi
(Fomi Tong)
June 29, 2020, 10:25am
40
Hi @pradeeka ,
Your code is used to control the RAK7205 remotely, no need to send AT commands locally. That’s good.
I think you can do a pull request in that Github repo, and we will create a branch to show how to do the remote control through LoRa packet by using RUI, and your code will be a good example.
Thank you!