{"id":100257,"date":"2025-01-07T15:11:57","date_gmt":"2025-01-07T07:11:57","guid":{"rendered":"https:\/\/www.techphant.cn\/?p=100257"},"modified":"2025-01-07T15:12:33","modified_gmt":"2025-01-07T07:12:33","slug":"lmkydpjzjdtxjk-2","status":"publish","type":"post","link":"https:\/\/www.techphant.cn\/blog\/100257.html","title":{"rendered":"LoRa\u6a21\u5757\u4e0e\u5355\u7247\u673a\u4e4b\u95f4\u7684\u901a\u4fe1\u63a5\u53e3"},"content":{"rendered":"\n
\u3000\u3000LoRa\u6a21\u5757<\/a><\/strong>\u4e0e\u5355\u7247\u673a<\/a><\/strong>\u4e4b\u95f4\u7684\u901a\u4fe1\u63a5\u53e3\u901a\u5e38\u5305\u62ec\u4e32\u53e3(UART)\u3001SPI\u548cI2C\u7b49\u7c7b\u578b\u3002\u8fd9\u4e9b\u63a5\u53e3\u7684\u9009\u62e9\u53d6\u51b3\u4e8e\u5177\u4f53\u7684\u5355\u7247\u673a\u7c7b\u578b\u548c\u5e94\u7528\u573a\u666f\u3002<\/p>\n\n\n\n \u3000\u3000\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\uff0c\u9009\u62e9\u54ea\u79cd\u901a\u4fe1\u63a5\u53e3\u53d6\u51b3\u4e8e\u5177\u4f53\u7684\u786c\u4ef6\u914d\u7f6e\u548c\u9700\u6c42\u3002\u4f8b\u5982\uff0c\u5982\u679c\u9700\u8981\u66f4\u9ad8\u7684\u6570\u636e\u4f20\u8f93\u901f\u7387\uff0c\u53ef\u4ee5\u9009\u62e9SPI\u63a5\u53e3;\u5982\u679c\u786c\u4ef6\u8bbe\u8ba1\u4e2d\u5df2\u6709UART\u63a5\u53e3\uff0c\u5219\u53ef\u4ee5\u9009\u62e9UART\u63a5\u53e3\u4ee5\u7b80\u5316\u8bbe\u8ba1\u3002<\/p>\n\n\n\n \u3000\u3000LoRa\u6a21\u5757\u4e0e\u5355\u7247\u673a\u4e4b\u95f4\u7684\u901a\u4fe1\u63a5\u53e3\u4e3b\u8981\u5305\u62ec\u4e32\u53e3(UART)\u3001SPI\u548cI2C\u7b49\u7c7b\u578b\uff0c\u5177\u4f53\u9009\u62e9\u54ea\u79cd\u63a5\u53e3\u53d6\u51b3\u4e8e\u5e94\u7528\u573a\u666f\u548c\u786c\u4ef6\u914d\u7f6e\u3002<\/p>\n\n\n\n \u3000\u3000LoRa\u6a21\u5757\u4e0eSTM32\u5355\u7247\u673a\u901a\u8fc7UART\u901a\u4fe1\u7684\u8be6\u7ec6\u914d\u7f6e\u6b65\u9aa4\u5982\u4e0b\uff1a<\/p>\n\n\n\n \u3000\u3000\u5c06LoRa\u6a21\u5757\u7684TX\u5f15\u811a\u8fde\u63a5\u5230STM32\u7684PA2\u5f15\u811a\u3002<\/p>\n\n\n\n \u3000\u3000\u5c06LoRa\u6a21\u5757\u7684RX\u5f15\u811a\u8fde\u63a5\u5230STM32\u7684PA3\u5f15\u811a\u3002<\/p>\n\n\n\n \u3000\u3000\u5c06LoRa\u6a21\u5757\u7684GND\u5f15\u811a\u8fde\u63a5\u5230STM32\u7684GND\u5f15\u811a\u3002<\/p>\n\n\n\n \u3000\u3000\u5c06LoRa\u6a21\u5757\u7684VCC\u5f15\u811a\u8fde\u63a5\u5230STM32\u76843.3V\u7535\u6e90\u5f15\u811a\u3002<\/p>\n\n\n\n \u3000\u3000\u786e\u4fddLoRa\u6a21\u5757\u548cSTM32\u5355\u7247\u673a\u4e4b\u95f4\u7684\u7535\u5e73\u5339\u914d\u3002LoRa\u6a21\u5757\u7684\u5bf9\u5916\u63a5\u53e3\u4e3a3.3V TTL\u7535\u5e73\u4fe1\u53f7\uff0c\u800cSTM32\u5355\u7247\u673a\u7684UART\u53e3\u901a\u5e38\u4e3a+5V\u8868\u793a1.0V\u8868\u793a0\u7684TTL\u7535\u5e73\u6807\u51c6\u3002\u56e0\u6b64\uff0c\u9700\u8981\u4f7f\u7528\u7535\u5e73\u8f6c\u6362\u5668\u6216\u786e\u4fdd\u4e24\u8005\u7535\u5e73\u4e00\u81f4\u3002<\/p>\n\n\n\n \u3000\u3000\u4f7f\u7528C\u8bed\u8a00\u7f16\u5199\u7a0b\u5e8f\uff0c\u914d\u7f6eSTM32\u548cLoRa\u6a21\u5757\u7684\u76f8\u5173\u5bc4\u5b58\u5668\u548c\u53c2\u6570\u3002<\/p>\n\n\n\n \u3000\u3000\u4f7f\u7528HAL\u5e93\u4e2d\u7684\u51fd\u6570\u8fdb\u884cUART\u901a\u4fe1\uff0c\u5982HAL_UART_Transmit()\u548cHAL_UART_Receive()\u7b49\u3002<\/p>\n\n\n\n \u3000\u3000\u4f7f\u7528\u4e32\u53e3\u8c03\u8bd5\u52a9\u624b\u53d1\u9001\u548c\u63a5\u6536\u6570\u636e\uff0c\u786e\u4fdd\u901a\u4fe1\u6b63\u5e38\u3002<\/p>\n\n\n\n \u3000\u3000\u68c0\u67e5\u901a\u4fe1\u53c2\u6570\u662f\u5426\u6b63\u786e\u8bbe\u7f6e\uff0c\u5982\u6ce2\u7279\u7387\u3001\u6570\u636e\u4f4d\u3001\u505c\u6b62\u4f4d\u7b49\u3002<\/p>\n\n\n\n \u3000\u3000LoRa\u6a21\u5757\u901a\u8fc7SPI\u63a5\u53e3\u4e0eSTM32\u5355\u7247\u673a\u8fde\u63a5\u65f6\u7684\u6570\u636e\u4f20\u8f93\u901f\u7387\u548c\u6548\u7387\u8868\u73b0\u826f\u597d\u3002\u4ee5\u4e0b\u662f\u8be6\u7ec6\u5206\u6790\uff1a<\/p>\n\n\n\n \u3000\u3000LoRa\u6a21\u5757(\u5982SX1278)\u901a\u5e38\u901a\u8fc7SPI\u63a5\u53e3\u4e0eSTM32\u5355\u7247\u673a\u8fde\u63a5\u3002\u7528\u6237\u53ef\u4ee5\u901a\u8fc7STM32CubeMX\u5de5\u5177\u8fdb\u884c\u786c\u4ef6\u914d\u7f6e\uff0c\u5e76\u7f16\u5199\u76f8\u5e94\u7684\u4ee3\u7801\u6765\u5b9e\u73b0SPI\u901a\u4fe1\u3002SPI\u63a5\u53e3\u7684\u914d\u7f6e\u5305\u62ec\u8bbe\u7f6e\u65f6\u949f\u901f\u7387\u3001\u6570\u636e\u4f4d\u5bbd\u548c\u6a21\u5f0f\u7b49\u53c2\u6570\u3002<\/p>\n\n\n\n \u3000\u3000LoRa\u6a21\u5757\u652f\u6301\u591a\u79cd\u901a\u4fe1\u6a21\u5f0f\uff0c\u5305\u62ec\u5355\u6b21\u548c\u8fde\u7eed\u6a21\u5f0f\uff0c\u5176\u4e2d\u8fde\u7eed\u6a21\u5f0f\u662f\u552f\u4e00\u652f\u6301\u7684\u6a21\u5f0f\u3002\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\uff0cLoRa\u6a21\u5757\u7684\u6570\u636e\u4f20\u8f93\u901f\u7387\u53d7\u5230\u591a\u79cd\u56e0\u7d20\u7684\u5f71\u54cd\uff0c\u5305\u62ec\u5de5\u4f5c\u9891\u7387\u3001\u6269\u9891\u56e0\u5b50\u3001\u5e26\u5bbd\u548c\u53d1\u5c04\u529f\u7387\u7b49\u3002\u4f8b\u5982\uff0c\u5728\u67d0\u4e9b\u5b9e\u9a8c\u4e2d\uff0c\u4f7f\u7528Ra-01\u6a21\u5757\u4e0eESP32\u8fdb\u884c\u901a\u4fe1\u65f6\uff0c\u6570\u636e\u4f20\u8f93\u65f6\u95f4\u7ea6\u4e3a81\u6beb\u79d2\u3002<\/p>\n\n\n\n \u3000\u3000LoRa\u6a21\u5757\u901a\u8fc7SPI\u63a5\u53e3\u4e0eSTM32\u5355\u7247\u673a\u8fde\u63a5\u540e\uff0c\u53ef\u4ee5\u5b9e\u73b0\u9ad8\u5ea6\u7684\u79fb\u690d\u6027\u548c\u7075\u6d3b\u7684\u53c2\u6570\u8bbe\u7f6e\u3002\u7528\u6237\u53ef\u4ee5\u901a\u8fc7\u914d\u7f6e\u5bc4\u5b58\u5668\u6765\u4f18\u5316LoRa\u901a\u4fe1\u7684\u5404\u9879\u53c2\u6570\uff0c\u4ece\u800c\u5b9e\u73b0\u6570\u636e\u4f20\u8f93\u7684\u6700\u4f73\u6548\u7387\u3002\u6b64\u5916\uff0cSPI\u63a5\u53e3\u63d0\u4f9b\u4e86\u76f4\u63a5\u8bbf\u95ee\u6a21\u5757\u5185\u90e8\u5bc4\u5b58\u5668\u7684\u80fd\u529b\uff0c\u4f7f\u5f97\u7a0b\u5e8f\u5177\u6709\u9ad8\u5ea6\u7684\u7075\u6d3b\u6027\u548c\u53ef\u63a7\u6027\u3002<\/p>\n\n\n\n \u3000\u3000\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\uff0cLoRa\u6a21\u5757\u901a\u8fc7SPI\u63a5\u53e3\u4e0eSTM32\u5355\u7247\u673a\u8fde\u63a5\u540e\uff0c\u80fd\u591f\u5b9e\u73b0\u8fdc\u8ddd\u79bb\u3001\u4f4e\u529f\u8017\u7684\u65e0\u7ebf\u901a\u4fe1\u3002\u4f8b\u5982\uff0c\u5728\u4e00\u4e2a\u57fa\u4e8eSTM32\u7684\u73af\u5883\u76d1\u6d4b\u7cfb\u7edf\u4e2d\uff0cLoRa\u6a21\u5757\u901a\u8fc7\u4e32\u53e3\u3001I2C\u548cSPI\u7b49\u63a5\u53e3\u8fde\u63a5\u73af\u5883\u4f20\u611f\u5668\uff0c\u5b9e\u73b0\u4e86\u6570\u636e\u7684\u91c7\u96c6\u548c\u8fdc\u8ddd\u79bb\u4f20\u8f93\u3002<\/p>\n\n\n\n \u3000\u3000\u4e0d\u540cLoRa\u6a21\u5757\u578b\u53f7\u4e0e\u5355\u7247\u673a\u901a\u4fe1\u63a5\u53e3\u7684\u517c\u5bb9\u6027\u548c\u9650\u5236\u7684\u95ee\u9898\uff1a<\/p>\n\n\n\n \u3000\u3000Ra-01S\u6a21\u5757\u91c7\u7528SX1268\u5c04\u9891\u82af\u7247\uff0c\u652f\u6301433\u3001868\u548c915MHz\u5168\u7403\u514d\u8d39\u9891\u6bb5\u3002<\/p>\n\n\n\n \u3000\u3000Ra-01S\u6a21\u5757\u4e0eSTM32RC3\u5355\u7247\u673a\u517c\u5bb9\uff0c\u5e76\u63d0\u4f9b\u4e86\u8be6\u7ec6\u7684\u63a5\u7ebf\u56fe\u548c\u5e94\u7528\u7535\u8def\u3002<\/p>\n\n\n\n \u3000\u3000Ra-01\u6a21\u5757\u4e5f\u91c7\u7528SX1278\/SX1276\u82af\u7247\u65b9\u6848\uff0c\u652f\u6301433MHz\u9891\u6bb5\u3002<\/p>\n\n\n\n \u3000\u3000Ra-01\u6a21\u5757\u5177\u6709\u4f4e\u529f\u8017\u3001\u9ad8\u7075\u654f\u5ea6\u3001\u6297\u5e72\u6270\u80fd\u529b\u5f3a\u7b49\u7279\u70b9\uff0c\u5e76\u4e14\u652f\u6301\u4e32\u53e3\u901a\u4fe1\u3002<\/p>\n\n\n\n \u3000\u3000M31\u7cfb\u5217\u6a21\u5757\u652f\u6301Modbus RTU\u534f\u8bae\uff0c\u53ef\u4ee5\u901a\u8fc7\u4e32\u53e3\u6216\u8fdc\u7a0bLoRa\u7f51\u5173\u8fdb\u884c\u6307\u4ee4\u53d1\u9001\u3002<\/p>\n\n\n\n \u3000\u3000\u8be5\u6a21\u5757\u9002\u7528\u4e8e\u5de5\u4e1a\u73af\u5883\uff0c\u5177\u6709\u4f4e\u529f\u8017\u3001\u8fdc\u8ddd\u79bb\u4f20\u8f93\u7684\u7279\u70b9\u3002<\/p>\n\n\n\n \u3000\u3000RN4283\u6a21\u5757\u91c7\u7528LoRa\u6280\u672f\uff0c\u5177\u6709\u8d85\u957f\u8ddd\u79bb\u7684\u53cc\u5411\u901a\u4fe1\u3001\u4f4e\u529f\u8017\u548c\u9ad8\u7075\u654f\u5ea6\u3002<\/p>\n\n\n\n \u3000\u3000\u8be5\u6a21\u5757\u4e0e\u5177\u6709UART\u63a5\u53e3\u7684\u5355\u7247\u673a\u517c\u5bb9\u3002<\/p>\n\n\n\n \u3000\u3000\u5b89\u4fe1\u53efLoRa\u7cfb\u5217\u6a21\u5757(\u5982Ra-01\u3001Ra-02)\u652f\u6301\u591a\u79cd\u901a\u4fe1\u6a21\u5f0f\u3001\u529f\u8017\u3001\u5c04\u9891\u6a21\u5f0f\u5207\u6362\u7b49\u529f\u80fd\u3002<\/p>\n\n\n\n \u3000\u3000\u8fd9\u4e9b\u6a21\u5757\u7684\u901a\u4fe1\u63a5\u53e3\u5305\u62ecSPI\u6216UART\uff0c\u5e76\u4e14\u5177\u6709\u4e0d\u540c\u7684\u901a\u4fe1\u534f\u8bae\u548c\u4fe1\u9053\u914d\u7f6e\u80fd\u529b\u3002<\/p>\n\n\n\n \u3000\u3000LoRa\u6a21\u5757\u4e0eArduino\u3001Raspberry Pi\u3001STM32\u7b49\u5f00\u53d1\u677f\u7684\u517c\u5bb9\u6027\u603b\u4f53\u826f\u597d\uff0c\u4f46\u5177\u4f53\u517c\u5bb9\u6027\u548c\u4f7f\u7528\u65b9\u5f0f\u4f1a\u56e0\u5f00\u53d1\u677f\u548c\u6a21\u5757\u7684\u4e0d\u540c\u800c\u6709\u6240\u5dee\u5f02\u3002<\/p>\n\n\n\n \u3000\u3000\u603b\u7ed3<\/p>\n\n\n\n \u3000\u3000LoRa\u6a21\u5757\u578b\u53f7\u4e0e\u5355\u7247\u673a\u901a\u4fe1\u63a5\u53e3\u7684\u517c\u5bb9\u6027\u548c\u9650\u5236\uff0c\u53ef\u4ee5\u603b\u7ed3\u51fa\u4ee5\u4e0b\u51e0\u70b9\uff1a<\/p>\n\n\n\n \u3000\u3000\u4f18\u5316 LoRa\u6a21\u5757\u4e0e\u5355\u7247\u673a<\/strong> \u4e4b\u95f4\u7684\u901a\u4fe1\u534f\u8bae\uff0c\u53ef\u4ee5\u6709\u6548\u63d0\u9ad8\u6570\u636e\u4f20\u8f93\u7684\u7a33\u5b9a\u6027<\/strong>\u548c\u53ef\u9760\u6027<\/strong>\uff0c\u4ece\u800c\u786e\u4fdd\u5728\u7269\u8054\u7f51(IoT)\u5e94\u7528\u4e2d\u6570\u636e\u4f20\u8f93\u7684\u51c6\u786e\u6027\u548c\u6297\u5e72\u6270\u80fd\u529b\u3002\u4ee5\u4e0b\u4ece\u786c\u4ef6\u63a5\u53e3\u4f18\u5316\u3001\u901a\u4fe1\u534f\u8bae\u8bbe\u8ba1\u3001\u9519\u8bef\u68c0\u6d4b\u4e0e\u6062\u590d\u3001\u529f\u8017\u63a7\u5236\u7b49\u591a\u4e2a\u65b9\u9762\u8fdb\u884c\u5206\u6790\u548c\u4f18\u5316\u5efa\u8bae\uff1a<\/p>\n\n\n\n \u3000\u3000(1) \u9009\u62e9\u53ef\u9760\u7684\u901a\u4fe1\u63a5\u53e3<\/strong><\/p>\n\n\n\n \u3000\u3000SPI\uff08\u4e32\u884c\u5916\u8bbe\u63a5\u53e3\uff09\uff1a<\/strong><\/p>\n\n\n\n \u3000\u3000\u901a\u5e38\u7528\u4e8e\u5355\u7247\u673a\u4e0eLoRa\u6a21\u5757\u4e4b\u95f4\u7684\u9ad8\u901f\u901a\u4fe1\u3002<\/p>\n\n\n\n \u3000\u3000\u4f18\u52bf\uff1a<\/p>\n\n\n\n \u3000\u3000\u5177\u6709\u8f83\u9ad8\u7684\u6570\u636e\u4f20\u8f93\u901f\u7387\u548c\u6297\u5e72\u6270\u80fd\u529b\u3002<\/p>\n\n\n\n \u3000\u3000\u652f\u6301\u5168\u53cc\u5de5\u901a\u4fe1\uff0c\u53ef\u63d0\u9ad8\u901a\u4fe1\u6548\u7387\u3002<\/p>\n\n\n\n \u3000\u3000\u4f18\u5316\u5efa\u8bae\uff1a<\/strong><\/p>\n\n\n\n \u3000\u3000\u786e\u4fddSCK\u65f6\u949f\u9891\u7387\u5728LoRa\u6a21\u5757\u652f\u6301\u7684\u8303\u56f4\u5185(\u4e00\u822c\u4e3a1-10 MHz)\u3002<\/p>\n\n\n\n \u3000\u3000\u4f7f\u7528\u77ed\u800c\u53ef\u9760\u7684\u8fde\u63a5\u7ebf\uff0c\u907f\u514d\u4fe1\u53f7\u8870\u51cf\u6216\u4e32\u6270\u3002<\/p>\n\n\n\n \u3000\u3000\u6dfb\u52a0\u4fe1\u53f7\u5c4f\u853d\u7ebf\u548c\u63a5\u5730\u7ebf\uff0c\u51cf\u5c11\u7535\u78c1\u5e72\u6270\u3002<\/p>\n\n\n\n \u3000\u3000UART\uff08\u901a\u7528\u5f02\u6b65\u6536\u53d1\u5668\uff09\uff1a<\/strong><\/p>\n\n\n\n \u3000\u3000\u5728\u8d44\u6e90\u53d7\u9650\u7684\u5355\u7247\u673a\u4e2d\uff0cUART\u662f\u4e00\u79cd\u5e38\u7528\u63a5\u53e3\u3002<\/p>\n\n\n\n \u3000\u3000\u4f18\u52bf\uff1a<\/p>\n\n\n\n \u3000\u3000\u7b80\u5355\u6613\u7528\uff0c\u9002\u5408\u4f4e\u901f\u901a\u4fe1\u3002<\/p>\n\n\n\n \u3000\u3000\u4f18\u5316\u5efa\u8bae\uff1a<\/strong><\/p>\n\n\n\n \u3000\u3000\u786e\u4fdd\u6ce2\u7279\u7387\u8bbe\u7f6e\u5408\u7406\uff0c\u907f\u514d\u56e0\u901f\u7387\u8fc7\u9ad8\u5bfc\u81f4\u6570\u636e\u4e22\u5931\u3002<\/p>\n\n\n\n \u3000\u3000\u914d\u5408\u786c\u4ef6\u6d41\u63a7(\u5982RTS\/CTS)\u6216\u8f6f\u4ef6\u6d41\u63a7\uff0c\u9632\u6b62\u901a\u4fe1\u5835\u585e\u3002<\/p>\n\n\n\n \u3000\u3000(2) \u6dfb\u52a0\u786c\u4ef6\u4fdd\u62a4<\/strong><\/p>\n\n\n\n \u3000\u3000\u7535\u6e90\u7a33\u5b9a\u6027\uff1a<\/strong><\/p>\n\n\n\n \u3000\u3000\u786e\u4fddLoRa\u6a21\u5757\u4f9b\u7535\u7a33\u5b9a\uff0c\u5efa\u8bae\u52a0\u5165\u6ee4\u6ce2\u7535\u5bb9\u548c\u7a33\u538b\u5668\u4ee5\u6d88\u9664\u7535\u6e90\u566a\u58f0\u3002<\/p>\n\n\n\n \u3000\u3000\u903b\u8f91\u7535\u5e73\u5339\u914d\uff1a<\/strong><\/p>\n\n\n\n \u3000\u3000\u5982\u679c\u5355\u7247\u673a\u4e0eLoRa\u6a21\u5757\u7684\u5de5\u4f5c\u7535\u538b\u4e0d\u540c(\u5982\u5355\u7247\u673a3.3V\uff0cLoRa\u6a21\u57575V)\uff0c\u9700\u8981\u4f7f\u7528\u7535\u5e73\u8f6c\u6362\u82af\u7247\u6216\u7535\u963b\u5206\u538b\u5668\u4ee5\u4fdd\u62a4\u63a5\u53e3\u3002<\/p>\n\n\n\n \u3000\u3000(3) \u4e2d\u65ad\u4f18\u5148\u7ea7\u4e0eDMA\u4f7f\u7528<\/strong><\/p>\n\n\n\n \u3000\u3000\u4f18\u5316\u5355\u7247\u673a\u4e2d\u65ad\uff1a<\/p>\n\n\n\n \u3000\u3000\u4f7f\u7528\u4e2d\u65ad\u65b9\u5f0f\u4ee3\u66ff\u8f6e\u8be2\uff0c\u786e\u4fddLoRa\u6a21\u5757\u7684\u6570\u636e\u88ab\u53ca\u65f6\u8bfb\u53d6\u3002<\/p>\n\n\n\n \u3000\u3000\u542f\u7528DMA(\u76f4\u63a5\u5b58\u50a8\u5668\u8bbf\u95ee)\uff1a<\/p>\n\n\n\n \u3000\u3000\u5728\u9ad8\u901f\u901a\u4fe1\u65f6\u542f\u7528DMA\uff0c\u4ee5\u51cf\u5c11CPU\u5360\u7528\u7387\u5e76\u63d0\u9ad8\u6570\u636e\u4f20\u8f93\u7a33\u5b9a\u6027\u3002<\/p>\n\n\n\n \u3000\u3000(1) \u6570\u636e\u5e27\u7ed3\u6784\u7684\u4f18\u5316<\/strong><\/p>\n\n\n\n \u3000\u3000\u8bbe\u8ba1\u5408\u7406\u7684\u901a\u4fe1\u534f\u8bae\u5e27\u7ed3\u6784\uff0c\u4f7f\u4f20\u8f93\u7684\u6570\u636e\u5177\u6709\u6e05\u6670\u7684\u8fb9\u754c\u548c\u9ad8\u6548\u7684\u89e3\u6790\u6027\u3002\u4e00\u4e2a\u5178\u578b\u7684\u5e27\u7ed3\u6784\u53ef\u4ee5\u5982\u4e0b\u8bbe\u8ba1\uff1a<\/p>\n\n\n\n \u3000\u3000\u8d77\u59cb\u6807\u5fd7\u548c\u7ed3\u675f\u6807\u5fd7\uff1a<\/strong><\/p>\n\n\n\n \u3000\u3000\u7528\u4e8e\u6807\u8bc6\u6570\u636e\u5e27\u7684\u5f00\u59cb\u548c\u7ed3\u675f\uff0c\u907f\u514d\u6570\u636e\u5e27\u6df7\u4e71\u3002<\/p>\n\n\n\n \u3000\u3000\u793a\u4f8b\uff1a0xAA\u4f5c\u4e3a\u8d77\u59cb\u6807\u5fd7\uff0c0xFF\u4f5c\u4e3a\u7ed3\u675f\u6807\u5fd7\u3002<\/p>\n\n\n\n \u3000\u3000\u6570\u636e\u957f\u5ea6\uff1a<\/strong><\/p>\n\n\n\n \u3000\u3000\u6307\u5b9a\u6570\u636e\u5e27\u7684\u957f\u5ea6\uff0c\u4fbf\u4e8e\u63a5\u6536\u7aef\u89e3\u6790\u6570\u636e\u3002<\/p>\n\n\n\n \u3000\u3000\u6821\u9a8c\u7801\uff1a<\/strong><\/p>\n\n\n\n \u3000\u3000\u4f7f\u7528CRC16<\/strong>\u6216Fletcher\u6821\u9a8c<\/strong>\uff0c\u63d0\u9ad8\u9519\u8bef\u68c0\u6d4b\u80fd\u529b\u3002<\/p>\n\n\n\n \u3000\u3000(2) \u53cc\u5411\u901a\u4fe1\u4e0eACK\u673a\u5236<\/strong><\/p>\n\n\n\n \u3000\u3000\u5b9e\u73b0\u53cc\u5411\u901a\u4fe1\uff1a<\/strong><\/p>\n\n\n\n \u3000\u3000LoRa\u6a21\u5757\u4e0e\u5355\u7247\u673a\u7684\u901a\u4fe1\u4e0d\u5e94\u662f\u5355\u5411\u7684\uff0c\u5fc5\u987b\u5b9e\u73b0\u53cc\u5411\u901a\u4fe1\u534f\u8bae\uff0c\u4ee5\u4fbf\u786e\u8ba4\u6570\u636e\u662f\u5426\u6b63\u786e\u63a5\u6536\u3002<\/p>\n\n\n\n \u3000\u3000ACK\u673a\u5236\uff1a<\/strong><\/p>\n\n\n\n \u3000\u3000\u5728\u5355\u7247\u673a\u63a5\u6536\u5230\u6570\u636e\u540e\uff0c\u53d1\u9001\u786e\u8ba4\u5e27(ACK)\u7ed9LoRa\u6a21\u5757\u3002<\/p>\n\n\n\n \u3000\u3000\u8d85\u65f6\u91cd\u4f20\u673a\u5236\uff1a<\/strong><\/p>\n\n\n\n \u3000\u3000\u5982\u679c\u5728\u89c4\u5b9a\u65f6\u95f4\u5185\u672a\u6536\u5230ACK\uff0c\u5355\u7247\u673a\u9700\u8981\u91cd\u65b0\u53d1\u9001\u6570\u636e\u3002<\/p>\n\n\n\n \u3000\u3000\u907f\u514d\u65e0\u9650\u91cd\u4f20\uff0c\u8bbe\u7f6e\u91cd\u4f20\u6b21\u6570\u4e0a\u9650(\u59823\u6b21)\u3002<\/p>\n\n\n\n \u3000\u3000(3) \u6d41\u91cf\u63a7\u5236<\/strong><\/p>\n\n\n\n \u3000\u3000\u786c\u4ef6\u6d41\u91cf\u63a7\u5236\uff1a<\/strong><\/p>\n\n\n\n \u3000\u3000\u4f7f\u7528RTS(\u8bf7\u6c42\u53d1\u9001)\u548cCTS(\u6e05\u9664\u53d1\u9001)\u4fe1\u53f7\uff0c\u786e\u4fdd\u53d1\u9001\u7aef\u4e0d\u4f1a\u8d85\u8fc7\u63a5\u6536\u7aef\u7684\u5904\u7406\u80fd\u529b\u3002<\/p>\n\n\n\n \u3000\u3000\u8f6f\u4ef6\u6d41\u91cf\u63a7\u5236\uff1a<\/strong><\/p>\n\n\n\n \u3000\u3000\u4f7f\u7528XON\/XOFF\u534f\u8bae\u63a7\u5236\u901a\u4fe1\uff0c\u907f\u514d\u6570\u636e\u6ea2\u51fa\u3002<\/p>\n\n\n\n \u3000\u3000(4) \u6570\u636e\u5206\u7247\u4e0e\u91cd\u7ec4<\/strong><\/p>\n\n\n\n \u3000\u3000\u5f53\u6570\u636e\u957f\u5ea6\u8d85\u8fc7LoRa\u6a21\u5757\u7684\u6700\u5927\u5e27\u957f\u65f6(\u4e00\u822c\u7ea6255\u5b57\u8282)\uff0c\u9700\u5c06\u6570\u636e\u5206\u7247\u4f20\u8f93\u3002<\/p>\n\n\n\n \u3000\u3000\u5728\u5355\u7247\u673a\u7aef\u8bbe\u8ba1\u6570\u636e\u91cd\u7ec4\u903b\u8f91\uff1a<\/p>\n\n\n\n \u3000\u3000\u4f7f\u7528\u5e27\u5e8f\u53f7\u5b57\u6bb5\u6807\u8bc6\u5206\u7247\u987a\u5e8f\u3002<\/p>\n\n\n\n \u3000\u3000\u63a5\u6536\u7aef\u6309\u7167\u5e8f\u53f7\u91cd\u7ec4\u6570\u636e\uff0c\u4e22\u5931\u6216\u9519\u8bef\u7684\u5e27\u53ef\u8bf7\u6c42\u91cd\u4f20\u3002<\/p>\n\n\n\n \u3000\u3000(1) CRC\u6821\u9a8c<\/strong><\/p>\n\n\n\n \u3000\u3000\u5728\u6bcf\u4e00\u5e27\u6570\u636e\u4e2d\u9644\u52a0CRC\u6821\u9a8c\u7801(\u5982CRC16-CCITT)\uff0c\u5355\u7247\u673a\u63a5\u6536\u6570\u636e\u540e\u8fdb\u884c\u9a8c\u8bc1\u3002<\/p>\n\n\n\n \u3000\u3000\u5982\u679c\u6821\u9a8c\u5931\u8d25\uff0c\u76f4\u63a5\u4e22\u5f03\u8be5\u5e27\u5e76\u8bf7\u6c42\u91cd\u53d1\u3002<\/p>\n\n\n\n \u3000\u3000(2) \u6570\u636e\u786e\u8ba4\uff08ACK\/NACK\uff09<\/strong><\/p>\n\n\n\n \u3000\u3000LoRa\u6a21\u5757\u6216\u5355\u7247\u673a\u53d1\u9001\u6570\u636e\u540e\uff0c\u63a5\u6536\u65b9\u9700\u8981\u8fd4\u56deACK(\u786e\u8ba4)\u6216NACK(\u5426\u8ba4)\u4fe1\u53f7\uff1a<\/p>\n\n\n\n \u3000\u3000(3) \u8d85\u65f6\u68c0\u6d4b\u4e0e\u91cd\u4f20<\/strong><\/p>\n\n\n\n \u3000\u3000\u5728\u5355\u7247\u673a\u7684\u534f\u8bae\u8bbe\u8ba1\u4e2d\u52a0\u5165\u8d85\u65f6\u68c0\u6d4b\u529f\u80fd\uff1a<\/p>\n\n\n\n \u3000\u3000\u907f\u514d\u8fc7\u591a\u91cd\u4f20\u6d6a\u8d39\u8d44\u6e90\uff1a<\/p>\n\n\n\n \u3000\u3000\u901a\u8fc7\u7edf\u8ba1\u91cd\u4f20\u6b21\u6570\uff0c\u82e5\u8fbe\u5230\u8bbe\u5b9a\u4e0a\u9650(\u59823\u6b21)\uff0c\u5219\u653e\u5f03\u5e76\u4e0a\u62a5\u9519\u8bef\u3002<\/p>\n\n\n\n \u3000\u3000(1) \u73af\u5f62\u7f13\u51b2\u533a<\/strong><\/p>\n\n\n\n \u3000\u3000\u5728\u5355\u7247\u673a\u4e2d\u4f7f\u7528\u73af\u5f62\u7f13\u51b2\u533a\u5904\u7406LoRa\u6a21\u5757\u7684\u6536\u53d1\u6570\u636e\uff1a<\/p>\n\n\n\n \u3000\u3000\u63a5\u6536\u7f13\u51b2\u533a\uff1a<\/strong><\/p>\n\n\n\n \u3000\u3000\u6682\u5b58LoRa\u6a21\u5757\u63a5\u6536\u5230\u7684\u6570\u636e\uff0c\u9632\u6b62\u56e0\u5355\u7247\u673a\u5904\u7406\u5ef6\u8fdf\u800c\u4e22\u5931\u6570\u636e\u3002<\/p>\n\n\n\n \u3000\u3000\u53d1\u9001\u7f13\u51b2\u533a\uff1a<\/strong><\/p>\n\n\n\n \u3000\u3000\u6682\u5b58\u5373\u5c06\u53d1\u9001\u7684\u6570\u636e\uff0c\u5355\u7247\u673a\u6839\u636e\u6d41\u63a7\u4fe1\u53f7\u5206\u6279\u53d1\u9001\uff0c\u907f\u514d\u53d1\u9001\u62e5\u5835\u3002<\/p>\n\n\n\n \u3000\u3000(2) \u6570\u636e\u4f18\u5148\u7ea7<\/strong><\/p>\n\n\n\n \u3000\u3000\u5bf9\u4e0d\u540c\u7c7b\u578b\u7684\u6570\u636e\u5206\u914d\u4f18\u5148\u7ea7\u3002\u4f8b\u5982\uff1a<\/p>\n\n\n\n \u3000\u3000\u5b9e\u65f6\u6570\u636e(\u5982\u62a5\u8b66\u4fe1\u606f)\u4f18\u5148\u4f20\u8f93\u3002<\/p>\n\n\n\n \u3000\u3000\u975e\u5b9e\u65f6\u6570\u636e(\u5982\u5b9a\u65f6\u72b6\u6001\u66f4\u65b0)\u53ef\u5ef6\u8fdf\u4f20\u8f93\u3002<\/p>\n\n\n\n \u3000\u3000(1) \u6dfb\u52a0\u6821\u65f6\u673a\u5236<\/strong><\/p>\n\n\n\n \u3000\u3000\u5728LoRa\u6a21\u5757\u548c\u5355\u7247\u673a\u4e4b\u95f4\u5efa\u7acb\u65f6\u949f\u540c\u6b65\u673a\u5236\uff0c\u51cf\u5c11\u56e0\u65f6\u949f\u504f\u79fb\u9020\u6210\u7684\u901a\u4fe1\u9519\u8bef\u3002<\/p>\n\n\n\n \u3000\u3000(2) \u907f\u514d\u5e72\u6270\u7684\u9891\u7387\u9009\u62e9<\/strong><\/p>\n\n\n\n \u3000\u3000\u5728LoRa\u6a21\u5757\u4e2d\uff0c\u5408\u7406\u9009\u62e9\u901a\u4fe1\u4fe1\u9053\uff0c\u907f\u514d\u4e0e\u73af\u5883\u4e2d\u7684\u5176\u4ed6\u65e0\u7ebf\u8bbe\u5907\u53d1\u751f\u9891\u7387\u51b2\u7a81\u3002<\/p>\n\n\n\n \u3000\u3000\u7ed3\u5408\u9891\u7387\u8df3\u53d8\u6280\u672f(Frequency Hopping Spread Spectrum, FHSS)\u8fdb\u4e00\u6b65\u63d0\u5347\u6297\u5e72\u6270\u80fd\u529b\u3002<\/p>\n\n\n\n \u3000\u3000(1) \u72b6\u6001\u673a\u8bbe\u8ba1<\/strong><\/p>\n\n\n\n \u3000\u3000\u5728\u5355\u7247\u673a\u4e2d\u8bbe\u8ba1\u901a\u4fe1\u72b6\u6001\u673a\uff0c\u4ee5\u6e05\u6670\u7ba1\u7406\u5404\u4e2a\u901a\u4fe1\u9636\u6bb5\uff1a<\/p>\n\n\n\n \u3000\u3000(2) \u4f4e\u529f\u8017\u6a21\u5f0f<\/strong><\/p>\n\n\n\n \u3000\u3000LoRa\u6a21\u5757\u7684\u4f4e\u529f\u8017\u6a21\u5f0f\u5e94\u4e0e\u5355\u7247\u673a\u7684\u4f11\u7720\u6a21\u5f0f\u7ed3\u5408\uff1a<\/p>\n\n\n\n \u3000\u3000\u603b\u7ed3<\/strong><\/p>\n\n\n\n \u3000\u3000\u901a\u8fc7\u4f18\u5316LoRa\u6a21\u5757\u4e0e\u5355\u7247\u673a\u4e4b\u95f4\u7684\u901a\u4fe1\u534f\u8bae\uff0c\u53ef\u4ee5\u663e\u8457\u63d0\u9ad8\u6570\u636e\u4f20\u8f93\u7684\u7a33\u5b9a\u6027\u548c\u53ef\u9760\u6027\u3002\u5173\u952e\u4f18\u5316\u70b9\u5305\u62ec\uff1a<\/p>\n\n\n\n \u3000\u3000\u8fd9\u4e9b\u4f18\u5316\u63aa\u65bd\u9002\u7528\u4e8e\u591a\u79cdLoRa\u5e94\u7528\u573a\u666f\uff0c\u5982\u73af\u5883\u76d1\u6d4b\u3001\u667a\u80fd\u6284\u8868\u548c\u5de5\u4e1a\u63a7\u5236\u7cfb\u7edf\u3002<\/p>\n","protected":false},"excerpt":{"rendered":" LoRa\u6a21\u5757\u4e0e\u5355\u7247\u673a\u4e4b\u95f4\u7684\u901a\u4fe1\u63a5\u53e3\u901a\u5e38\u5305\u62ec\u4e32\u53e3(UART)\u3001SPI\u548cI2C\u7b49\u7c7b\u578b\u3002\u8fd9\u4e9b\u63a5\u53e3\u7684\u9009\u62e9\u53d6\u51b3\u4e8e\u5177\u4f53\u7684\u5355\u7247\u673a\u7c7b\u578b\u548c\u5e94\u7528\u573a\u666f\u3002\u4f8b\u5982\uff0c\u5982\u679c\u9700\u8981\u66f4\u9ad8\u7684\u6570\u636e\u4f20\u8f93\u901f\u7387\uff0c\u53ef\u4ee5\u9009\u62e9SPI\u63a5\u53e3<\/p>\n","protected":false},"author":1,"featured_media":97773,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"default","ast-global-header-display":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","footnotes":""},"categories":[36],"tags":[388,83],"class_list":["post-100257","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog","tag-loramodule","tag-dpj"],"_links":{"self":[{"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/posts\/100257","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/comments?post=100257"}],"version-history":[{"count":2,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/posts\/100257\/revisions"}],"predecessor-version":[{"id":100259,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/posts\/100257\/revisions\/100259"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/media\/97773"}],"wp:attachment":[{"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/media?parent=100257"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/categories?post=100257"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/tags?post=100257"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}\n
\u3000\u3000\u4e00\u3001 LoRa\u6a21\u5757\u4e0eSTM32\u5355\u7247\u673a\u901a\u8fc7UART\u901a\u4fe1\u7684\u8be6\u7ec6\u914d\u7f6e<\/h2>\n\n\n\n
\u3000\u30001. \u786c\u4ef6\u8fde\u63a5<\/strong>\uff1a<\/h3>\n\n\n\n
\u3000\u30002. \u7535\u5e73\u5339\u914d<\/strong>\uff1a<\/h3>\n\n\n\n
\u3000\u30003. \u914d\u7f6eSTM32\u7684UART\u63a5\u53e3<\/strong>\uff1a<\/h3>\n\n\n\n
\n
\u3000\u30004. \u7f16\u5199\u901a\u4fe1\u7a0b\u5e8f<\/strong>\uff1a<\/h3>\n\n\n\n
\u3000\u30005. \u8c03\u8bd5\u548c\u6d4b\u8bd5<\/strong>\uff1a<\/h3>\n\n\n\n
\u3000\u3000\u4e8c\u3001 LoRa\u6a21\u5757\u901a\u8fc7SPI\u63a5\u53e3\u4e0eSTM32\u5355\u7247\u673a\u8fde\u63a5\u65f6\u7684\u6570\u636e\u4f20\u8f93\u901f\u7387\u548c\u6548\u7387\u5982\u4f55?<\/h2>\n\n\n\n
\u3000\u30001. \u786c\u4ef6\u914d\u7f6e\u4e0e\u521d\u59cb\u5316<\/strong>\uff1a<\/h3>\n\n\n\n
\u3000\u30002. \u6570\u636e\u4f20\u8f93\u901f\u7387<\/strong>\uff1a<\/h3>\n\n\n\n
\u3000\u30003. \u6548\u7387\u4e0e\u7075\u6d3b\u6027<\/strong>\uff1a<\/h3>\n\n\n\n
\u3000\u30005. \u5b9e\u9645\u5e94\u7528\u6848\u4f8b<\/strong>\uff1a<\/h3>\n\n\n\n
\u3000\u3000\u4e09\u3001 \u4e0d\u540c\u7684LoRa\u6a21\u5757\u578b\u53f7\uff0c\u5176\u4e0e\u5355\u7247\u673a\u901a\u4fe1\u63a5\u53e3\u7684\u517c\u5bb9\u6027\u548c\u9650\u5236\u6709\u54ea\u4e9b?<\/h2>\n\n\n\n
\u3000\u30001. Ra-01S\u6a21\u5757<\/strong>\uff1a<\/h3>\n\n\n\n
\u3000\u30002. Ra-01\u6a21\u5757<\/strong>\uff1a<\/h3>\n\n\n\n
\u3000\u30003. M31\u7cfb\u5217LoRa\u5206\u5e03\u5f0fIO\u6a21\u5757<\/strong>\uff1a<\/h3>\n\n\n\n
\u3000\u30004. RN4283\u6a21\u5757<\/strong>\uff1a<\/h3>\n\n\n\n
\u3000\u30005. Ra-01\u3001Ra-02\u7b49\u6a21\u5757<\/strong>\uff1a<\/h3>\n\n\n\n
\u3000\u30006. \u4e0e\u5176\u4ed6\u5f00\u53d1\u677f\u7684\u517c\u5bb9\u6027<\/strong>\uff1a<\/h3>\n\n\n\n
\n
\u3000\u3000\u56db\u3001 \u5982\u4f55\u4f18\u5316LoRa\u6a21\u5757\u4e0e\u5355\u7247\u673a\u4e4b\u95f4\u7684\u901a\u4fe1\u534f\u8bae\u4ee5\u63d0\u9ad8\u6570\u636e\u4f20\u8f93\u7684\u7a33\u5b9a\u6027\u548c\u53ef\u9760\u6027?<\/h2>\n\n\n\n
\u3000\u30001. \u786c\u4ef6\u63a5\u53e3\u4f18\u5316<\/strong><\/h3>\n\n\n\n
\u3000\u30002. \u901a\u4fe1\u534f\u8bae\u8bbe\u8ba1\u4f18\u5316<\/strong><\/h3>\n\n\n\n
\u8d77\u59cb\u6807\u5fd7\uff081\u5b57\u8282\uff09<\/th> \u6570\u636e\u957f\u5ea6\uff081\u5b57\u8282\uff09<\/th> \u6570\u636e\u5185\u5bb9\uff08\u53ef\u53d8\u957f\u5ea6\uff09<\/th> \u6821\u9a8c\u7801\uff082\u5b57\u8282\uff09<\/th> \u7ed3\u675f\u6807\u5fd7\uff081\u5b57\u8282\uff09<\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n \u3000\u30003. \u9519\u8bef\u68c0\u6d4b\u4e0e\u6062\u590d\u673a\u5236<\/strong><\/h3>\n\n\n\n
\n
\n
\u3000\u30004. \u6570\u636e\u7f13\u51b2\u4e0e\u5904\u7406\u4f18\u5316<\/strong><\/h4>\n\n\n\n
\u3000\u30005. \u6297\u5e72\u6270\u8bbe\u8ba1<\/strong><\/h3>\n\n\n\n
\u3000\u30006. \u529f\u8017\u63a7\u5236\u4e0e\u7a33\u5b9a\u6027\u4f18\u5316<\/strong><\/h3>\n\n\n\n
\n
\n
\n