Using v3.3.8. On the device discovery webpage one of the columns is "Application" which displays the string in AppName. Using an example program the AppName string is displayed immediately. But with my application, it takes about 20-minutes to show up. The device is found immediately, it's just the AppName that is blank for about 20-minutes. And it doesn't matter how many times I hit the Refresh button. Once the AppName is displayed, if I reboot, it disappears for another 20-minutes. But if I open the ConfigPage, the AppName string is displayed under the Sys tab.
The only difference I can see between how the example programs set AppName and how my app sets AppName is that, in the examples AppName is set at its declaration whereas my app sets it during the device initialization phase because the string contains info that is dynamic. Is there something I can do to speed up how soon AppName gets displayed?
//I'm suprised that it ever changes.... the sys.system_app is set in global construction.
This should fix it in 30 seconds or so...
If you can push you code ABOVE init and add the line above it should work on the first message.
If you must be after init
If you want it to be even quicker (IE at that point 8 seconds after init the first discovery packet has been sent)
One might be able to modify the discovery servlet that manages this to force an update quicker....
Since there are multiple devices on the same network, I added the device serial number to AppName to be able to identify each device. But the serial number is not available until I initialize my own code and copy the unit's configuration parameters from non-volatile memory. Through much painful testing, if init() and InitFlashFileSystem() are not the first 2 functions, the network does not operate correctly.
sys.system_app = AppName throws a compiler error about trying to assign a const char * to a config_obj. But changing it to sys.system_app.ModifyValue(AppName) works. I added it before init() and it gets displayed immediately, but it doesn't have the serial number because my own initialization hasn't happened yet. I update AppName later after my init to add the serial number, but it still takes over 10 minutes to update in discovery webpage.
It is what it is, not a show stopper. I can just look in the ConfigPage for the complete AppName string. Thanks for the feedback.