Reading the m1's Serial Number

chuckfa said:
I'm not sure how to send the request to the m1.
 
Well, I guess it depends at what level you are trying to write your program.  Not to split hairs, but with an ARP request, you really aren't sending the request to the M1 board itself, but rather out over the ethernet network to the XEP interface that is connected to the M1.
 
In Windows and Linux, there is a command line arp command that you can issue to get the mapping of IP addresses to MAC addresses.  This is probably the easiest way to do things, especially if you are writing a script.
 
If you are programming at a lower level, you can interface directly to the IP socket layer of software. But then you need to build your own arp packets and process the response.   Here's an example of how you might to this.
 
In Windows, there is a SendARP function that does most of the work for you.
 
wuench said:
That is assuming the client and the Elk are on the same network segment.  It won't work behind a router.  I don't see anything in the ASCII protocol that would uniquely identify an Elk system.
 
Yes, you're absolutely right.  It wasn't clear from the OP's original question whether he would be on the same network or not.  I was assuming he would be. That may have been a bad assumption on my part.
 
I would have assumed that's it's not on the same LAN based on this statement: "I'd like to have the software I wrote be specific for each m1 to avoid pirating."
 
I mean, what pirating would occur if the software and M1G were on the same LAN?
 
And make sure the way the software handles this is absolutely failure resistant.  The last thing you want to do is antagonize legitimate customers by having the software get it wrong.  That and a customer mistreated ends up costing you a LOT more (through word of mouth) than whatever profits you often think you might have gained.  That and, time again, folks willing to steal the software aren't ever likely to be customers anyway.  So you're not losing any 'sales' because they're never have been bought anyway.
 
I've written my share of code over the years and been on both sides of the argument.  Treating customers like criminals never works.  Pricing things right, from the start, and managing support costs are where to best find success.
 
Back
Top