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:

Pages: 1 ... 8 9 [10]

Author Topic: ZyXEL Modems - eg VMG1312-B10A - Custom Firmware MTU 1508 Maintenance  (Read 40196 times)

Weaver

  • Senior Kitizen
  • ******
  • Posts: 11459
  • Retd s/w dev; A&A; 4x7km ADSL2 lines; Firebrick
Logged

Weaver

  • Senior Kitizen
  • ******
  • Posts: 11459
  • Retd s/w dev; A&A; 4x7km ADSL2 lines; Firebrick
Re: ZyXEL Modems - eg VMG1312-B10A - Custom Firmware MTU 1508 Maintenanc
« Reply #136 on: October 01, 2022, 09:56:32 PM »

Talked about this a long time ago. Thereís a bug deep down somewhere or other that causes an occasional single large negative error count, in one single bucket only. I have never seen two adjacent buckets with negative counts in them. I have just seen an error count of about -50k / 30s in the CRC dataset for modem 2. The full stats are attached, zipped up.

It might be a nightmare to find this. One thing that would be nice to have though, so a workaround/feature-request would be to:

    * Limit all negative values to zero in the disparaged graphs where negative values are nonsense. Is there an appropriate point to just dispose a limit on the data values in held RAM just before they go off to be graphed ? In certain graphs where appropriate, that is.

* I have just noticed something: the big negative spike in the graph below is at 06:00 pretty much exactly. That has to be suspicious. What was BT (or AA) doing at or just before 06:00? When I zoom right in on it, I can see that there seems to be downstream data Ďmissingí (apparently, I havenít examined the dataset itself in the relevant file by eye yet) from 05:58:48 - 00:00:48, so 2 mins of weirdness, like a gap. Just after 06:00, the next sane value is zero, so things go straight back to normal; as mentioned before, just the one mad negative sample.

« Last Edit: October 01, 2022, 10:24:24 PM by Weaver »
Logged

johnson

  • Reg Member
  • ***
  • Posts: 838
Re: ZyXEL Modems - eg VMG1312-B10A - Custom Firmware MTU 1508 Maintenance
« Reply #137 on: October 18, 2022, 11:26:33 PM »

Thank you for the data!

As far as I can tell the issue lies with xdslctls output. I was sure it must be something like an issue with parsing data under certain conditions resulting in subtracting a running total from zero (maybe when the length of the stats file output changes during resync), but from the data supplied it seem the total counters actually did reset to zero themselves. Summing the columns in the logfile I reach nearly (not sure why not exactly) the totals in the stats file listing here:
Total time = 2 days 1 hours 8 min 59 sec
FEC:      131978      5693
CRC:      57628      27
ES:      4249      10
SES:      1260      0
UAS:      13784      12700
LOS:      128      0
LOF:      287      0
LOM:      7      0

So including the spurious negative values we reach the same total, which means the modems totals must have reset to zero, something that normally never happens without a reboot, or issuing the command 'xdslctl stop'.

If we graph the sum of downstream FEC it makes the reset clear:


So the easiest fix would just be resetining to zero on a negative value for the FEC and CRC graphs.
Logged

Weaver

  • Senior Kitizen
  • ******
  • Posts: 11459
  • Retd s/w dev; A&A; 4x7km ADSL2 lines; Firebrick
Re: ZyXEL Modems - eg VMG1312-B10A - Custom Firmware MTU 1508 Maintenance
« Reply #138 on: October 19, 2022, 12:52:16 AM »

Thank you for that and for your research work!

On a different matter, a general question: using the http port 8000 API, is there a way to get hold of some values such as the attenuation, the link-uptime and o/s-uptime/time since boot? (One of these latter values might be available at the end of one of the long, long data listings though.)
Logged

johnson

  • Reg Member
  • ***
  • Posts: 838
Re: ZyXEL Modems - eg VMG1312-B10A - Custom Firmware MTU 1508 Maintenance
« Reply #139 on: October 19, 2022, 01:35:09 AM »

Thank you for that and for your research work!

On a different matter, a general question: using the http port 8000 API, is there a way to get hold of some values such as the attenuation, the link-uptime and o/s-uptime/time since boot? (One of these latter values might be available at the end of one of the long, long data listings though.)

Attenuation and link uptime as displayed in the status page would need you to parse them out of :8000/data/stats just like the javascript in the page does, and unfortunately neither are stored in the log file if you mean finding historical values - i.e what was the attenuation before this resync - but could be added.

No way to get uptime with the modem as it is.

I've been playing with the httpd server included with busybox in the stock firmware (rather than the zyxel httpd that runs the normal web UI), its remarkably easy to get old school cgi scripts working for what ever you might want. If you were feeling adventurous you could try something like:

Code: [Select]
~ # cd /data
/data # mkdir -p www/cgi-bin
/data # busybox httpd -h /data/www/ -p 8001
/data # echo "#!/bin/sh" > www/cgi-bin/uptime
/data # echo "echo" >> www/cgi-bin/uptime
/data # echo "uptime" >> www/cgi-bin/uptime
/data # chmod +x www/cgi-bin/uptime

Visiting modemip:8001/cgi-bin/uptime you would be greeted by:
 08:54:26 up 40 min, load average: 1.03, 1.05, 1.00

The other values you mentioned could be awked out in similar scripts residing in /data/www/cgi-bin. Starting of this server could be added without issue to your processing of /data/boot-cmds.sh.

Edit:
I haven't forgotten about the ssh server btw, these additional values could be added to the normal stats server then. 
« Last Edit: October 19, 2022, 01:43:31 AM by johnson »
Logged

johnson

  • Reg Member
  • ***
  • Posts: 838
Re: ZyXEL Modems - eg VMG1312-B10A - Custom Firmware MTU 1508 Maintenance
« Reply #140 on: October 19, 2022, 03:39:18 AM »

If you are bored and feel like testing:
https://www.dropbox.com/s/tdvgv6a9sb1anzr/1312-ssh-test.bin

No fix for the negative error graphs, but it does have:
  • dropbear SSH server on port 2222
  • sftp-server - scp/sftp browsing/mount sshfs
  • nano - ease of editing for those who are vim challenged  :P
Logged

Weaver

  • Senior Kitizen
  • ******
  • Posts: 11459
  • Retd s/w dev; A&A; 4x7km ADSL2 lines; Firebrick
Re: ZyXEL Modems - eg VMG1312-B10A - Custom Firmware MTU 1508 Maintenance
« Reply #141 on: October 19, 2022, 10:51:43 PM »

Amazing, thanks for all that work and those excellent tips! As we talked about before, by my own version numbering system, shall I then call that release my.v.9.0?

Iíll blow one modem shortly and start playing with it. Having a way to inject files into them will make life so much better. I have a pile of spare modems that I should get round to setting up in readiness as in the event of another lightning strike, I donít want the added pressure of having to flash modems in addition to the other worries on such an occasion.

By the way, Iím perhaps being daft or misunderstanding but I couldnít find "attenuation" in port:8000/data/stats, even though I did a search for the text rather than just scanning the contents by eye. What am I doing wrong?

One further thought for you and Burakkucat. My stupid iPad drops any TCP connection to the modem when I task-switch away from the telnet/ssh app. Normal and maddening iOS/iPadOS behaviour. When this happens, does your modemís shell then terminate? It does for me so I keep losing my session within a timeout of a few tens of seconds. I need the "screen" program to prevent this, I think, which works well on my Raspberry Pi.
« Last Edit: October 19, 2022, 11:34:46 PM by Weaver »
Logged

johnson

  • Reg Member
  • ***
  • Posts: 838
Re: ZyXEL Modems - eg VMG1312-B10A - Custom Firmware MTU 1508 Maintenance
« Reply #142 on: October 20, 2022, 12:32:33 AM »

Amazing, thanks for all that work and those excellent tips! As we talked about before, by my own version numbering system, shall I then call that release my.v.9.0?

Blast! I did at least remember to change the version string, but just to "V17-ssh-test", v9 it should be.

Quote
Iíll blow one modem shortly and start playing with it.

One thing to mention is that (as the ssh login is a a real one reading the /etc/passwd file, rather than escaping the zyxel created one that runs as root) to do anything interesting requires the supervisor account. A handy script is in the $PATH to find the supervisor password if you dont already have it, superpass, its just base64 encoded on my modem at least.

Quote
By the way, Iím perhaps being daft or misunderstanding but I couldnít find "attenuation" in port:8000/data/stats, even though I did a search for the text rather than just scanning the contents by eye. What am I doing wrong?

The line begining Attn(db):

Line Status:      No Defect
Training Status:   Showtime
Down      Up
SNR (dB):    7.6       6.1
Attn(dB):    68.0       41.6
Pwr(dBm):    16.4       12.4

To awk  downstream out:
Code: [Select]
awk '/^Attn/ {print $2}' stats

Quote
One further thought for you and Burakkucat. My stupid iPad drops any TCP connection to the modem when I task-switch away from the telnet/ssh app. Normal and maddening iOS/iPadOS behaviour. When this happens, does your modemís shell then terminate? It does for me so I keep losing my session within a timeout of a few tens of seconds. I need the "screen" program to prevent this, I think, which works well on my Raspberry Pi.

Hmm, I'l try and recreate it. See if this version of dropbear produces the same behaviour, I believe its timeout is set to zero - but I'm sure screen or tmux will compile if needed.
Logged

burakkucat

  • Respected
  • Senior Kitizen
  • *
  • Posts: 38300
  • Over the Rainbow Bridge
    • The ELRepo Project
Re: ZyXEL Modems - eg VMG1312-B10A - Custom Firmware MTU 1508 Maintenance
« Reply #143 on: October 20, 2022, 12:57:44 AM »

One further thought for you and Burakkucat. My stupid iPad drops any TCP connection to the modem when I task-switch away from the telnet/ssh app. Normal and maddening iOS/iPadOS behaviour. When this happens, does your modemís shell then terminate? It does for me so I keep losing my session within a timeout of a few tens of seconds. I need the "screen" program to prevent this, I think, which works well on my Raspberry Pi.

Either "screen" or "script" would be appropriate for your need.  :)
Logged
:cat:  100% Linux and, previously, Unix. Co-founder of the ELRepo Project.

Please consider making a donation to support the running of this site.

Weaver

  • Senior Kitizen
  • ******
  • Posts: 11459
  • Retd s/w dev; A&A; 4x7km ADSL2 lines; Firebrick
Re: ZyXEL Modems - eg VMG1312-B10A - Custom Firmware MTU 1508 Maintenance
« Reply #144 on: October 20, 2022, 03:40:53 AM »

Ah, "Attn" - I forgot about searching for the abbreviated form. :-[

Iím pretty sure that the dropping of the TCP connection is the fault of iOS, but I forget where I got that idea from. I used to have these problems with the Raspberry Pi until Burakkucat set me up with screen. I looked into tmux too but didnít get around to playing with it.

As for the version number, weíll have future opportunities. Having agreed version numbers means that we can talk to one another with a common language and know what weíre talking about, and it really helps me in being able to appropriately create version-numbered subdirectories that we both understand.

I do already have the supervisor password for all my modems.
« Last Edit: October 20, 2022, 04:11:56 AM by Weaver »
Logged
Pages: 1 ... 8 9 [10]