Decawave / mynewt-dw1000-apps

[DEPRECATED] Use https://github.com/Decawave/uwb-apps for new designs.
Apache License 2.0
30 stars 22 forks source link

Query related to twr_node_tdma and twr_tag_tdma #18

Open ghost opened 5 years ago

ghost commented 5 years ago

Hello,

I am trying with mynewt based firmware as given on site https://github.com/Decawave/mynewt-dw1000-apps I have successfully performed each and every step as given. I have connected battery to tag and node is connected to PC. I am getting output as given here: I am unable to see any ranging information.

asmita@asmita-Lenovo-G50-80:~$ telnet localhost 19021 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. SEGGER J-Link V6.46g - Real time terminal output J-Link OB-STM32F072-128KB-CortexM compiled Jan 7 2019 14:08:04 V1.0, SN=760085218 Process: JLinkGDBServerCLExe {"utime": 1640,"msg": "dw1000_dev_init"} {"utime": 2046,"msg": "dw1000_pkg_init"} {"utime": 10055,"msg": "ccp_pkg_init"} {"utime": 10686,"msg": "tdma_pkg_init"} {"utime": 11376,"msg": "pan_pkg_init"} {"utime": 11710,"msg": "rng_pkg_init"} {"utime": 12026,"msg": "twr_ss_pkg_init"} {"utime": 12331,"msg": "twr_ds_pkg_init"} {"utime": 12637,"msg": "twr_ds_ext_pkg_init"} {"utime": 18684,"exec": "apps/twr_node_tdma/src/main.c"} {"utime": 18684,"msg": "device_id = 0xDECA0130"} {"utime": 18684,"msg": "PANID = 0xDECA"} {"utime": 18684,"msg": "DeviceID = 0x4300"} {"utime": 18684,"msg": "partID = 0xD4044300"} {"utime": 18684,"msg": "lotID = 0x4325100"} {"utime": 18684,"msg": "xtal_trim = 0x17"} {"utime": 18684,"msg": "frame_duration = 195 usec"} {"utime": 18684,"msg": "SHR_duration = 139 usec"} {"utime": 18684,"msg": "holdoff = 821 usec"}

After this nothing is happening, I am unable to see any ranging information. Is there something I am doing wrong? Kindly suggest.

Thanks & Regards Asmita

pkettle commented 5 years ago

Hi Asmita, Can we switch you to the nrange examples for now? @ncasaril is looking into this issue.

ghost commented 5 years ago

Hello, @pkettle , @ncasaril , I checked with nrange example also, I am still facing the same problem.

Thanks & Regards Asmita

ghost commented 5 years ago

Hello, After doing proper settings, I am getting continuously garbage data at teraterm because teraterm don't has any option to set baudrate as 1000000.

And I not getting anything using minicom.

ghost commented 5 years ago

Hello, I am able to run and load using newt version 1.6.0 on Ubuntu. But is that I am not getting output because of newt version? But there is no compilation error. As given on https://github.com/Decawave/mynewt-dw1000-apps/tree/master/apps/twr_tag_nranges_tdma

I followed all the steps, I used 4 anchors- 1 as master and 3 as slave. And tag is connected to PC. But I am not getting proper output. I am unable to understand where I am going wrong.

ghost commented 5 years ago

Hello,

I also tried changing it's baudrate in syscgf.yml file to 115200, this is continuously giving some garbage data on teraterm. Is it compulsory to use baudrate 1000000?

Thanks & regards Asmita

pkettle commented 5 years ago

Asmita, If you are switching RTT to UART see the listener example. There is no compulsory baudrate. On OSX 1MB is not supported. CONSOLE_UART: 1 CONSOLE_RTT: 0 CONSOLE_UART_BAUD: 115200

Regards Paul.

ghost commented 5 years ago

Hello, Currently, I just have 5 pieces of DWM1001-Dev kit, on which I am implementing https://github.com/Decawave/mynewt-dw1000-apps/tree/master/apps/twr_tag_nranges_tdma

4 pieces have been configured as anchors (1 master node and 3 slave node) and 5th piece is used as Tag. Hence I am first trying to get output using RTT by connecting Tag to my PC (Ubuntu)

