• AVR Freaks

DHCP hostname not working with web_servser_nvm_mpfs example, MPLAB X (v4.15) PIC32MZ

Author
arpatel
Starting Member
  • Total Posts : 69
  • Reward points : 0
  • Joined: 2019/01/09 23:24:14
  • Location: 0
  • Status: offline
2019/01/10 17:15:49 (permalink)
0

DHCP hostname not working with web_servser_nvm_mpfs example, MPLAB X (v4.15) PIC32MZ

I am trying to change host name harmony example but it isn't working. When I change the name it restart the stack and reflect in the html host name field. However, when I type in the browser it is not found. I have checked with wireshark that my browser broadcast Name Query but PIC32MZ isnt responding. It only respond first time with default NetBIOS host name(MCHPBOARD_E).
 
Is there anybody who has faced this problem? Or Does anybody know why this is happening?
#1
rainad
Super Member
  • Total Posts : 1480
  • Reward points : 0
  • Joined: 2009/05/01 13:39:25
  • Location: 0
  • Status: online
Re: DHCP hostname not working with web_servser_nvm_mpfs example, MPLAB X (v4.15) PIC32MZ 2019/01/14 15:38:05 (permalink)
0
Try to look into the DHCP server tables (router/server that you use in your network) and check the DHCP leases and the host names.
Note that '_' is not a valid name for DHCP host name and it will be replaced by an 'x': look into dhcp.h TCPIP_DHCP_HostNameCallbackRegister() for details.
If you use the DHCP server machine as the DNS server, then it'll resolve the name registered by DHCP.  
#2
arpatel
Starting Member
  • Total Posts : 69
  • Reward points : 0
  • Joined: 2019/01/09 23:24:14
  • Location: 0
  • Status: offline
Re: DHCP hostname not working with web_servser_nvm_mpfs example, MPLAB X (v4.15) PIC32MZ 2019/01/14 17:13:51 (permalink)
0
Thank you for your help.
I believe that harmony web_servser_mpfs's web interface try to update netBios name. It works for the default MCHPBOARD_E ( which is default name by microchip) but if I change it , it doesnt work.
Although it reflects in the web interface that name has been changed but doesnt redirect to PIC32.
 
I have look into router there is listed as different name rather than MCHPBOARD_E . I have checked with wireshark, when I type http://(hostname) it broadcast NBNS name query but it doesnt get any reply.
 
#3
qhb
Superb Member
  • Total Posts : 9999
  • Reward points : 0
  • Joined: 2016/06/05 14:55:32
  • Location: One step ahead...
  • Status: offline
Re: DHCP hostname not working with web_servser_nvm_mpfs example, MPLAB X (v4.15) PIC32MZ 2019/01/14 18:12:30 (permalink)
0
You still have not revealed what name you are trying to use.

Nearly there...
#4
arpatel
Starting Member
  • Total Posts : 69
  • Reward points : 0
  • Joined: 2019/01/09 23:24:14
  • Location: 0
  • Status: offline
Re: DHCP hostname not working with web_servser_nvm_mpfs example, MPLAB X (v4.15) PIC32MZ 2019/01/14 20:48:18 (permalink)
0
I have tried different name such as "DEMOROOM","ROOM1","demodesk" etc
#5
rainad
Super Member
  • Total Posts : 1480
  • Reward points : 0
  • Joined: 2009/05/01 13:39:25
  • Location: 0
  • Status: online
Re: DHCP hostname not working with web_servser_nvm_mpfs example, MPLAB X (v4.15) PIC32MZ 2019/01/16 07:39:52 (permalink)
0
The router lists a different name because, as before, the '_' character is not valid for a host name. So probably the name should be something like 'MCHPBOARDxE' corresponding to 'MCHPBOARD_E'.
Changing the interface parameters from the web page used to work. I'll do a quick test on my side and let you know.
What version of Harmony do you use and what HTTP server demo?
 
 
#6
arpatel
Starting Member
  • Total Posts : 69
  • Reward points : 0
  • Joined: 2019/01/09 23:24:14
  • Location: 0
  • Status: offline
Re: DHCP hostname not working with web_servser_nvm_mpfs example, MPLAB X (v4.15) PIC32MZ 2019/01/16 22:57:46 (permalink)
0
Thanks for your quick reply.
 
My harmony details:
 
Harmony 2.04
HTTP_SERVER == web_server_nvm_mpfs
PIC32MZ2048EFM064
Custom board
 
 
Thanks f
 
#7
rainad
Super Member
  • Total Posts : 1480
  • Reward points : 0
  • Joined: 2009/05/01 13:39:25
  • Location: 0
  • Status: online
Re: DHCP hostname not working with web_servser_nvm_mpfs example, MPLAB X (v4.15) PIC32MZ 2019/01/17 14:57:22 (permalink)
0
Yes, it seems to be a bug, the socket loses its binding when the interface is turned down and the socket is disconnected.
It's been fixed in the repo and it will be part of the next release.
You can apply the fix yourself in the udp.c, around line #2162 in function TCPIP_UDP_Disconnect, it reads:
if(pSkt->extFlags.serverSkt != 0)
{ // stop server connection on the remote port; new rbind needed
pSkt->remotePort = 0;
}
 
It should be:
if(pSkt->extFlags.serverSkt != 0 && pSkt->flags.looseRemPort != 0)
{ // stop server connection on the remote port if not specifically rbound
pSkt->remotePort = 0;
}
 
Please try the fix and let us know if it works for you.
Thank you for finding and reporting this.
 
 
#8
arpatel
Starting Member
  • Total Posts : 69
  • Reward points : 0
  • Joined: 2019/01/09 23:24:14
  • Location: 0
  • Status: offline
Re: DHCP hostname not working with web_servser_nvm_mpfs example, MPLAB X (v4.15) PIC32MZ 2019/01/17 17:21:24 (permalink)
0
You were absolutely right.
It fixed the issue.
It seems like microchip has got many bugs in harmony and its not ready yet !!!
Thanks for your help
#9
Jump to:
© 2021 APG vNext Commercial Version 4.5