How do you get the MAC number from the wireless module

Discussion to talk about software related topics only.
Post Reply
seulater
Posts: 445
Joined: Fri Apr 25, 2008 5:26 am

How do you get the MAC number from the wireless module

Post by seulater »

How does one get the mac number from the wireless module ?
seulater
Posts: 445
Joined: Fri Apr 25, 2008 5:26 am

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

Post 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.
rnixon
Posts: 833
Joined: Thu Apr 24, 2008 3:59 pm

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

Post 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.
seulater
Posts: 445
Joined: Fri Apr 25, 2008 5:26 am

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

Post by seulater »

Thank you, i dont have the wifi module to try. I will have to wait for them to release the new one.
Post Reply