Mac address as sting
erwinm
Junior Member
Is it possible to get the macaddress of the ni-frame in a variable or constant so i can use it in a program?
Comments
-
You can send 'get IP' in a telnet session with the device and parse it out of the response
-
There is already a built in structure for this. I'm not at my computer right now but I think it's _IPAdress or _IP_ADRESS or something. You just need to declare the variable in DEFINE_VARIABLE and it will give you this kind of stuff. You might have to look this up until I or someone gts the real code.
-
I think this is what Eric is talking about and it works with GET_IP_ADDRESS:
The function requires an IP_ADDRESS_STRUCT. The IP_ADDRESS_STRUCT is predefined as follows: STRUCTURE IP_ADDRESS_STRUCT { CHAR Flags // Configuration flags CHAR HostName[128] // Host name CHAR IPAddress[15] // IP address unit CHAR SubnetMask[15] // subnet mask CHAR Gateway[15] // IP address of gateway }But as you look at the structure there's nothing for the MAC. I'm pretty sure there's no built in system's function that allows you to get the mac, GET_UNIQUE_ID returns the neuron ID. AFAIK the only way is to telnet into the master through code if that's what you mean by an NI frame and call GET IP, that will return the mac.
If you're not sure how to telnet into a master via code I posted a module in ModPedia some time ago called PING_URL/GET_IP or something to that affect that establishes a telnet session to ping so instead of pinging you could call GET_IP.
If your NI isn't a current firmware master telnet in through a PC and see if actually has the that function before wasting time. I just telnetted into an old NXC-ME in a card frame with old firmware and it has the function so you're probably good to go. -
If you have defined the main RMSE module in your program (i.e. RmsNetLinxAdapter_dr4_0_0) you can do it with a ?CLIENT.MAC command to vdvRMS
Command To [41001:1:1]-[?CLIENT.MAC]
Command From [41001:1:1]-[CLIENT.MAC-00:60:9F:aa:bb:cc]
Leave a Comment
Categories
- All Categories
- 2.5K AMX General Discussion
- 922 AMX Technical Discussion
- 514 AMX Hardware
- 502 AMX Control Products
- 3 AMX Video Distribution Products
- 9 AMX Networked AV (SVSI) Products
- AMX Workspace & Collaboration Products
- 3.4K AMX Software
- 151 AMX Resource Management Suite Software
- 386 AMX Design Tools
- 2.4K NetLinx Studio
- 135 Duet/Cafe Duet
- 248 NetLinx Modules & Duet Modules
- 57 AMX RPM Forum
- 228 MODPEDIA - The Public Repository of Modules for Everyone
- 943 AMX Specialty Forums
- 2.6K AMXForums Archive
- 2.6K AMXForums Archive Threads
- 1.5K AMX Hardware
- 432 AMX Applications and Solutions
- 249 Residential Forum
- 182 Tips and Tricks
- 146 AMX Website/Forums
