Page 1 of 1

How do you get the MAC number from the wireless module

Posted: Sun Aug 07, 2011 1:08 pm
by seulater
How does one get the mac number from the wireless module ?

Re: How do you get the MAC number from the wireless module

Posted: Tue Aug 09, 2011 3:22 pm
by seulater
I guess i phrased the question wrong. I meant how do i get the MAC number in code from Netburners Wi-Fi module.

Re: How do you get the MAC number from the wireless module

Posted: Tue Aug 09, 2011 4:29 pm
by rnixon
Haven't tried this, but you would write a simple test. The wifi is another network interface. There is a structure for interfaces in \nburn\include\netinterface.h:

typedef struct _InterfaceBlock
{
MACADR theMac;
IPADDR netIP;
IPADDR netIpMask;
IPADDR netIpGate;
IPADDR netDNS;
TransmitPacketFunc* send_func;
KillInterfaceFunc* kill_if;
EnableMulticastFunc* enab_multicast;
const char* InterfaceName;
int config_num;
BOOL bMultiHome;
int root_if;
LinkActiveFunc* linkActiveFuncPtr;
WORD netMss;

} InterfaceBlock;


There are some functions in there as well (0 is probably Ethernet):

InterfaceBlock *GetInterFaceBlock( int interface = 0 );


MACADR InterfaceMAC( int interface );
IPADDR InterfaceIP( int interface );
IPADDR InterfaceDNS( int interface );
IPADDR InterfaceMASK( int interface );
IPADDR InterfaceGate( int interface );

Disclaimer: I don't know if this will work or not, I have not tried it.

Try it for interface 0 and see if you get the Ethernet mac. If so, try it again for 1 and see if its wifi.

Re: How do you get the MAC number from the wireless module

Posted: Tue Aug 09, 2011 4:32 pm
by seulater
Thank you, i dont have the wifi module to try. I will have to wait for them to release the new one.