本來想基於DWM1001c 做個 TDOA的測試, 發現:有个demo, 有时间看看吧点击(此处)折叠或打开This is not supported in the DWM1001 only TWR. We should remove the TypeDef from the header file. Sorry for the confusion. 目前僅支持 TWR, 不支持TDOAFYI - We will be soon releasing a Keil MDK projects with ports of some of the basic DWM1000 API examples so maybe with that you can easily port your own TDoA tag code?我就想知道什麽時候出來呢?翻译自 DWM1001-Firmware-User-Guide-2.pdfDecawave 有两种方法提供软件1. 出厂时的预载固件2. 单独提供的 Software Bundle软件包包含4个部分1. PANS: positioning and Networking Stack. 提供源码共开发者定制. 可提供 tags, anchors, gateways 三种模式. (使用DRTLS网络模式, Two-Way-Ranging Real Time Location System.)2. DRTLS Manager: Andorid的APK, 通过蓝牙来配置 DRTLS的节点.3. DRTLS Gateway Application: 依附在RaspberryPi上, 提供网关功能, 包括 a. linux内核模块 b. daemon 守护进程 c. proxy 进程 d. MQTT broker e. Web Manager4. Host API examples, 运行于树莓派, 即如何从外置的MCU控制dwm1001模组.还有一些第三方的空间被包括到 Software Bundle Firmware 中1. Nordic SoftDevice S132-SD-v3 version 3.0.0 (production) 2. eCos RTOS3. open source CRC-32 function from FreeBSD4. Andorid Open Source5. LinuxKernel/ three.js JavaScript library.6. Leaps. 7 ...文档致力于开发者进行定制. 以及编译/建立/烧写.同时提供一些范例.DWM1001提供两种功能:1. PANS API 2. PANS library提供比较底层的一些功能.另外 LIS2DH12TR加速计被集成, 在I2C的0x19地址上. 通过读写dwm1001模组的 0x33/0x32即可读写内容. tag模式下可以被配置成响应或者低功耗模式, 即在静止时为低功耗, 在移动时为响应状态. 用户可以通过C Code API, 利用 IIC 以及 Shell API的功能调用加速计.PANS Network operation 允许 joining, leaving, installation, commissioning of nodes and associated two-way ranging protocol and data transfer. 也支持 follow-me, large-scale asset-tracking大物品跟踪, navigation, home network委托 commissioningDRTLS 可以委托给Android APK. APK能通过BLE连接并配置节点. DRTLS模式下, tag 会自动和附近的anchor通讯, 并且利用本地定位引擎计算位置, 并可以通过BLE/C code API/SPI api等输出. TWR的解析/定位引擎计算tag的xyz是在DWM1001模组内部实现的. tag和各个anchor之间的range被发往 solver解析并结算出位置. 这个本地定位引擎是可以被禁用的, 用户可以自己定制一个, 例如加入一些过滤算法.=========================================================================以前是virtual box 作为源码承载器, 现在使用 Segger Embedded Studio IDE 做固件开发.1. Segger Embedded Studio(对nrf51 nordic semiconductors MCU免费) + GNU ARM Embedded Toolchain 5.4 2016q32. DWM1001 on-board package. 提供用户源码, 库等.硬件部分: PC(windows OS) + DWM001-DEV-board(此板子提供了DWM1001模组和 JLink debugger)软件部分: Segger Embedded Studio v4.12 https://www.segger.com/downloads/embedded-studio Segger J-Flash Lite (J-Link software suite) JLink_V622g https://www.segger.com/downloads/jlink/#J-LinkSoftwareAndDocumentationPack GNU ARM Embedded Toolchain 5.4 2016q3 (这个是一定要保证的) https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm/downloads DWM1001的板载包. DWM1001_on_board_package_R2.0.zip 刷出厂镜像 /dwm/recovery/DWM1001_PANS_R2.0.hex1. USB 连接 PC + module2. 打开 J-Flash lite, 选择 device interface Speed 点击OK3. 点击 擦除整个片子.4. 选择DataFile 为 然耨点击5. 完成后, LEDs 应当会闪烁.=========================================================================用户 examplesAPI有很多种, 例如 C code / Uart shell / Uart Generic / SPI 等等. 和 DWM1001通讯, 最好为UART 115200 8N1. C code API: 多线程(eCos)SoftDevice: 124KB, BLE的协议栈.Bootloader: 4KB, 控制选择 FW1/FW2.ENV: 8KB, 用户配置. 电源开关/复位/刷固件 不会擦除ENV, 除非整片擦除. 或者使用 frst shell-command.FW1: 136KB, 保存OTA固件.FW2: 240KB, 其中 user app作为一个单独线程可以分配 3KB RAM/60KB Flash. ========================================================================= 编译调试1. Segger Embedded Studio 打开 dwm-simple.emProject. project -> 右键 options -> 设置 (code->build->Tool Chain Directory = 5.4 2016q3\bin) disable breakpoints group4. 烧写. 即可下载. 烧写可以通过脚本进行, /utilities/generate_example_hex.bat , 修改执行即可.这个仅仅烧写FW2. 如果要全部烧写, 需要使用 JFlash-Lite烧写/dwm-simple/Output/dwm1001_dwm-simple.hex(此文件集成了softdevice/bootloader/FW1/本地的BIn FW2), 并且要依据指定的section说明文件.4. 更改代码: dwm-simple.c 在函数 app_thread_entry. 可以增加代码. 例如 dwm_pos_t pos; dwm_pos_get(&pos); //pos.x/y/z/qf 即为当前位置和置信度. dwm_system_us_get) 为当前的时间刻度值.5. 调试. 或者 F5. 建议关闭->右键-> 说明 不支持.=========================================================================串口范例可以通过usb 或者 扩展的pins. 1. 接上 DWM1001-DEV board + PC windows OS2. PC打开设备和打印机. 找打 J-LINK. 双击,再硬件 tab 可以找到 COM port. 在串口模式下, 进入console-Shell, 在一秒内两次回车(Generic Mode to shell Mode), 或者输入 quit 命令(Shell Mode -> Generic Mode). 会有 dwm> 提示符出现.