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 [2]

Author Topic: Zyxel VMG3925-B10B and nowtv  (Read 3527 times)

siofjofj

  • Reg Member
  • ***
  • Posts: 126
Re: Zyxel VMG3925-B10B and nowtv
« Reply #15 on: April 11, 2021, 12:54:57 PM »

Found it!

In ./package/public-zyxel/libzcfg_fe_dal/patches/322-ZYXEL_ENHANCE_CLI_move_dhcp_option_60_61_encode_decode_from_GUI_to_DAL_FrankFang.patch, the function 'int opt61ValEncode' is defined (no corresponding function exists in the original source file targeted by the patch). It is

Code: [Select]
+int opt61ValEncode(char *iaid, char *duid, char *encVal, int tag){
+ if(encVal)
+ strcpy(encVal,"");
+
+ //*(iaid+4)='\0';
+
+ int strLen = 1+4+2+(strlen(duid)/2);
+ char tagStr[2]={0};
+ char hexLen[2]={0};
+
+ intToHexStr(tag,tagStr);
+ strcat(encVal,tagStr);
+
+ intToHexStr(strLen,hexLen);
+ strcat(encVal,hexLen);
+
+ strcat(encVal,"ff");
+ strcat(encVal,iaid);
+ strcat(encVal,"0002");
+ strcat(encVal,duid);
+
+ return 1;
+}

Rather than messing around trying to make patches of patches, a suitable modification to this file would be to replace the above with
Code: [Select]
+int opt61ValEncode(char *iaid, char *duid, char *encVal, int tag){
+ if(encVal)
+ strcpy(encVal,"");
+
+ //*(iaid+4)='\0';
+
+ int strLen = strlen(duid)/2;
+ char tagStr[2]={0};
+ char hexLen[2]={0};
+
+ intToHexStr(tag,tagStr);
+ strcat(encVal,tagStr);
+
+ intToHexStr(strLen,hexLen);
+ strcat(encVal,hexLen);
+
+ //strcat(encVal,"ff");
+ //strcat(encVal,iaid);
+ //strcat(encVal,"0002");
+ strcat(encVal,duid);
+
+ return 1;
+}
Which simply removes the parts of the code which insert 0xff, the IAID, 0x00 and 0x02. It also modifies the string length computation such that it gives the right value with all the other stuff removed.

So @lurch, do you want me to go ahead and build this for you, bearing in mind I have absolutely no way of testing it so flashing such a firmware will be at your own risk? Also, the firmware source on github linked above is not the latest, so it might be better to request the latest one from here https://www.zyxel.com/us/en/form/gpl_oss_form.shtml (I can't do this as it needs the router's serial number).
« Last Edit: April 11, 2021, 03:02:37 PM by siofjofj »
Logged

lurch

  • Just arrived
  • *
  • Posts: 8
Re: Zyxel VMG3925-B10B and nowtv
« Reply #16 on: April 11, 2021, 01:40:54 PM »

@siofjofj that would be awesome if you could do a modified firmware file and yes I take full responsibility if it turns it into a brick.
Logged

siofjofj

  • Reg Member
  • ***
  • Posts: 126
Re: Zyxel VMG3925-B10B and nowtv
« Reply #17 on: April 11, 2021, 06:54:24 PM »

Right, try this https://www.dropbox.com/s/0quvrw9kqxhgw64/5.13%28AAVF.12%29C0-opt61.bin?dl=0
This is the 5.13(AAVF.12)C0 firmware for the VMG3925-B10B with the edits to the handling of the option 61 parameters such that the DUID is passed through as is, and the IAID and all type bits are neglected.

Flash it to your router and, assuming it boots, try creating a WAN connection with
IAID = 00000000 (or any other 8 hex digits, this is now ignored but the GUI will insist on you entering 8 hex digits)
DUID = 616263646566313233343536406e6f7774767c6162636431323334 (this is abcdef123456@nowtv|abcd1234 as hex, you could use any other properly formatted string if you wish)
and then capture the result using Wireshark. If this worked, the result should be 3d1b616263646566313233343536406e6f7774767c6162636431323334. Please post the result in HEX and ASCII if unsure.
Logged

lurch

  • Just arrived
  • *
  • Posts: 8
Re: Zyxel VMG3925-B10B and nowtv
« Reply #18 on: April 11, 2021, 07:31:45 PM »

So loaded your firmware

Current Firmware Version: V5.13(AAVF.12)C0
IAID = 00000000
DUID = 616263646566313233343536406e6f7774767c6162636431323334 (abcdef123456@nowtv|abcd1234 as hex)

wiresshark output

Code: [Select]
=abcdef123456@nowtv|abcd1234
Code: [Select]
0000   ff ff ff ff ff ff 5c 6a 80 5d bd 3f 08 00 45 00   ......\j.].?..E.
0010   02 40 00 00 00 00 40 11 78 ae 00 00 00 00 ff ff   .@....@.x.......
0020   ff ff 00 44 00 43 02 2c 78 55 01 01 06 00 60 82   ...D.C.,xU....`.
0030   dd 47 00 00 00 00 00 00 00 00 00 00 00 00 00 00   .G..............
0040   00 00 00 00 00 00 5c 6a 80 5d bd 3f 00 00 00 00   ......\j.].?....
0050   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
0060   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
0070   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
0080   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
0090   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
00a0   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
00b0   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
00c0   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
00d0   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
00e0   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
00f0   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
0100   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
0110   00 00 00 00 00 00 63 82 53 63 35 01 01 3d 1b 61   ......c.Sc5..=.a
0120   62 63 64 65 66 31 32 33 34 35 36 40 6e 6f 77 74   bcdef123456@nowt
0130   76 7c 61 62 63 64 31 32 33 34 37 06 01 03 06 0c   v|abcd12347.....
0140   0f 1c ff 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
0150   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
0160   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
0170   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
0180   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
0190   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
01a0   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
01b0   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
01c0   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
01d0   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
01e0   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
01f0   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
0200   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
0210   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
0220   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
0230   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
0240   00 00 00 00 00 00 00 00 00 00 00 00 00 00         ..............

So looks like it's done the trick :cool:
Logged

siofjofj

  • Reg Member
  • ***
  • Posts: 126
Re: Zyxel VMG3925-B10B and nowtv
« Reply #19 on: April 11, 2021, 07:40:58 PM »

So looks like it's done the trick :cool:
Agreed, it looks good. This will almost certainly work on VDSL now. Just a pointer on this, when my connect my VMG8924 to my NowTV VDSL connection the WAN connection initially fails, and takes a few minutes to connect after the VDSL connection has synced. Not sure why this is, but if you find your VMG3925 fails to connect just wait a few minutes and see if it comes up.

I've attached the patch to this post for the record. If someone wants to compile a different version of the firmware themselves, the patch replaces ./package/public-zyxel/libzcfg_fe_dal/patches/322-ZYXEL_ENHANCE_CLI_move_dhcp_option_60_61_encode_decode_from_GUI_to_DAL_FrankFang.patch
Logged

lurch

  • Just arrived
  • *
  • Posts: 8
Re: Zyxel VMG3925-B10B and nowtv
« Reply #20 on: April 11, 2021, 07:46:15 PM »

You absolute legend! I have requested the latest firmware from https://www.zyxel.com/us/en/form/gpl_oss_form.shtml and tomorrow I will try your patched firmware on the nowtv connection and let you know. Thanks for the heads up about the conneciton delay after syncing. I really appreciate you doing this for me and the community ;)
Logged
Pages: 1 [2]
 

anything