LoRa与LoRaWAN技术详解:低功耗广域网络的应用与优势

需积分: 10 0 下载量 2 浏览量 更新于2024-07-16 收藏 2.08MB PDF 举报
"这篇技术概述文件详细介绍了LoRa和LoRaWAN技术,包括它们的基本概念、应用场景、优点和特性。LoRa是一种专有的低功耗广域网络(LPWAN)射频调制技术,由Semtech公司开发,旨在标准化LPWAN,提供远距离通信能力。LoRaWAN则是一种基于LoRa的开放协议,适用于需要长距离或深穿透建筑通信、低功耗需求和小数据量传输的大量设备应用。" 本文首先阐述了LoRa的核心技术特点,它能够实现城市环境下3英里(5公里)和乡村环境下10英里(15公里)以上的通信距离(视具体情况而定)。这种技术的关键在于其极低的功率需求,使得电池驱动的设备可以工作长达10年。LoRa网络采用星型拓扑结构,能够支持大量设备的连接。 接着,文件详细介绍了LoRaWAN协议架构,这是一个层次化的网络架构,通常包括终端设备、网关、网络服务器、应用服务器和用户端应用。终端设备是低功耗设备,负责数据采集和发送;网关作为透明中继,不处理数据,仅转发信号;网络服务器负责网络管理和数据包路由;应用服务器处理特定应用的数据;用户端应用则利用这些数据进行分析和决策。 LoRaWAN设备根据功能和电源管理策略分为Class A、B和C三类。Class A设备是最节能的,双向通信在发送后有两次短暂的接收窗口;Class B设备增加了定时的接收窗口,适合需要定时同步的应用;Class C设备几乎始终打开接收状态,适合需要实时响应的应用。 此外,文件还探讨了LoRaWAN的优点,如自组织网络、安全性和可扩展性,以及一些潜在的挑战,如频谱拥堵和网络覆盖问题。LoRaWAN标准支持多频道和多数据速率操作,以优化频谱效率和网络容量。 LoRa和LoRaWAN是构建大规模物联网(IoT)解决方案的重要组成部分,尤其适用于智慧城市、农业监控、环境监测、资产追踪等领域。然而,实际应用中还需要考虑网络规划、频谱管理以及与现有网络的共存策略。

arm-none-eabi-gcc -o "SENSOR_CB.elf" @"objects.list" -mcpu=cortex-m3 -T"C:\Users\WangBingqian\Desktop\SC10L151Cube\trunk\NO_FOTA_VERSION\STM32L151CBTXA_FLASH.ld" --specs=nosys.specs -Wl,-Map="SENSOR_CB.map" -Wl,--gc-sections -static --specs=nano.specs -mfloat-abi=soft -mthumb -Wl,--start-group -lc -lm -Wl,--end-group Core/Src/rs485.o: In function `get_sample_data_max_min_value': rs485.c:(.text.get_sample_data_max_min_value+0x0): multiple definition of `get_sample_data_max_min_value' Core/Src/lora_wan.o:lora_wan.c:(.text.get_sample_data_max_min_value+0x0): first defined here Core/Src/rs485.o: In function `computeMvScale': rs485.c:(.text.computeMvScale+0x0): multiple definition of `computeMvScale' Core/Src/lora_wan.o:lora_wan.c:(.text.computeMvScale+0x0): first defined here Core/Src/rs485.o: In function `computeMvScale_f': rs485.c:(.text.computeMvScale_f+0x0): multiple definition of `computeMvScale_f' Core/Src/lora_wan.o:lora_wan.c:(.text.computeMvScale_f+0x0): first defined here Core/Src/rs485.o: In function `generate_frag_data': rs485.c:(.text.generate_frag_data+0x0): multiple definition of `generate_frag_data' Core/Src/lora_wan.o:lora_wan.c:(.text.generate_frag_data+0x0): first defined here Core/Src/rs485.o:(.bss.frag_num+0x0): multiple definition of `frag_num' Core/Src/lora_wan.o:(.bss.frag_num+0x0): first defined here collect2.exe: error: ld returned 1 exit status make: *** [makefile:50: SENSOR_CB.elf] Error 1 "make -j4 all" terminated with exit code 2. Build might be incomplete.是什么错误

2023-06-09 上传

