Author Topic: [SOLVED] HT502 does not fetch files over TFTP  (Read 1048 times)

alchemyx

  • Newbie
  • *
  • Posts: 7
    • View Profile
[SOLVED] HT502 does not fetch files over TFTP
« on: February 22, 2013, 05:28:04 AM »
Hello,

We have a setup where we provision Cisco/Linksys SIP gateways and it works just fine. Because
of trouble with latest SPA122 from Cisco which are load of $$$$ we wanted to test Grandstream
products. I have on my desk HT502 which gives me some trouble when provisioning. After
taking it out of the box it fetched file cfgMAC properly and configured itself properly (I prepared
that file using encode.sh from latest GS_CFG_GEN). It accepted every setting and run smoothly.

After that I had to make some changes to its configuration manualy and after that it stopped
accepting config files. I tried resetting it multiple times but it doesn't fetch config file anymore.

Here is example how it shoud like in logs when it properly gets file (SPA201 as an example):

Code: [Select]
Feb 22 14:41:58 natownica atftpd[6626.159295232]: socket may listen on any address, including broadcast
Feb 22 14:41:58 natownica atftpd[6626.159295232]: Creating new socket: 0.0.0.0:51337
Feb 22 14:41:58 natownica atftpd[6626.159295232]: Serving /spa2102-aa:aa:aa:aa:aa:aa to 10.A.B.C:3459
Feb 22 14:41:58 natownica atftpd[6626.159295232]: tsize option -> 17888
Feb 22 14:41:58 natownica atftpd[6626.159295232]: timeout option -> 5
Feb 22 14:41:58 natownica atftpd[6626.159295232]: End of transfer
Feb 22 14:41:58 natownica atftpd[6626.159295232]: Server thread exiting

But when HT502 wants its config:

Code: [Select]
Feb 22 14:52:42 natownica atftpd[6626.159295232]: socket may listen on any address, including broadcast
Feb 22 14:52:42 natownica atftpd[6626.159295232]: Creating new socket: 0.0.0.0:52477
Feb 22 14:52:42 natownica atftpd[6626.159295232]: Serving cfg000b823c8cee to 10.A.B.C:2049
Feb 22 14:52:42 natownica atftpd[6626.159295232]: blksize option -> 1024
Feb 22 14:52:47 natownica atftpd[6626.159295232]: timeout: retrying...
Feb 22 14:52:49 natownica atftpd[6626.150902528]: socket may listen on any address, including broadcast
Feb 22 14:52:49 natownica atftpd[6626.150902528]: Creating new socket: 0.0.0.0:57382
Feb 22 14:52:49 natownica atftpd[6626.150902528]: Serving cfgMAC.xml to 10.A.B.C:2049
Feb 22 14:52:49 natownica atftpd[6626.150902528]: File /srv/tftp/cfgMAC.xml not found
Feb 22 14:52:49 natownica atftpd[6626.150902528]: Server thread exiting
Feb 22 14:52:49 natownica atftpd[6626.150902528]: socket may listen on any address, including broadcast
Feb 22 14:52:49 natownica atftpd[6626.150902528]: Creating new socket: 0.0.0.0:55440
Feb 22 14:52:49 natownica atftpd[6626.150902528]: Serving cfg.xml to 10.A.B.C:2049
Feb 22 14:52:49 natownica atftpd[6626.150902528]: File /srv/tftp/cfg.xml not found
Feb 22 14:52:49 natownica atftpd[6626.150902528]: Server thread exiting
Feb 22 14:52:52 natownica atftpd[6626.159295232]: timeout: retrying...
Feb 22 14:52:52 natownica atftpd[6626.159295232]: recvmsg: Connection refused
Feb 22 14:52:52 natownica atftpd[6626.159295232]: tftpd_file.c: 958: recvfrom: Connection refused
Feb 22 14:52:52 natownica atftpd[6626.159295232]: Aborting transfer
Feb 22 14:52:52 natownica atftpd[6626.159295232]: Server thread exiting

I replaced IP and MAC addresses in that log but I hope you get the picture. Also I tried upgrading
firmware to the latest and still no luck. Any ideas appreciated. Thanks!
« Last Edit: March 13, 2013, 07:02:22 AM by alchemyx »

GSSupport41

  • Full Member
  • ***
  • Posts: 210
    • View Profile
Re: HT502 does not fetch files over TFTP
« Reply #1 on: February 22, 2013, 06:53:02 AM »
Hi,

What changes have you done on the HT manually that causes him this issue ? ( any changes under the Advanced settings) ?
Which firmware does it run now ?
Could you please PM me the Template you used to generate the config file ?



