To be honest I am a bit confused and I guess the error is quite obvious. Anyway.
So, on one side I have a UDP sink from GNU Radio sending data to a Python client.
The problem is the data I am receiving does not make much sense (I am able to properly read the data if, instead I read it from a file sink, so it has to do with the way I am doing the network part).
I tried already as little endian and also big endian, just in case, I still get rubbish.
So, on the sink side (the server side) the block config is:
self.blocks_udp_sink_0 = blocks.udp_sink(gr.sizeof_gr_complex*1, "the_ip",8080,1472,True)
So, on the other side I will get 1500 bytes, no? 1472 of payload +28 of the UDP header.
What I did, and based on this[1] example seems ok, is reading 1500 bytes in the client side and assume the header is taken out by recvfrom method:
data_tmp, addr = sock.recvfrom(1500)
I assume data_tmp shall be the 1472 bytes of data, at least the length matches).
As I am sending gr_complex I read 8 bytes (two floats little endian, one for I and one for Q components).
So, what am I missing?
Thanks!!
[1] There are many other like this one, the point is I assume the method splits the header from the payload. https://www.binarytides.com/programming-udp-sockets-in-python/