Hi Josh, On 6/26/06, Josh Koffman wrote: > > Hi all. So I've been thinking about all sorts of little embedded > Ethernet projects I want to do (someday when I am a better > programmer), and one thing keeps jumping out at me: adressing. Sure, > it's easy to configure a computer to access a network becuase it has a > screen and a keyboard. The devices I want to build are to be tiny and > won't have the space for all sorts of switches and an LCD (or the cost > come to think of it). So how to recognize these devices across the > network? > > Here are a few ideas I've had: > > 1. Hardcode everything. Not such a great option IMO, especially if the > units are travelling between networks. > > 2. Have some sort of discovery program that runs as a PC application > and allows you to configure the devices. Not a bad idea, but I can't > program for PCs. Guess I'd have to find a partner. Also how to > identify the individual units if they are geographically spread out? I > guess manually writing down the MAC addresses would work but seems > cumbersome. Can't "flash the LEDs" if you can't see the remote > device... > > 3. Some sort of intelligent controller (ie PDA or custom built > solution) that connected up to each individual device and allowed > configuration. I like this idea, but I can't program for PDA. > > This isn't pressing, I don't think I will be working on these projects > any time soon, but man those Xports are tempting. So what would you > do? > > Josh For VSCP (http://www.vscp.org) we use two different methods when we work over TCP/IP. 1.) Only UDP datagrams where the frame act as an unreliable event. The deman on the application is rather high here as frames will be lost from time to time. OK for many situations. 2.) Each node connect to some central TCP/IP server. This can be done either by hardcoding the server IP address in the node or using the "High End Server Request" / "High End Server Response" events which are UDP datagram broadcast sent out to port 9598 (the VSCP reserved port) and to which available servers should respond. This will of course only work on a local segment as a router normally will not forward UDP datagram broadcasts. On IP networks DHCP can be used to give each node a unique ID in the form of an IP address. On the DHCP server you can match Ethernet MAC addresses and IP numbers if you want or just let the node pick an address in a range. For VSCP we use a 128 bit GUID that identifies each node. The MAC address or the IP address can be used to construct this GUID or it can be unique for a company/person (http://www.vscp.org/wiki/doku.php?id=vscp_assigned_guid_s) If you want to play I can recommend the Modtronix Ethernet boards ( http://www.modtronix.com). They are easy and fun to work with (not affiliated in any way other then as a satisfied customer). Cheers /Ake -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist