在SF7中设置了MBED OS 5.9 LoRA [英] MBED OS 5.9 LoRA set up in SF7

查看:175
本文介绍了在SF7中设置了MBED OS 5.9 LoRA的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您知道如何在Mbed-OS LoRaWAN协议API中将扩展因子设置为12,以使用OTAA连接到LoRaWAN网络吗?

Do you know how to set up the Spreading Factor to 12 in a Mbed-OS LoRaWAN protocol APIs to connect to a LoRaWAN network using OTAA?

我试图使LoRA节点使用扩展因子SF12,因为默认值是SF7.我知道在PHY层中,我们可以更改无线电配置.有几个示例可以在不同的亚GHz频段之间进行切换,但是,我找不到一个如何在7至12之间更改带宽为125 kHz的LoRa调制SF的方法. 我正在EU 868 MHz配置中使用SX1276无线电.

I'm trying to make LoRA node to use Spreading Factor SF12, because the default one is SF7. I know that in the PHY layer we can change Radio configurations. There are several examples to change between the different sub-GHz frequency bands, however, I can't find one on how to change the LoRa modulation SF between 7 and 12 and with a bandwidth of 125 kHz. I'm using an SX1276 radio at EU 868 MHz config.

来源中代码,您可以找到SF7-12的不同配置,但是没有明确的设置方法.这些配置是定义(#define)DR_0,DR_等).

In the source code you can find the SF7-12 different configurations, but there is not a clear way to set it up. These configs are the definitions (#define) DR_0, DR_, etc ).

在Phy部分的配置文件中,您会找到类似以下的示例:

In the configuration file in the Phy part you find some example like this:

        "phy": {
        "help": "LoRa PHY region. 0 = EU868 (default), 1 = AS923,
         2 = AU915, 3 = CN470, 4 = CN779, 5 = EU433, 
         6 = IN865, 7 = KR920, 8 = US915, 9 = US915_HYBRID",
        "value": "0"
    },

但是没有传播因子的例子或描述.

But there is no examples or description for the Spreading Factor.

我想通过源代码而不是配置文件来更改它.

I would like to change it via source code, rather than the configuration file.

在乔恩回答之后,我添加了以下几行,但仍然没有强制使用SF12 Joins.

after Jon's answer, I add the following lines, but still not forcing the SF12 Joins.

retcode = lorawan.disable_adaptive_datarate ();
retcode = lorawan.set_datarate (0); //  DR_0

推荐答案

致电:

lorawan.set_datarate(0); // SF12 125 KHz

请确保:

  1. 禁用ADR.
  2. 使用ABP,JOIN_SUCCESS事件处理程序中调用上面的函数.这是因为加入过程始终从SF7开始,然后保持成功加入的数据速率.
  1. Disable ADR.
  2. Either use ABP, or call the function above in the JOIN_SUCCESS event handler. This is because join procedure always starts at SF7, and then keeps the data rate on which the join succeeded.

这篇关于在SF7中设置了MBED OS 5.9 LoRA的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