alchemyx

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: HT502 does not fetch files over TFTP
« Reply #2 on: February 22, 2013, 07:08:16 AM »
I did manually enter Syslog server and changed sip settings (account name and password).
Software version is 1.0.9.1. I will PM you template in just few minutes. Altough it does not
differ much from default one (only SIP and Syslog) Thanks!

GSSupport41

  • Full Member
  • ***
  • Posts: 210
    • View Profile
Re: HT502 does not fetch files over TFTP
« Reply #3 on: February 22, 2013, 08:32:32 AM »
It's normal that the phone won't request any longer any config file from your TFTP server after it had being provisioned with that config file, you see the P value 237, it need to be set to your TFTP's IP address, then rebuild the new config file, as last step you have to set back the IP address of your TFTP back in "config server path" under advanced settings. this shall fix the issue.

Please test and keep us updated.


alchemyx

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: HT502 does not fetch files over TFTP
« Reply #4 on: February 22, 2013, 09:41:07 AM »
thank you for quick reply

i will of course check that but i want to clarify two things
- should not device provision after hardware reset? because it didnt
- after provisioning for the first time in will ignore option 66 unless specified in config?

alchemyx

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: HT502 does not fetch files over TFTP
« Reply #5 on: February 25, 2013, 11:02:03 PM »
Unfortunately your tips didn't help. On Advanced tab in Firmware Upgrade and Provisioning I chose:

Upgrade via TFTP checked
Config Server Path - Ip address of our TFTP server
Allow DHCP Option 66 to override server - set to Yes

I still get timeouts on TFTP. So I also enabled Syslog to see what is wrong and

