WiFi events and strange going on's

Recently I have been having problems with a RPZ(W) and connections.

Originally it was working nicely. Then one day it started dropping off line for no reason.

Being headless, it was difficult to know what was happening. Alas a power cycle was the only way to get it up again.

Then one day I looked at the logs as I noticed it going AWOL / offline.

It was not much I could understand, but I carried on investigating.

What has thrown a spanner in the works is today/this morning.

Last night the RPZ was up and working.

All the machines use MQTT to talk to one another and if/when they are disconnected, they send a message.

That's all well and good.

So: Last night it was online, working.
I powered down this machine, not it, not the MQTT server.
This morning, I got up and looked at the MQTT logs.

Green one is the MQTT host and the grey one is the RPZ.

Screenshot%20from%202019-06-28%2006-59-07 Screenshot%20from%202019-06-28%2007-08-11

Now, ok, I'm confused too.
Green one: 06:25:52 TelePi comms up. (RPZ)
That is about when I turned on this machine. I saw the LED blink as I turned it on. (Or I think I did.)
Grey one: 06:26:49 TelePi comms up.

That's nearly 1 minute later.

Why did I get that message? (Semi-rhetorical) If it (TelePi) was already up why would it send that message again?

Alas the LOG file isn't turned on, so I can't look at the actual log. :frowning: Drats.

But I'm curious to what is going on here and why.

The two machines are 2 m apart. It isn't like they are in different rooms with walls between then.

Thanks in advance.

Is this related to node-RED, or O/T?

1 Like

Check power supplies first.

Paul,

I was siply asking. for help with an outside view of what is happening.

TotallyInformation,

Thanks.

They are official RPI power supplies.

The mystery deepens.

Are there any other devices connected between the two machines, like a router or access point?

No. The green RPI is a WAP and the grey RPI is connected directly to it via wifi.

Though the reliability of the RPI WAP has been mentioned as somewhat questionable.
ie: not 100% guaranteed.

The antenna on a ZeroW is not very strong, and can be easily disrupted by external emr.

Although not specific to your case I always use an external antenna with a Zero.

Yes, I get that, but the two are only about 2 m apart. One piece of particle board between them which is a shelf.

I hope that isn't too much.

I have two devices in the same room for instance and when the boss lady uses the microwave, throughput drops to essentially zero.

I don't see a green message timestamped 06:25:52

My apologies. 06:26:52 I need to get my eyes checked.

I think it was 07:25 when I posted it and the optics weren't up to speed for the day.

:wink:

It is actually possible that the WiFi power setting on your router is too high. I've seen this before. If your router permits it, try changing the power output from auto to low.

I think he has them directly connected.

No Bobo, they are connected by WiFi.

TotallyInformation:
The WAP is a RPI 2B (?A)

On the assumption that those are MQTT LWT messages an important note is that they are not generated by the pi that is connecting or disconnecting, they are defined by the pi but generated by the MQTT server. Also the wording you have used is incorrect, it should be something like "TelePi is connected to MQTT server" and "TelePi is disconnected from MQTT server".
If a client is subscribed to the MQTT topic when the server sees that TelePi has connected or disconnected then it will send that message immediately, but if a client connects (or re-connects) at some time later then it will send it the message when it subscribes (assuming that you have said that the LWT messages are Retained). That is why the wording 'TelePi shutting down' may be misleading, if a client subscribes to the LWT topic minutes, hours, days or even years after TelePi disconnected then it would get that message immediately, even though TelePi might have disconnected ages ago.

Thanks Colin,

I only made the message under what I understood at the time.

My set up is that the LWT (and Birth certificates) are sent on EOM and SOM channels.
Set up in/on the MQTT config node of the MQTT host.
And on the RPZ Those messages are set for the connection....
Hang on.

This is on TelePi:
Screenshot%20from%202019-06-28%2018-06-53

So I know this isn't exactly correct with what is done, it helps me see what is going on - I think/hope.

The MQTT broker monitors the SOM and EOM channels and that is from where I got those messages.

The "grey" screen is TelePi (not the MQTT broker) and the "green" screen is the MQTT broker.
I have TelePi also subscribed to SOM and EOM in a attempt to see all sides of what is going on.

So I am not sure I am doing the best thing to see what is happening, but I hope this shows me as best I can.

Sorry, I don't know how to set WiFi power on a Pi. However, as you are using a Pi rather than a dedicated WiFi AP, you need to make sure that the Pi isn't tripping over its own processes and so causing dropouts. I know you said it was only happening with the Pi Zero but it is theoretically possible that is because the Pi0 is more sensitive?

I've never used a Pi as an AP and wouldn't really want to as WiFi is far too sensitive to external issues anyway. Even professional level AP deployments are a black art and it seems that issues are often dealt with using the brute force of having more AP's & lowering each AP's transmission power.

Thanks.

Not 100% the RPZ(w). I have an Arduino connected too and it has a lot of fun connecting too.

But other people have said that it (a NodeMCU) is renound (? spelling) for dropouts.
So it is a bit of a guessing game there.

But what you say could be worth considering.

Could you elaborate on what you mean:

Again: Thanks.!
Basic layout.

RPI%20WAP

What else is running on the WAP? Does it have CPU or I/O spikes? I'm no expert on Pi WiFi but this could, in theory cause the Pi to stop responding which might cause a dropout?

1 Like

The WAP is not going to get too populated.

I have the Arduino - that will be constant.

And I just realised I am an idiot. The RPZ(w) doesn't connect to that WAP.

The RPZ connects to a REAL WAP - my router/modem which has WAP.
That way it is on my network.

Because the two WAPs seem to go up and down around the same time - which indicates they may be fighting on channels - I get them mixed up when talking about the WAP.

Oh, poop!

Ok, stepping back.
Yes, with the first post of the two logs, TelePi sends/shows "comms up" at 06:26:49-52.
TelePi is connected to the network via my modem's WAP. That is where all the computers connect.

The RPI WAP is for the Arduino (GPS) to connect for local time injection - when that gets working.

I got up and turned on this machine. (Nuc) and as I did it I noticed the LED blink on the RPZ.
As it (the RPZ) had been playing games of locking up now and then and needing a power reset, I logged on to my network and looked at the two logs.

Seeing the message the TelePi had just sent a "comms up" message and nothing since 15:18:59 the previous day......

So I got confused. (Hits self on back of head as "wake up" message).

The other WAP is in another room with a brick wall between. (That's WAP (modem) to RPZ (TelePi))

So, the possibility of poor signal is actually now valid. Though a brick wall and a total linear distance of.....5m isn't that far.

But why would "TelePi" send a "comms up" message at about the same instance I turned on this computer?

I get that the other RPI (the green MQTT broker) would also see it. The message was sent.

Cringes in shame for making such a mistake.