Reply by Kenneth Crudup December 17, 20072007-12-17
On Thu, 13 Dec 2007, Edwin Olson wrote:

> http://www.blisstonia.com/eolson/lpc_prog20071213.tgz

Thanks. I don't have any near-term applications, but the idea itself is
pretty nice (and now, it's out there in case others would like to use
yours).

-Kenny

--
Kenneth R. Crudup Sr. SW Engineer, Scott County Consulting, Los Angeles
O: 3630 S. Sepulveda Blvd. #138, L.A., CA 90034-6809 (888) 454-8181

An Engineer's Guide to the LPC2100 Series

Reply by karelvergauwe December 15, 20072007-12-15
I have sampled the DS2502P-E48+ from Maxim IC. This will be the best
solution. I only have about 50 prints/year. The IC is only 1.30$, so
this is the cheapest is most simple to implement solution.

Thanks all
Reply by Mike Harrison December 14, 20072007-12-14
On Thu, 13 Dec 2007 16:12:50 -0000, you wrote:

>My project is not one time, it's for production. So taking the mac of
>an existing PCI card won't work for me.
>
>Taking the first MAC address that comes in won't work neither, because
>I have to set my MAC address before I can init my TCP stack (wich is
>TCPNet from Keil)
>
>Is there not an unique number in the cpu of lpc? Can I perhaps just
>make a pointer, and not initialize it, then just take the value of it.
>Would this data be random or will it be '0' if I don't use this space
>yet.

It would likely always initialise to the same value.

>Are there no other really random making functions in C???

It's a hardware problem, not a language one.

If it's for production, shouldn't you really be buying a proper allocation of addresses ?
Reply by Dario Greggio December 14, 20072007-12-14
karelvergauwe wrote:

> the same numbers (in the same sequence). Then I found I should seed
> them with the srand(seed) function. But this isn't any better because I
> don't have a unique seed number. Normally the current time is used as
> seed number. But When I start I don't have any time...

sometimes a negative number works for this...
Or a timer.

--
Ciao, Dario
Reply by "Levine, Adam" December 14, 20072007-12-14
Dallas Maxim makes an IC DS2502 that supplies a GUID 48 bit address and is used as a MAC on the the DS80C400 micro-controller.
It adds cost but takes the burden of obtaining IEEE addresses and managing them out of your hands.
-----Original Message-----
From: l... on behalf of Edwin Olson
Sent: Thu 12/13/2007 3:56 PM
To: l...
Subject: Re: [lpc2000] Generate a unique (local) MAC address

> Huh. I like this idea. May I stea^H^H^H^Huse it?
>
http://www.blisstonia.com/eolson/lpc_prog20071213.tgz

Run with --help for info; you want the --write-id options. The
--write-id-signature is used to write a magic value; this serves two
functions. First, allows you to double check at run-time that a unique
value HAS been written. Second, the program will not write a new MAC
over an old one if the signature is there-- that way, your MAC doesn't
change every time you reflash.

Note, it sounds like the device ids might have changed with the new MCU
revs-- you might need to update the database (devices.c) (send me a diff
if you do, please.)

There is a block of MAC addresses that are locally administered and do
not require paying a fee. Very handy for pre-production. However, an
actual product should come with a globally unique MAC.

-Ed

____________________________________________________________
This e-mail (including attached documents) may contain confidential or proprietary
information intended only for use by the named recipient(s). Use by persons
other than the named recipient(s), further dissemination, or copying of this
email is prohibited unless authorized by the sender.
Reply by Edwin Olson December 13, 20072007-12-13
> Huh. I like this idea. May I stea^H^H^H^Huse it?
>
http://www.blisstonia.com/eolson/lpc_prog20071213.tgz

Run with --help for info; you want the --write-id options. The
--write-id-signature is used to write a magic value; this serves two
functions. First, allows you to double check at run-time that a unique
value HAS been written. Second, the program will not write a new MAC
over an old one if the signature is there-- that way, your MAC doesn't
change every time you reflash.

Note, it sounds like the device ids might have changed with the new MCU
revs-- you might need to update the database (devices.c) (send me a diff
if you do, please.)

There is a block of MAC addresses that are locally administered and do
not require paying a fee. Very handy for pre-production. However, an
actual product should come with a globally unique MAC.

-Ed
Reply by Anton Erasmus December 13, 20072007-12-13
On 13 Dec 2007 at 16:12, karelvergauwe wrote:
> My project is not one time, it's for production. So taking the mac of
> an existing PCI card won't work for me.
>
> Taking the first MAC address that comes in won't work neither, because
> I have to set my MAC address before I can init my TCP stack (wich is
> TCPNet from Keil)
>
> Is there not an unique number in the cpu of lpc? Can I perhaps just
> make a pointer, and not initialize it, then just take the value of it.
> Would this data be random or will it be '0' if I don't use this space
> yet.
>
> Are there no other really random making functions in C???

If you are producing lowish quantities, then it might be worth using a 1-wire
chip from Maxim that contains a unique address in each chip. They have one specifically
programmed to provide a legal and unique MAC address.

Regards
Anton Erasmus
--
A J Erasmus
Reply by Kenneth Crudup December 13, 20072007-12-13
On Thu, 13 Dec 2007, Edwin Olson wrote:

> I modified my flash-writing application to write a few random bytes to
> the end of flash. I can then read these at run time. This approach is
> nice because the same device will always boot up with the same MAC
> address, so DHCP and other things will work properly.

Huh. I like this idea. May I stea^H^H^H^Huse it?

-Kenny

--
Kenneth R. Crudup Sr. SW Engineer, Scott County Consulting, Los Angeles
O: 3630 S. Sepulveda Blvd. #138, L.A., CA 90034-6809 (888) 454-8181
Reply by rtstofer December 13, 20072007-12-13
--- In l..., "karelvergauwe" wrote:
>
> My project is not one time, it's for production. So taking the mac of
> an existing PCI card won't work for me.
>
> Taking the first MAC address that comes in won't work neither, because
> I have to set my MAC address before I can init my TCP stack (wich is
> TCPNet from Keil)
>
> Is there not an unique number in the cpu of lpc? Can I perhaps just
> make a pointer, and not initialize it, then just take the value of it.
> Would this data be random or will it be '0' if I don't use this space
> yet.
>
> Are there no other really random making functions in C???
>
> thx
>

The entire ethernet protocol is based on UNIQUE MAC addresses. They
absolutely need to be unique on the LAN.

Any random number you pick is just as likely to be a duplicate MAC
address as any other. Once that duplicate MAC gets to a router there
is no way to sort the traffic.

Since you are developing a commercial product, why not just buy a
block of MAC addresses:

http://www.denx.de/wiki/DULG/WhereCanIGetAValidMACAddress

Richard
Reply by "sub...@aeolusdevelopment.com" December 13, 20072007-12-13
karelvergauwe Wrote
>My project is not one time, it's for production. So taking the mac of
>an existing PCI card won't work for me.

To reinforce the other replies. If it's for production the ONLY legitimate
way is to buy a set of valid MAC addresses. Globally unique MACs are how
ethernet products are guaranteed not to interfere with each other.

It's part of the cost of doing business.

Robert

--------------------------------
myhosting.com - Premium Microsoft Windows and Linux web and application
hosting - http://link.myhosting.com/myhosting