-
Notifications
You must be signed in to change notification settings - Fork 52
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
IWL5300 realtime csi gathering #3
Comments
Hi, that code is functional but incomplete. My only test system using IWL5300 encounters a buffer overflow after reading CSI in real-time for longer than 1 minute. I am inexperienced with Linux sockets and as such haven't been able to effectively debug this issue. For now there may be better solutions for this elsewhere, but I may be able to investigate this again soon. |
Are you sure that a buffer overflow happend? Because currently I am using the https://github.com/pgawlowicz/linux-80211n-csitool-supplementary/blob/master/python/netlink.py code to extract csi at real time and have no problems. a few times the driver crashes after collecting much data but I had this behavior also with the log_to_file. |
i try to merge your code with the code by pgawlowicz. def read_bf_entry(self, data):
"""
This function parses a CSI payload not associated with a file (for example: those extracted via netlink).
Parameters:
data (bytes): The total bytes returned by the kernel for a CSI frame.
Returns:
csi_block (dict): Individual parsed CSI block.
"""
csi_header = struct.unpack("<LHHBBBBBbBBHH", data[4:25])
all_data = [x[0] for x in struct.Struct(">B").iter_unpack(data[25:])]
csi_block = self.read_bfee(csi_header, all_data)
return csi_block Because I get an exception if i want to fit the udp payload into this function the code diff at netlink.py is only:
and the return of the payload :
it seems that if the CN_NETLINK_USERS = 10 is set, then the socket is never receiving datagramms. therefore i think the 11 is right. but which datapart has to be passed to the Here you can find the current code state: |
with the following snipped you can try to use the realtime capture: def print_and_fill(csiEntry):
print(csiEntry)
global entrys
entrys.append(csiEntry)
reader = IWLBeamformReader()
entrys = []
reader.read_log(print_and_fill) |
I noticed that |
Look here maybe this helps you to fix the issue |
Thank you, I will attempt this solution once I've also had time to merge your PR! |
Hay @Gi-z ,
Your tool is very helpful extracting CSI of the Intel5300. Thanks for sharing this.
I see that you implemented some legacy code that extracts CSI directly from the UPD stream. why you discarded this functionality?
The comments of the IWLBreamformReader says that it extracts realtime Data, but the functions seems to be not implemented yet.
In your readme is describing that it is only possible to read the .pcap and die .data files.
I my use-case it would be great to extract CSI at realtime.
The text was updated successfully, but these errors were encountered: