Kitz ADSL Broadband Information
adsl spacer  
Support this site
Home Broadband ISPs Tech Routers Wiki Forum
 
     
   Compare ISP   Rate your ISP
   Glossary   Glossary
 
Please login or register.

Login with username, password and session length
Advanced search  

News:

Author Topic: Odd incredibly rare response from ZyXEL VMG 1312-B10A  (Read 931 times)

Weaver

  • Senior Kitizen
  • ******
  • Posts: 11459
  • Retd s/w dev; A&A; 4x7km ADSL2 lines; Firebrick
Odd incredibly rare response from ZyXEL VMG 1312-B10A
« on: January 22, 2022, 12:27:11 PM »

As you may recall from my earlier posts, I have written an iOS program that interrogates my custom ZyXEL modems over http and checks on the health of the DSL link and its error counts. This is done by querying http://modem:8000/data/varStats using http which is, thanks to the Johnson custom firmware, the same as issuing the equivalent telnet command. Now incredibly rarely ~< 0.01 of the time, I get a response which is not the usual file full of data with stats and error counts but a short message the same as you get from a modem that is not in Showtime, in this case the "status:" field is equal to "idle". I don’t know what "status: idle" means in this case. A second query a moment later always gives a normal response, the usual file full of stats etc. so this abnormality is so far always a one-off not something that lasts for any extended time period, not even a short one. FYI My code has been carefully tested in this specific area, which was done by injecting fake faults into the software to see how the error handling code deals with them subsequently, so I can’t see how it can be a bug. This is also supported by the fact that the same code subsequently reports the normal file full of expected data.

Anyone ever seen this with telnet? "Status: idle” or similar? What could it mean?
« Last Edit: January 27, 2022, 06:36:48 AM by Weaver »
Logged

johnson

  • Reg Member
  • ***
  • Posts: 838
Re: Odd incredibly rare response from ZyXEL VMG 1312-B10A
« Reply #1 on: January 27, 2022, 04:02:22 AM »

Curious!

Would be glad to try and figure out whats going on.

Quote
I don’t know what "status: idle" means in this case.

This suggests the modem doesnt have sync and is either disconnected from the line or in the process of retraining, obviously if there is no associated resync when you get this response it must be in error.

Quote
querying http://modem:8000/data/varStats

It shouldnt make much odds, but varStats in only used and updated by the logging script that records SNRM/errors/etc, and is not updated on http request, the “stats” one thats used to make the status page is. Again, this shouldnt make a difference, but if it were me I'd change the code to point at http://modem:8000/data/stats instead.

How often does your iOS program poll the modem?

Given you get a valid plan text file back that isnt garbled and you can parse out the status field from it, it doesnt sound like an issue with the small webserver. I might of thought it was a collision with calling the underlying xdslctl command to gather stats at the same time as the logging script does (every 30 seconds), but as you were polling the varStats file rather than the one that triggers that, it seems unlikely.

I think I'll try bothering the varStats and stats files at an unhealthy rate and see if I can replicate it.
Logged

Weaver

  • Senior Kitizen
  • ******
  • Posts: 11459
  • Retd s/w dev; A&A; 4x7km ADSL2 lines; Firebrick
Re: Odd incredibly rare response from ZyXEL VMG 1312-B10A
« Reply #2 on: January 27, 2022, 06:34:30 AM »

> I'd change the code to point at http://modem:8000/data/stats instead.

done - many thanks.

Unfortunately, iOS Shortcuts, in which the program is written, is pretty limited, as is iOS itself in some ways maybe. I can’t write an app that runs continuously or in background. It just runs as a one-off, runs on demand and generates a report when you click an icon.

iOS 15 is so painfully slow that the app takes about 40 s to complete and display a report for three modems. It does a lot of checking - described in another thread. I’d obviously like to write a service process / daemon but when you run the code Shortcuts just locks the while machine’s UI upp and if you switch away from it, all hell breaks loose, the full-screen window used by my Shortcuts app just gets ‘lost’ for want of a better word, it’s just as if they never thought about such an eventuality! Many aspects of Shortcuts show zero design nouse. It’s convenient though since very very stupid people who are in morphine can write reasonably complex programs without reading the manual and with no tools.

I ought to write a service on my Raspberry pi which has a ‘proper’ development environment and which is always running.
« Last Edit: January 27, 2022, 06:45:22 AM by Weaver »
Logged

johnson

  • Reg Member
  • ***
  • Posts: 838
Re: Odd incredibly rare response from ZyXEL VMG 1312-B10A
« Reply #3 on: January 31, 2022, 04:22:38 AM »

So I tried pestering the "stats" file with requests this evening but couldnt replicate anything but a Showtime response regardless of how often I polled (multiple instances, bursts of requesting as fast as possible etc). So I feel confident in saying the calls to xdslctl underneath don't interfere with each other.

The logging script thats constantly running (but only storing 48hrs of data) is reading the "Status:" value like this:
Code: [Select]
lineActive=$(awk '/^Status/ {if ($2 == "Showtime") print "true";
                        else print "false";exit}' $statsFile)       
...

if [ $lineActive = "true" ]
...
else
...
echo "$timeStamp NOSYNC" >> $logFile

So anything other than "Showtime" will have a time stamp followed by NOSYNC like this:
Code: [Select]
1597296133 NOSYNC

If you SSH into your raspberry pi you could run something like this to show any times in the past 48 hours the stats logging script has found anything other than Showtime in a human readable format (note that the time stamps are according to the modem - wrong if its time is not set):
Code: [Select]
curl modem-ip:8000/data/logfile | grep NOSYNC | awk '{print "@"$1}' | date -f -

Sounds like iOS Shortcuts serves a purpose, at least provides a way to automate things. I cant help much with it though.

If you'd like the basics of a python or bash script to do similar things on the raspberry pi then I'd be more than happy to.

Edit:
I realise that this doesnt really address the issue of spurious Status: Idle, but it is a way of checking for it the log file, something that isnt displayed or indicated on the status page.
« Last Edit: January 31, 2022, 04:51:01 AM by johnson »
Logged

Weaver

  • Senior Kitizen
  • ******
  • Posts: 11459
  • Retd s/w dev; A&A; 4x7km ADSL2 lines; Firebrick
Re: Odd incredibly rare response from ZyXEL VMG 1312-B10A
« Reply #4 on: January 31, 2022, 12:56:11 PM »

Thank you so much for your generous help! Once again. Much appreciated and good to hear from you again. I can thrash a modem as you say.

I’m even beginning to wonder if this is a bad modem. In the ‘hollow curve disease’ threads elsewhere the thinking is that my current modems have been damaged by a surge in jan/feb 2020. It was then that the long sequence of many faults began in all my four modems it now seems, because in every case we have discovered that power-cycling a modem cures the hollow curve disease. Neither I (stupid) no A&A could work out that this wasn’t a DSL line problem. Anyway, I’m wondering how many other problems there are in some or all of the current modems. I have a large stock of spares and just need to recruit my wife to help me swap the current ones out. That might mean that the status: idle thing would go away. It could be as rare as 1:1000. There have been other weird things going on with the modems. When I telnet into them sometimes, not often, telnet responds incredibly slowly, taking 20 s to come up with each CLI prompt for example. What seems to have been happening is that an Openreach engineer comes out, somehow reboots a modem - not sure how - and then can’t find a fault in the line, plugs everything back in, fires it up and the hollow curve disease is gone. It took what 20 months for the penny to drop, and both I and AA were pretty much equally dense. AA I think trusted me too much to do the usual have you turned it off and on customer service thing; they respected me a bit too much.

There’s no sign of any problems on the line when the status: idle thing has happened. I can check that with the clueless.aa.net.uk server’s line monitoring graphs and they show nothing funny going on, no loss of sync. A resync takes me about 70 s, so I would be able to see that clearly on AA’s line monitoring graphs.

You’ve clearly proven that it is not a general modem bug.

So the thing for me to do is to swap the modems out, which I promised AA I would do before xmas but still haven’t managed to get it done. I’ll makes sure that I also swap out the PSU bricks in case current dI/dt delivery is a problem. Saw a prototype machine at work once where slew rate wasn’t high enough and the machine needed a local capacitor to supply on-demand fast delivery current to satisfy demand spikes rather than trying to pull fast current through a line from the PSU that had unwanted inductance.
Logged