# docs **Repository Path**: leo-iot/docs ## Basic Information - **Project Name**: docs - **Description**: 技术文档 - **Primary Language**: C++ - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2024-06-24 - **Last Updated**: 2025-05-08 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 代码下载 1. 准备工作 - 需要Ubuntu 18.0以上的系统。 - 安装了Python3.8.0以上的版本 2. 第一次下载代码需要下载repo工具 ```shell sudo curl https://gitee.com/oschina/repo/raw/fork_flow/repo-py3 -o /usr/bin/repo sudo chmod a+x /usr/bin/repo ``` 2. 下载代码, master表示分支 ```shell repo init -u http://git.leotechnology.cn/leo-iot/manifest.git -b develop --no-repo-verify repo sync -c repo forall -c 'git lfs pull' ``` 3. 编译环境 ```shell buildtools/env_setup.py ``` # 代码编译 ```shell ./build.sh --product-name=DTU # 如果没有修改CMakeLists.txt 可以加上 --skip-cmake ``` 整个编译过程包括cmake, make 参数: --product-name: 产品名称,即vendor下面的目录 --jobs: 多少线程同时编译,默认4 --skip-cmake: 跳过cmake过程 编译结果在out/DTU/ 下面。 # 提交代码 单个仓用git提交即可。每次修改应该对应一个issue, 在gitee仓库创建issue,会有一个issue编号, 提交代码时关联issue即可。 例如,创建了issue https://gitee.com/leo-iot/DTU/issues/IAEUJN ```shell git commit -a -s -m "#IAEUJN 移植CMake编译" git push origin_iot develop ``` 在解决问题过程中,可以把过程写到issue评论区,方便大家共同参考。 # 代码框图 ![代码框架图](figures/image_framework.png) # 网关程序框架 ![alt text](figures/framework.png) # Lora技术 参考 [Lora架构与实施方案](Lora技术_png.md) chirpstack :[chirpstack技术文档](https://www.chirpstack.io/docs/) # 老版本记录 sudo ./build.sh sudo ./build.sh -m pack_rootfs sudo ./build.sh pack # 进入 sudo ./mount.sh -m ubuntu/ sudo make PRODUCT=G4 # 网关烧录 工具:PhoenixSuit 插入type-C的线,启动PhoneixSuit, 进入烧录界面, 选择镜像。 按住FET键不放,按一下RESET键,系统会重启灯亮,此时,点击烧录即可。 ![输入图片说明](figures/image.png) 网关程序安装: 工具: WinSCP 将安装包推送到开发版,然后通过ssh进入开发版,执行安装目录下的./install.sh 即可,此时可以在/opt/下应该能看到相关的安装文件。 ![输入图片说明](image.png) 重启开发板,执行`ps aux|grep -E 'scada|rd'` 看程序是否在运行。 # Lora烧录 使用Tero programer 烧写波特率: 921600 调试波特率: 115200 COM通信: 波特率:19200 在线工具: https://www.67tool.com/category/62248229079a70065119880a