forked from SPAN-WashU/dw1000_bbb
-
Notifications
You must be signed in to change notification settings - Fork 0
Home
niranjir edited this page Jun 15, 2018
·
13 revisions
Welcome to the dw1000_rpi wiki!
Each node has a DWM1000 cape+Rpi. The DWM1000 cape has the DWM1000 connected with Rpi on SPI1. DWM1000 is from Decawave and includes DW1000 IC + RF front end (both inside shield) + antenna.
- Write image
- Get image from: https://www.raspberrypi.org/downloads/raspbian/ Raspbian Stretch Lite
- Etcher: to write image
- Configuring SSH
- Make a blank file with name “ssh” and save in boot repo
- Configuring SPI
- Set to be active (by editing config.txt in boot as below or by sudo raspi-config)
- Uncomment some or all of these to enable the optional hardware interfaces
- dtparam=spi=on
- dtoverlay=enc28j60
- dtoverlay=spi1-2cs
- Note: spi 1 since spi1 is connected to the UWB on this module
Setup all nodes on the same network and connect the PC to the network. The nodes are named: apricot, blueberry, cranberry, derby, eggtart. Make sure you can ping .local from PC
-
Login to all nodes.
- Ssh [email protected]
- Password: temppwd
-
cd /home/pi/dw1000_rpi/src
-
Set one node as initiator and all other nodes as responder
-
Responder nodes:
- Run ./dw1000_3msg RESPONSE_TYPE ID NUM_MSGS
- RESPONSE_TYPE: RESP for ranging only, no data logging; RESPC for ranging with CIR logging on the responder
- ID: Each node should have a unique ID addressed from 0, 1,.. If there are 3 responders, set ID 0, 1, 2 on them
- NUM_MSGS: Number of messages to respond to. Set it to -1 for indefinite response since you can control the number of messages on the initiator
- Example ./dw1000_3msg RESPC 0 -1
-
Initiator node
- Run ./dw1000_3msg INIT_TYPE NUM_RESP_NODES NUM_MSGS
- INIT_TYPE: INIT for ranging only, no data logging; INITC for ranging with CIR logging on the initiator
- NUM_RESP_NODES: Number of responder nodes. It initiates requests to nodes 0,1,..NUM_RESP_NODES-1. If you have setup 4 responder nodes with ID 0-3, then set NUM_RESP_NODES=4 on the responder
- NUM_MSGS: Number of messages to initiate. If NUM_RESP_NODES=4, and NUM_MSGS=8, then it initiates first four messages to node 1-4, and the next 4 messages again to nodes 1-4. Set it to -1 for indefinite initiation.
- Example ./dw1000_3msg INITC 4 10
-
Notes: First start the responders, then start the initiator.
-
-
Output files:
- Each ranging performs 3 message exchanges. I-R, R-I, I-R. If you log data on initiator, the data file has the CIR info from the second message. If you log data on the responder, the data file has the CIR info from first and third messages and the range information since all 3 messages are used to compute the range.
- If you care only about CIR, it is sufficient to log only on the initiator.
- The logged CSV file is of type expmsg<MSG_NUMBER><NODE_TYPE>.csv
- ID: ID of responder node
- MSG_NUMBER: Message number on initiator
- NODE_TYPE: I or R based on initiator or responder
- TThe Diagnostics registers are dumped, followed by the complex CIR values.
-
Matlab:
- To process the files logged on the responder, run PlotFromCsv.m
- It plots CIR and computes confidence of LOS/NLOS based on CIR diagnostics
For notes on Decawave CIT, see APS006 https://www.decawave.com/application-notes