create LoRA network. base dim (rank): 64, alpha: 32 neuron dropout: p=None, rank dropout: p=None, module dropout: p=None create LoRA for Text Encoder: 72 modules. create LoRA for U-Net: 192 modules. enable LoRA for text encoder enable LoRA for U-Net Traceback (most recent call last): File "D:\lora_lian\sd-scripts\train_network.py", line 873, in <module> train(args) File "D:\lora_lian\sd-scripts\train_network.py", line 242, in train info = network.load_weights(args.network_weights) File "D:\lora_lian\sd-scripts\networks\lora.py", line 884, in load_weights info = self.load_state_dict(weights_sd, False) File "D:\lora_lian\python\lib\site-packages\torch\nn\modules\module.py", line 2041, in load_state_dict raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format( RuntimeError: Error(s) in loading state_dict for LoRANetwork: size mismatch for lora_unet_mid_block_attentions_0_proj_out.lora_up.weight: copying a param with shape torch.Size([1280, 128, 1, 1]) from checkpoint, the shape in current model is torch.Size([1280, 64, 1, 1]). Traceback (most recent call last): File "D:\lora_lian\python\lib\runpy.py", line 196, in _run_module_as_main return _run_code(code, main_globals, None, File "D:\lora_lian\python\lib\runpy.py", line 86, in _run_code exec(code, run_globals) File "D:\lora_lian\python\lib\site-packages\accelerate\commands\launch.py", line 1114, in <module> main() File "D:\lora_lian\python\lib\site-packages\accelerate\commands\launch.py", line 1110, in main launch_command(args) File "D:\lora_lian\python\lib\site-packages\accelerate\commands\launch.py", line 1104, in launch_command simple_launcher(args) File "D:\lora_lian\python\lib\site-packages\accelerate\commands\launch.py", line 567, in simple_launcher raise subprocess.CalledProcessError(returncode=process.returncode, cmd=cmd) subprocess.CalledProcessError: Command '['D:\\lora_lian\\python\\python.exe', './sd-scripts/train_network.py', '--config_file', 'D:\\lora_lian\\toml\\autosave\\20230709-112914.toml']' returned non-zero exit status 1. Training failed / 训练失败

2023-07-10 上传

Build started: Project: template *** Using Compiler 'V6.19', folder: 'D:\Keil_v5\ARM\ARMCLANG\Bin' Build target 'Target 1' ../User/main.c(2): error: 'lora.h' file not found #include "lora.h" ^~~~~~~~ 1 error generated. compiling main.c... LoRa.c(8): error: use of undeclared identifier 'RCU_AF' rcu_periph_clock_enable(RCU_AF); ^ LoRa.c(9): error: call to undeclared function 'gpio_init'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] gpio_init(LORA_UART_GPIO, GPIO_MODE_AF_PP, GPIO_OSPEED_50MHZ, LORA_UART_GPIO_PIN_TX); ^ LoRa.c(9): error: use of undeclared identifier 'GPIO_MODE_AF_PP' gpio_init(LORA_UART_GPIO, GPIO_MODE_AF_PP, GPIO_OSPEED_50MHZ, LORA_UART_GPIO_PIN_TX); ^ LoRa.c(10): error: use of undeclared identifier 'GPIO_MODE_IN_FLOATING' gpio_init(LORA_UART_GPIO, GPIO_MODE_IN_FLOATING, GPIO_OSPEED_50MHZ, LORA_UART_GPIO_PIN_RX); ^ LoRa.c(23): error: use of undeclared identifier 'GPIO_MODE_IPU' gpio_init(LORA_AUX_GPIO, GPIO_MODE_IPU, GPIO_OSPEED_50MHZ, LORA_AUX_GPIO_PIN); ^ 5 errors generated. compiling LoRa.c... Usart.c(8): error: use of undeclared identifier 'RCU_AF' rcu_periph_clock_enable(RCU_AF); ^ Usart.c(9): error: call to undeclared function 'gpio_init'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] gpio_init(USART_UART_GPIO, GPIO_MODE_AF_PP, GPIO_OSPEED_50MHZ, USART_UART_GPIO_PIN_TX); ^ Usart.c(9): error: use of undeclared identifier 'GPIO_MODE_AF_PP' gpio_init(USART_UART_GPIO, GPIO_MODE_AF_PP, GPIO_OSPEED_50MHZ, USART_UART_GPIO_PIN_TX); ^ Usart.c(10): error: use of undeclared identifier 'GPIO_MODE_IN_FLOATING' gpio_init(USART_UART_GPIO, GPIO_MODE_IN_FLOATING, GPIO_OSPEED_50MHZ, USART_UART_GPIO_PIN_RX); ^ 4 errors generated. compiling Usart.c... ".\Objects\template.axf" - 10 Error(s), 0 Warning(s). Target not created. Build Time Elapsed: 00:00:01

2023-07-17 上传