But I am getting output as shown in attached file and no ranging data is further coming. rttLog

ghost commented 5 years ago

Hello,

But when I am trying using UART , I am getting proper output as attached file. Is there some documentation from where I can understand what the sequence of coming output means? What is the unit of data that is coming? UartLog

pkettle commented 5 years ago

Asmita, Have a look at mynewt-dw1000-apps/apps/twr_node_tdma/README.md for a description of the format. All units are SI, there are also matlab and python examples for decoding.

Can you explain what you are trying to do with this stack?

ghost commented 5 years ago

Hello @pkettle , Thanks for your response. I will look into it. So, I am trying to implement real-time location system to keep track of tag position. I have successfully done this using the inbuilt firmware image that comes with MDEK1001 kit. I am exploring using mynewt OS as given on Deawav and trying to understand which one is better for my application mynewt or eCOS. I am also trying to understand how I can improve and scale my system and which one is better to use whether the already builtin firmware image based on eCOS available with PANS library for ranging and also support for Gateway or using mynewt. If you could suggest something, that would be very helpful. I am trying to understand what is advantage of using this library(as on Github) vs that inbuilt image that already comes with the kit.

Thanks & regards Asmita

pkettle commented 5 years ago

Hi @Asmita, The PANs library is a mature stack that allows customers to build an indoor location experience. This stack is an SDK for creating an alternative experience using a building block approach. The investment you will need to make is different. If the PANs library aligns well your application, then you should continue with PANs. But if you are looking to build something different, then you should continue with this build block approach. The goal of this project is to reduce your design cycle by leveraging the combined experience of a community of developers.

These examples are starting-points, not end-points. You get to build the bit in the middle.

Regards Paul

ghost commented 5 years ago

Hello @pkettle Thanks for your response. While exploring software support of Decawave, I found that active development is going on mynewt based on Decawave Github site but on the other hand, there is no such active development going on eCOS based library. So, I assume that in future Decawave would actively support mynewt based firmware. Hence I want to shift from already builtin PANS library to currently being developed mynewt based firmware. The other reason is that I want to use customize Antenna, and the problem with inbuilt PANS library is that I don't have it's source code visa which I can make some changes (For example the channel being used, etc) , I just have it's APIs which i can write in User Code section, but this does not solve my need.

So, I want to build my system using this stack SDK (Github - mynewt based), Since, with your great contribution, I have the source code (On Decawave github Site) , I am trying to first understand its concept and way of implementation. Because I am very new to it and also there is no such detailed documentation, i having facing many issues in understanding it. I am now going through its various app examples and library source code to understand. It would be of great help if you could provide some guidance regarding it.

Next part is, I tried decoding the output which I am getting in the twr_tag_nrange_tdma example using python script stats.py (I don't have MATLAB) but again I am unsuccessful. Problems are - 1) I am getting output using UART but not using RTT (i.enot getting output using telnet localhost 19021) 2) Since as per Python Script, I suppose it is fetching data using telnet at port 19021 , but no response is coming.

3) Also, I went through document twr_node_tdma Readme.txt file, it's output is different from that in twr_nrange example and by seeing python script stats.py I found that is is for twr_node_tdma example because it has azimuth angle and so on.

kindly suggest.

Thanks & regards Asmita

pkettle commented 5 years ago

Hi Asmita, The PANS stack was developed by a Decawave partner and is a subset of their commercially supported stack @leapslabs. The design goal of this repo is to provide an open-source experience empowering customers to differentiate. Both stacks are supported, so this is not a reason to chose one over the other.

This open-source stack is a building block approach, not a reference design approach and requires a little more investment of time. The time commitment should be your selection criteria.

The Python and Matlab scripts are not maintained but serve as how-to-guides. These both leverage the network socket capability of the RTT and gdb.

Regards Paul.

ghost commented 5 years ago

Hello Paul, Thanks for your guidance. I have chosen to invest my time to proceed with my design using this open-source repo stack via building block approach. As a start point, I am now going through the provided libraries so that I can use them and develop my firmware. Your further guidance would be required. Thank you so much

Regards Asmita