Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Questions about the packet size #1

Open
lqh929289158 opened this issue Mar 21, 2017 · 5 comments
Open

Questions about the packet size #1

lqh929289158 opened this issue Mar 21, 2017 · 5 comments

Comments

@lqh929289158
Copy link

Hello,Mr Cai.l am here to ask some questions about the live stream CSI on the Github that you have implemented. l would appreciate it a lot if you could help me.

1.In "realtime_plot.m", why we set the buffer length as 393+2(line 27)?Why we abandon the first byte(line 56)?And why we treat 392 bytes as the length of a valid packet(line 58)?l am a little confused about it because l think each packet is 213 bytes.In the program log_to_file, it can print the size of each packet received.And the result is 213 bytes each packet. l hope that you could explain it.Thank you.

2.Later, l modified the file realtime_plot.m.Set buffer length as 213+2 and valid packet size as 212 bytes, and it can work well. But there is another problem. When I compare the live stream csi with the csi parsed by read_bf_file.m from the file, the result is different. So, l can not figure out whether there is something wrong with the realtime_plot.m or read_bf_file.m. l really hope that you could give me a hand.Thank you.
l am looking forward to your reply.

@lqh929289158
Copy link
Author

l try to send you an e-mail(chao08@gmail.com), but there may be something wrong with my gmail account or yours. So l have to raise my questions here.

@caichao
Copy link
Owner

caichao commented Mar 21, 2017

Sorry, I post a wrong gmail address. The buffer length should be configured according to the number of transmitter antennas. 213+2 is for one Tx antenna while 393+2 is for two. As for the live stream csi is not equal to the logged csi, you can try to debug the code. Since you know how to parse the CSI using c language, you can send a local csi.dat data through the tcp channel and see whether the live stream csi matlab code can decode it. Through this way, you can check whether there are some problem of the code. I didn't test the code thoroughly, maybe there are really some problems with it. If you find out, please let me know.

@lqh929289158
Copy link
Author

lqh929289158 commented Mar 21, 2017

l have made the structure of the packet clear. l made a test. l send 20 packets, 1 packet per second.When l receive a packet,save it in a file and send it to TCP server. When the TCP server receive a packet, use read_bfee() to parse it to a struct and save the struct in a vector. Then we get 20 x 1 struct from TCP server and 19 x 1 struct from the file. l have compared them carefully and l found something interesting.Two corresponding struct have the same value in each attribute(same rssi,same agc) but csi(1 x 3 x 30 complex)! l could not imagine where the problem is. What about your idea?

@caichao
Copy link
Owner

caichao commented Mar 21, 2017

Is the byte value the same?

@lqh929289158
Copy link
Author

Yes, l have made the test just now. The byte value is the same. Sorry, it is my fault. The csi are actually the same because in the read_bf_file.m, the order of Rx has been changed. Please check (line 79 in read_bf_file.m). In realtime_plot.m the order of Rx has not been changed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants