raspberry pi serial communication function (serialdev)
Show older comments
Hello,
I'm working on a radar project and i want the Matlab to send commands and collect radar data remotely from the usb port of the raspberry pi 3 B+.
my setup is as follows:
I have the radar connected to the pi 3 through the usb port and I'm using the raspberry pi package on MATLAB to communicate with the radar remotely through the pi 3 usb port. I was able to successfuly communicate with the radar and collect radar data, but the problem is that using this setup i mentioned i was bounded by a limit for the amount of data i can collect from the radar. For example:
- when the radar is directly connected to the computer directly through usb i had no limit niether on the number of chirps i want to send or on the number of samples in each chirp. For example, if i wanted to have 64 samples/chirp i can send the max number of chirps possible which is 24 chirps.
- However, when the radar is connected to the pi i had a limit on the frame data, such that if i wanna have 64 samples/chirp i can only send 21 chirps which is down by 3 chirps.
After doing some research and experiments, i came to a conclusion that the problem is mainly located in the wireless communication between the pi and MATLAB and mostly in the function that opens the virtual port on MATLAB (serialdev) or in the function (read) that reads the data from the pi. The reason i came to that conculsion is because i tried a C code to collect the data on the pi directly to see if the problem is in the usb communication between the radar and the pi, but after runing the code on the pi it was able to collect all the data with no limit and no problem.
Also, the problem is not in the wirless transmission between the pi and the computer because usin SSH connection between the Pi and the computer i run the same C code to collect the data and i was able to collect the data on the computer with no limit on the number of sample or chirps and it works totaly fine.
So, can you please help me with this, and can you tell me what is the limit for the amount of data that can be collected using the function serialdev and the function read??
and if you think my conclusion is wrong tell me what do you think about it.
thank you.
Answers (0)
Categories
Find more on Pulsed Waveforms in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!