Device Interference?

I have been playing with an Argon on my desk, with a cheap little WiFi antenna for the last month or so, and it’s been almost flawless. The AP is 10 feet away, everything has been fine.

I booted up an old Photon and was playing with that right next to the Argon. At some point, I realized. that the argon was in a perpetual fast cyan blink state. On reset, it would connect to the cloud, and after a couple minutes it would go back to the fast blink. If power down the photon, there’s no problem.

The photon does not seem to have any connectivity issues, just the Argon.

Any ideas?

What code is running on your Argon?

I was about to update… looks like the issue might have been that I originally was messing around with the a udp broadcast on port 5555 on the Argon (As part of a general program I have several test routines running on), and then moved that code to the Photon.)

So there was a latent udp.begin(5555) on the Argon in setup(); but it was not actually sending anything.

But once I killed the udp.begin(5555) on the argon, it hasn’t died. (Before killing it, I moved it to another part of the house with a different AP, and it still had a problem, so I figured proximity wasn’t the issue, so it had to be the UDP).

So does that mean I can’t have multiple devices with udp.begin(5555)?

You can have multiple devices listen on the same port but as the docs state, when WiFi connection is lost you need to “re-register” the listener.

Hmmm. Neither of these was listening. Both were set up to broadcast, the Argon only when I pushed a button for testing.

BUT if I need to re-registed whenever the wifi goes down, that’s fine.

However, I am having trouble understanding why this would happen.

That is, even if I have no other udp calls at all, if I include udp.begin() in the Argon’s setup, and then run the photon (which has the same statement in setup as well as writing a udp packet every 10s), the Argon loses the cloud. The Photon never does.

OK, maybe I am unsure how to use UDP on these devices…

On my sending device, which does not listen, I am calling udp.begin(5556); This sends a ~800 character packet every 10s with

  udp.beginPacket( IPAddress(255,255,255,255), 5555);
  udp.write(String);
  udp.endPacket();

The sender device works fine, I am receiving the packets both in Wireshark and with another windows program listening on 5555. Wireshark says it’s 5556 -> 5555.

I have now set up my listening device, which is meant to listen on that port: udp.begin(5555);

But with that device on 5555, After a few minutes the cyan starts to fast blink and I cannot ping it. It’s disconnected. I have code in on there that checks WiFi.ready() and will udp.stop() and udp.begin() after a reconnect… but it’s not reconnecting.

So I think I have figured out that it does this when another device is listening to port 5555. Doesn’t matter if it’s the photon or the program on the Windows machine.

And once it gets into the REALLY fast cyan blink, it doesn’t come out. I set the LED to blink if WiFi.ready() goes false… and it doesn’t blink.

Whoah… the REALLY fast Cyan flash just went RED for one blink, then slowed down to a slighly less fast cyan blink.

A Reset and reboot makes it work, for a few minutes until this happens again.

WiFi.ready is TRUE, so I don’t know what to do here.

OK… one more… it happens regardless of whether or not there’s another listener.

Could this be a full buffer? I am not actually reading from it yet, still testing. But if udp.begin is called on a port, and there is data on that port, will this happen on the argon?

(A say argon, because my sender is a photon, and I played with it on the same port, listening and sending on 5555, and it never did this)

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.