Deploying to Multiple .netmf devicess

A thought just occurred to me. My system will now have 2 cerb devices in it with 2 different applications, which need to be deployed at the same time when I hit Run.

How do I specify which device get’s which firmware when both devices have the same name in Visual Studio? Further what do I do if there are 3 or 4 or more?

You can change thre name. Look for friendly name in mfdeploy.

And that changes per device?

Well that works. Set the name and restart the device. Clearly .netmf is the best technology.

You also can provide the name when you update the firmware.
Edit box is at the bottom of the update window.

So I can also put a GUID. What is the max length of the name?

Tell us after you tried it :whistle:

It seems to only take 30 chars, so that’s a no on the GUID :frowning:

Last part. Is there a way to lock the project to a particular device name? If for some reason that device isn’t connected it won’t just look for any device to update?

Right a GUID takes 32 HEX characters.
But if you use a different coding, using more than 16 different characters it would work.

Nah it needs to be Alpha Numeric, something that a person could call out over the phone or something.

Yes, and the alphabet + digits has 36 different characters.
I once implemented an pdf exporter.
there was no binary data in the file.
Bitmaps and fonts where ASCII encoded.
It used an encoding which packed as many bits into each character as possible.
Can’t remember how it was called.
May be it was Base64:

Would require 22 characters then

maybe this can help you get started:

var object myUniqueId = null;
  // create a en empty byte array
             var myMac = new byte[16];
             //generate a random based on a fixed seed this will guarantee that we get the 
             //same Random number everytime based on the provided string... make your string UNIQUE...
             //This would be great if only each board had a UNIQUE SERIAL NUmber ahhhhhh...          
             var r = myUniqueId != null ? new Random(myUniqueId.GetHashCode()) : new Random();
             // fill the newly generated bytes into the variable
             r.NextBytes(myMac); //this will give us a unique ID that will fit our byte size :)

the above snipped was taken from my code share here:


1 Like

Actually the microcontrollers can store a unique serial number. If I recall correctly they have a pair of fusible PROMs that is 32 bits long?