Sockets problem with Ian's program

Ok, perhaps this is not the best place…
I am going to avoid talking about the fact that my shake (in a remote location) stopped communicating twice this week and I had to switch of the power (I hate doing that). Probably because it is connected by wifi what I will change in my next visit (two months).
BUT, when it was working I was receiving here the UDP flow, what I have not being able is to make Ian’s program to read anything thanks to an apparent socket problem (the same in three computers running Win7, Win8 and Win10) probably related to any issue with a firewall (but it was switched off) or who knows what else…
I would like to write some software to deal with the signals but first I have to get those signals…
I access the Shake using it’s IP address through a tunnel between both locations and I have open ports in case I need to access it through the Internet.
(Well, you knew this sockets issues were going to land here sooner or later, don’t you?)
Thanks for your time and any help would be appreciated
Regards

The problem

Hi Arturo,

Can you download this MS program and test if you see incoming packets on the port? https://www.microsoft.com/en-us/p/udp-sender-reciever/9nblggh52bt0?activetab=pivot%3Aoverviewtab#

Ian

Hello again, Ian,
Yes, that is what I mean by the “UDP flow”, it arrives (when the Shake is connected like at this very moment).
By the way the shake is R34FA
Regards
Arturo

So to confirm, you can see UDP output when you run this program?

Try changing

sock = s.socket(s.AF_INET, s.SOCK_DGRAM | s.SO_REUSEADDR)

to

sock = s.socket(s.AF_INET, s.SOCK_DGRAM)

and see if that helps.

Yap, that helps… till here:

Hmm, that shouldn’t be happening, because presumably some small amount of time has elapsed since the first loop…I will investigate and let you know.

In the meantime, you can set

fps = 0

and it should be fine.

Yap, it works, thank you very much again.
Arturo

1 Like

Hi, Ian
I have changed that back and the program is working… most of the times. I think the problem would appear if difference between prev and curr is less than a second.
I am now “digesting” your program and changing the variables to something more clear (to me). What are supposed to be “wlen” and “fps”? I am not getting what they mean.
Thanks a lot
Arturo

fps is frames per second. It’s not important, it was just a value I included partially for development purposes and partially out of curiosity.

wlen doesn’t actually do much here either. It’s a relic of me experimenting with the spectrogram function’s capability. I think it can be set to 1 without messing anything up.

Perfect. Thanks a lot

2 Likes