How to change the name of the platform reported to IPSetup

Discussion to talk about software related topics only.
Post Reply
matrixtech
Posts: 2
Joined: Tue Aug 20, 2013 12:08 pm

How to change the name of the platform reported to IPSetup

Post by matrixtech »

Hello,

Forgive me if this has already been answered elsewhere. I searched the forums and any docs I could find but can't seem to find this answered anywhere. I have the Developer Kits for the PK70 and the CB34 and would like to have the NBs loaded with my application not report themselves as what they actually are. I would like to have them report as the model numbers I've given them. I did a brute-force Find and Replace of the CB34 with my model number and even though I get a 'platform mismatch' when deploying from both IPSetup and Eclipse, I can push the code successfully with MTTTY. The question is really just about changing how it identifies itself for updating the firmware. I plan to buy the boxes without label and sell them with my code as a product. Also, I'd like to be a LOT less destructive to the include libraries than Find and Replace.

Thanks in advance.

-Joe
User avatar
Forrest
Posts: 289
Joined: Wed Apr 23, 2008 10:05 am

Re: How to change the name of the platform reported to IPSet

Post by Forrest »

You can do this without doing a massive search and replace. :)


In your main.cpp, add a global:

Code: Select all

extern char * PlatformName;

then, in UserMain, before any other function is called:

Code: Select all

PlatformName = "FOOBAR";

Then, IPSetup will identify the module as a FOOBAR.


Now, you will run in to a problem though, as you have found, autoupdate will not load code that is the wrong platform. So if you had a MOD5270 application running, only a MOD5270 application can overwrite it. The above change still is building MOD5270 code underneath it all. To fix this, right click on your project and select properties. Under C/C++ Build->Settings select "NetBurner Compcode". In the text box "Expert Settings, Command Line Pattern", append the line with -PFOOBAR. Rebuild the application, and the new APP_S19 file should now be for a FOOBAR device. You can verify this by opening Release/(PROJ_NAME)_APP.s19. The first line should be "S0FOOBAR"

After you make that change, you can update a FOOBAR device with new code through autoupdate.

If you don't want to use MTTTY at all, make the change to main.cpp first, build and load the code. Then, make the change to the compcode command line second, then build and load the code. Or, using MTTTTY, you can make both changes, and load the code via serial the first time, and then autoupdate will work after that.
Forrest Stanley
Project Engineer
NetBurner, Inc

NetBurner Learn Articles: http://www.netburner.com/learn
matrixtech
Posts: 2
Joined: Tue Aug 20, 2013 12:08 pm

Re: How to change the name of the platform reported to IPSet

Post by matrixtech »

Thank you Forrest. That certainly is easier. I will try it.

I really appreciate the rapid response. I continue to be impressed with NetBurner. I'm surprised I only found your products a few months ago. Flawless!

We have tried products from B&B and Advantech. The result is that only NetBurner was simple and added the least overhead. The fact that we can re-brand and customize the code is a killer combo for us!

-Joe
Post Reply