LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

check for mac address (physical address) of ethernet card

Hi!

We want to deliver LabVIEW code which will run only on licensed machines (node locked licensing).

We have a PXI chassis with one or more PCs connected to the same LAN as the chassis. We have locked our first license to the chassis by checking for the serial number of the DAQ card installed in the chassis. Now, we want to run a second license on ONLY ONE of the standard desktops connected to the chassis. We've removed the DAQ card check since there are no DAQ cards on the desktops. But a no check software can be freely copied and run on more than one desktops. How do we prevent this?

One idea is to check for the MAC address of the ethernet card at runtime. Question is how do I retrieve the MAC address at run time in my LV exe?

Is there another way to achieve a node locked licensing? Some people use HDD serial number .... ??

We are using LV 7.1 on Win2K.

Thanks.

- Gurdas
Gurdas Sandhu, Ph.D.
ORISE Research Fellow at US EPA
0 Kudos
Message 1 of 6
(5,202 Views)
Hello Gurdas,

I did something like that in the past using the mac address, unfortunately I have no code to share, because I was working in another company...
Look at the following link, it has a vi to get the mac address of any computer on you lcal subnet, just use 127.0.0.1 to get the one from your machine.

http://sine.ni.com/apps/we/niepd_web_display.DISPLAY_EPD4?p_guid=B45EACE3DEB956A4E034080020E74861&p_node=DZ53048&p_submitted=N&p_rank=&p_answer=&p_source=External

Hope it helps,
Paulo
Message 2 of 6
(5,188 Views)
Hello Paulo,

I tried the code at the link you've mentioned and it worked great!
Thanks.

I had seen this link before but was putoff by the sentence
"Unfortunately the "arp" command does not properly return the MAC address when fed the IP address of the computer that runs it ..."

Your suggestion to use 127.0.0.1 for local machine did the trick.

Can you describe why the above IP works for the local machine even when the local machine might have a different IP assigned to the ethernet card?

- Gurdas
Gurdas Sandhu, Ph.D.
ORISE Research Fellow at US EPA
0 Kudos
Message 3 of 6
(5,175 Views)
Hello Gurdas,

127.0.0.1 is a "special" IP address that is assigned to the local card in the PC.
If you go to the command prompt and do "ping 127.0.0.1" it will allways work and find your card.
This way people can test their internet cards without having to have a network installed.

Paulo
0 Kudos
Message 4 of 6
(5,169 Views)
I have Used MAC address for Licensing the Software.

To extract the MAC address is easy. You dont have to do IP Address or PING. On Windows there is a System Command called ipconfig. If you use ipconfig /all It gives you all the details of the IP Configuration.
One of the String is the MAC address.

Use the "Sytem Exec" Vi to run the ipconfig /all and then take the returned Output and Parse the string to get the Physical MAC address.

Attaching a Small Example VI

Good Luck

Mache!
Good Luck!

Mache
Message 5 of 6
(5,165 Views)

@Gurdas wrote:

Is there another way to achieve a node locked licensing? Some people use HDD serial number .... ?? Gurdas


About this questions, below I include a response I wrote to a similar subject. I hope it is useful.


@Enrique wrote:

If you still want to implement the copyright scheme yourself, this are some of my thoughts about that subject. I hope this can start a good topic of conversation:

If you want your program to run on a specific machine, you need to know about that machine so your software is somehow "made" exclusively for that machine. If you can make the software so it utilize resources very specific to the target computer, then you are ok. It is difficult to come up with the right analogy. Let say it is like somebody make a uniform specifically for you and take into consideration all your exact measurements like size, weight, etc. (we are assuming a little here, like those measurement won't change). It can be argued that there maybe somebody in the universe that is like you, but the chances can be sufficiently low so it is acceptable to you to take the risk. All this is usually very difficult and expensive.

A more common approach is to know information that can uniquely identify the computer and then create the application so it first ask the computer to identify itself. Upon correct identification, the application provide its services. An analogy is that I am the one who provide the services and I have your name and driver license number on file. If you request service, I ask you for those identifiers and once I verify your identity you are good to go.

A more secure approach will be that we share a secret like a password. I, as the application, ask you (the computer) to authenticate, that is, to provide identification and the password. An alternative is to have something that, although is not secret, it cannot be forged (at least, within certain probability). Let say I ask you for your signature. The bundle human presence + signature cannot be forged.

A way to implement the latest one may go like the following: each copy of your software has a unique identifier (SI) and a unique key (K) that enable the application. You ask the target computer for its unique identifiers (CUI). You generate a random string (R) for the secret and then create a function f such that: K = f(SI, CUI, R). To get the right key K that enable your software, all the other parameters must be the right ones.

If this is done right, the security of the application will depend on the secret (R), so you better generate and manage R right. Also, you want to make sure the function f() cannot be bypassed (i.e., direct insertion of K is not possible).

There are a lot of additional issues to deal here, but I'll stop for now. I need to run some errands....


Regards;
Enrique
www.vartortech.com
Message 6 of 6
(5,160 Views)