Code: [Select]
Feb 26 08:23:56 HT-502 [00: 0B:82:3C:8C:EE] TR069: DEBUG [0.1.1.31] Path of external data model is
Feb 26 08:23:56 HT-502 [00: 0B:82:3C:8C:EE] TR069: DEBUG [0.1.1.31] The external data model is not available. Now using is /usr/bin/dataModel
Feb 26 08:23:56 HT-502 [00: 0B:82:3C:8C:EE] TR069: DEBUG [0.1.1.31] get_prod_model HT5XX
Feb 26 08:23:56 HT-502 [00: 0B:82:3C:8C:EE] TR069: DEBUG [0.1.1.31] Prod Model is HT502
Feb 26 08:23:56 HT-502 [00: 0B:82:3C:8C:EE] TR069: DEBUG [0.1.1.31] get_prod_model HT5XX
Feb 26 08:23:56 HT-502 [00: 0B:82:3C:8C:EE] TR069: DEBUG [0.1.1.31] Prod Model is HT502
Feb 26 08:23:56 HT-502 [00: 0B:82:3C:8C:EE] TR069: DEBUG [0.1.1.31] Check nvram defined infos !!
Feb 26 08:23:56 HT-502 [00: 0B:82:3C:8C:EE] TR069: INFO [0.1.1.31] The nvram defined info is disabled !!
Feb 26 08:23:56 HT-502 [00: 0B:82:3C:8C:EE] TR069: DEBUG [0.1.1.31] get_vendor HT5XX
Feb 26 08:23:56 HT-502 [00: 0B:82:3C:8C:EE] TR069: DEBUG [0.1.1.31] vendor is HT502
Feb 26 08:23:56 HT-502 [00: 0B:82:3C:8C:EE] TR069: DEBUG [0.1.1.31] model 8222 is need
Feb 26 08:23:56 HT-502 [00: 0B:82:3C:8C:EE] TR069: DEBUG [0.1.1.31] model 8223 is need
Feb 26 08:23:56 HT-502 [00: 0B:82:3C:8C:EE] TR069: DEBUG [0.1.1.31] p->size 518 518
Feb 26 08:23:56 HT-502 [00: 0B:82:3C:8C:EE] TR069: DEBUG [0.1.1.31] Auth type: 0
Feb 26 08:23:56 HT-502 [00: 0B:82:3C:8C:EE] TR069: DEBUG [0.1.1.31] Bind on 7547
Feb 26 08:23:56 HT-502 [00: 0B:82:3C:8C:EE] TR069: INFO [0.1.1.31] Connection request thread started
Feb 26 08:23:56 HT-502 [00: 0B:82:3C:8C:EE] TR069: DEBUG [0.1.1.31] Network interface 0: lo
Feb 26 08:23:56 HT-502 [00: 0B:82:3C:8C:EE] TR069: DEBUG [0.1.1.31] Network interface 1: adm0
Feb 26 08:23:56 HT-502 [00: 0B:82:3C:8C:EE] TR069: DEBUG [0.1.1.31] Network interface 2: adm1
Feb 26 08:23:56 HT-502 [00: 0B:82:3C:8C:EE] TR069: DEBUG [0.1.1.31] Get local interface successfully, validator string (lo,adm0,adm1)
Feb 26 08:23:56 HT-502 [00: 0B:82:3C:8C:EE] TR069: DEBUG [0.1.1.31] Enter cpe_load_nvram_ddb!
Feb 26 08:23:56 HT-502 [00: 0B:82:3C:8C:EE] TR069: DEBUG [0.1.1.31] Enter zlib_uncompress(/tmp/nvram_decode,/tmp/nvram_decompress)!
Feb 26 08:23:56 HT-502 [00: 0B:82:3C:8C:EE] TR069: DEBUG [0.1.1.31] Exit cpe_load_nvram_ddb!
Feb 26 08:23:56 HT-502 [00: 0B:82:3C:8C:EE] TR069: DEBUG [0.1.1.31] get_prod_model HT5XX
Feb 26 08:23:56 HT-502 [00: 0B:82:3C:8C:EE] TR069: DEBUG [0.1.1.31] Prod Model is HT502
Feb 26 08:23:56 HT-502 [00: 0B:82:3C:8C:EE] TR069: DEBUG [0.1.1.31] Model is HT502
Feb 26 08:23:56 HT-502 [00: 0B:82:3C:8C:EE] TR069: DEBUG [0.1.1.31] Get the device HT502
Feb 26 08:23:56 HT-502 [00: 0B:82:3C:8C:EE] TR069: DEBUG [0.1.1.31] MONITOR VoiceProfile EN 271
Feb 26 08:23:56 HT-502 [00: 0B:82:3C:8C:EE] TR069: DEBUG [0.1.1.31] MONITOR VoiceProfile EN 401
Feb 26 08:23:56 HT-502 [00: 0B:82:3C:8C:EE] TR069: DEBUG [0.1.1.31] get_prod_model HT5XX
Feb 26 08:23:56 HT-502 [00: 0B:82:3C:8C:EE] TR069: DEBUG [0.1.1.31] Prod Model is HT502
Feb 26 08:23:56 HT-502 [00: 0B:82:3C:8C:EE] TR069: INFO [0.1.1.31] Do not need to monitor Line
Feb 26 08:23:56 HT-502 [00: 0B:82:3C:8C:EE] TR069: DEBUG [0.1.1.31] TR111 PARAM GetValues and notified!
Feb 26 08:23:57 HT-502 [00: 0B:82:3C:8C:EE] TR069: INFO [0.1.1.31] ACS URL----------------------
Feb 26 08:23:57 HT-502 [00: 0B:82:3C:8C:EE] TR069: INFO [0.1.1.31] No default ACS URL, start the ACS Discovery function.
Feb 26 08:23:57 HT-502 [00: 0B:82:3C:8C:EE] TR069: DEBUG [0.1.1.31] Get pid: udhcpc 1841
Feb 26 08:24:01 HT-502 [00: 0B:82:3C:8C:EE]: Called from provision.
Feb 26 08:24:08 HT-502 [00: 0B:82:3C:8C:EE]: Failed decrypting cfg000b823c8cee (Error 255)
Feb 26 08:24:09 HT-502 [00: 0B:82:3C:8C:EE]: xml config empty
Feb 26 08:24:09 HT-502 [00: 0B:82:3C:8C:EE]: xml config empty
Feb 26 08:24:09 HT-502 [00: 0B:82:3C:8C:EE]: Call from provision
Feb 26 08:24:09 HT-502 [00: 0B:82:3C:8C:EE]: Provision setting is Always Check for New Firmware
Feb 26 08:24:10 HT-502 [00: 0B:82:3C:8C:EE]: Check fw upgrade
Feb 26 08:24:10 HT-502 [00: 0B:82:3C:8C:EE]: Checking bootloader

So Failed decrypting cfg000b823c8cee (Error 255) doesn't look very good :). Any other ideas? Thanks in advance.

alchemyx

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: HT502 does not fetch files over TFTP
« Reply #6 on: March 13, 2013, 02:52:20 AM »
OK found out on my own - Our TFTP server was in different subnet that device itself. It was no problem for other devices, only HT-502 had trouble with that. I changed our configuration in a way that TFTP IP is same as default gateway IP and it works just fine.