MAC Address = 00 00 00 00 00 ???? 
Author Message
 MAC Address = 00 00 00 00 00 ????

Hi,

I launch the GetMacAddress function to retrieve the MAC address.

IF the LAN cable is NOT connected,  it returns "00 00 00 00 00".

IF I plug the LAN cable, it returns the correct value...

WHY ?
My pc is Win2000Pro based.
The LAN adapter is SiS 900. It's a notebook.

any suggestion ?
thanks

Franco



Tue, 12 Apr 2005 17:30:03 GMT  
 MAC Address = 00 00 00 00 00 ????
Why should it?  I have two nic cards in my machine .. if I disable one, I
can't retrieve the mac address of that card.  In order to use Netbios to
obtain the mac address via a call to Netbios(), or the IP mac address via
SendArp(), the protocols have to be bound and active on the controller.
Under working circumstances, the network driver interface initializes the
card, at which point the mac address (either the burned-in address or the
override locally administered address) is available.  When the cable is
removed, or the card is disabled, the protocols are unbound.  Not even a
command-line arp or nbtstat under these circumstances will list the mac
address of the machine when the network connection is disabled, non-active
or not connected.

--

Randy Birch
MVP Visual Basic
http://www.mvps.org/vbnet/
Please respond only to the newsgroups so all can benefit.


| Hi,
|
| I launch the GetMacAddress function to retrieve the MAC address.
|
| IF the LAN cable is NOT connected,  it returns "00 00 00 00 00".
|
| IF I plug the LAN cable, it returns the correct value...
|
| WHY ?
| My pc is Win2000Pro based.
| The LAN adapter is SiS 900. It's a notebook.
|
| any suggestion ?
| thanks
|
| Franco
|
|



Wed, 13 Apr 2005 05:52:10 GMT  
 MAC Address = 00 00 00 00 00 ????
REEERRRRRRRRRR! SNARL HISSSS HISSSSSS!!!!!!!!!!!!!!!!!!!!

Seriously though folks, Randy is one of the smartest people I've known over
the course of the past 6 years working for Microsoft....next to me...<G!>

Please, please, use some common sense. It isn't that we don't mind answering
all the questions, its just that some only take a bit of natural programming
common sense to figure out.

This MAC address is typical of what is meant. If you turn off your light in
your house and the bulb stops glowing, do you call the electric company and
ask them why? No, of course not.  You know why because the electricity
stopped flowing to the bulb and it could no longer do its job...which is to
brighten up your life.

So when you unplug the connection, the juice no longer flows between it and
the outside world, an interrupt is going to be called by the BIOS in the
hardware and the MAC account wil be zeroed out. Its just that simple.

We're here to brighten up your programming experience, and shed some
positive light on troubling, complex issues.  So give us your best shot.
Maybe we can put a glow back into your programming experience in the
process.

Thank You, Randy Birch!

P.S. I no longer work for Microosft. I work for you all.


Quote:
> Why should it?  I have two nic cards in my machine .. if I disable one, I
> can't retrieve the mac address of that card.  In order to use Netbios to
> obtain the mac address via a call to Netbios(), or the IP mac address via
> SendArp(), the protocols have to be bound and active on the controller.
> Under working circumstances, the network driver interface initializes the
> card, at which point the mac address (either the burned-in address or the
> override locally administered address) is available.  When the cable is
> removed, or the card is disabled, the protocols are unbound.  Not even a
> command-line arp or nbtstat under these circumstances will list the mac
> address of the machine when the network connection is disabled, non-active
> or not connected.

> --

> Randy Birch
> MVP Visual Basic
> http://www.mvps.org/vbnet/
> Please respond only to the newsgroups so all can benefit.



> | Hi,
> |
> | I launch the GetMacAddress function to retrieve the MAC address.
> |
> | IF the LAN cable is NOT connected,  it returns "00 00 00 00 00".
> |
> | IF I plug the LAN cable, it returns the correct value...
> |
> | WHY ?
> | My pc is Win2000Pro based.
> | The LAN adapter is SiS 900. It's a notebook.
> |
> | any suggestion ?
> | thanks
> |
> | Franco
> |
> |



Fri, 15 Apr 2005 04:51:24 GMT  
 MAC Address = 00 00 00 00 00 ????
I recently installed a system where the PC and software were provided as
a unit from the manufacturer, including an onboard 100BaseT adapter.
The SW is licensed to the MAC address of that adapter.

Because this was to be used in a Gig-E environment (TCP/IP only), we
added a new NIC and moved the cable over to it.  Of course the software
refused to run, for the reason you describe.

Rather than waste a network connection just for this, I unbound TCP from
the on-board NIC and installed NetBEUI for that adapter only, with no
cable connected.  Works fine, software is happy.  After all, the adapter
does have a permanent MAC address... you just have to coax it into
exposing it. :-)

--

    Jim Mack
    MicroDexterity Inc
    www.microdexterity.com

Quote:
"Randy Birch" wrote...
> Why should it?  I have two nic cards in my machine .. if I disable
one, I
> can't retrieve the mac address of that card.  In order to use Netbios
to
> obtain the mac address via a call to Netbios(), or the IP mac address
via
> SendArp(), the protocols have to be bound and active on the
controller.
> Under working circumstances, the network driver interface initializes
the
> card, at which point the mac address (either the burned-in address or
the
> override locally administered address) is available.  When the cable
is
> removed, or the card is disabled, the protocols are unbound.  Not even
a
> command-line arp or nbtstat under these circumstances will list the
mac
> address of the machine when the network connection is disabled,
non-active
> or not connected.

> --

> Randy Birch
> MVP Visual Basic
> http://www.mvps.org/vbnet/
> Please respond only to the newsgroups so all can benefit.



> | Hi,
> |
> | I launch the GetMacAddress function to retrieve the MAC address.
> |
> | IF the LAN cable is NOT connected,  it returns "00 00 00 00 00".
> |
> | IF I plug the LAN cable, it returns the correct value...
> |
> | WHY ?
> | My pc is Win2000Pro based.
> | The LAN adapter is SiS 900. It's a notebook.
> |
> | any suggestion ?
> | thanks
> |
> | Franco
> |
> |



Fri, 15 Apr 2005 07:24:54 GMT  
 MAC Address = 00 00 00 00 00 ????

Richard ...

I tried wmi on my system with the second card disabled as mentioned earlier, and using the code:

Private Sub Command1_Click()

   Dim NetAdapter As SWbemObjectSet
   Dim na As SWbemObject

   Set NetAdapter = GetObject("winmgmts:").InstancesOf("Win32_NetworkAdapter")

   For Each na In NetAdapter  
      Debug.Print "AdapterType: " & na.AdapterType
      Debug.Print "Description: " & na.Description    
      Debug.Print "Device ID: " & na.DeviceID            
      Debug.Print "MAC Address: " & na.MACAddress
      Debug.Print "Manufacturer: " & na.Manufacturer
      Debug.Print ""
   Next

End Sub

... the dump was:

AdapterType: Ethernet 802.3
Description: 3Com 3C920 Integrated Fast Ethernet Controller (3C905C-TX Compatible)
Device ID: 1
MAC Address: 00:B0:D0:7B:83:72
Manufacturer: 3Com

AdapterType:
Description: NETGEAR FA310TX Fast Ethernet Adapter (NGRPCI)
Device ID: 2
MAC Address:
Manufacturer: Netgear

AdapterType:
Description: Microsoft TV/Video Connection
Device ID: 3
MAC Address:
Manufacturer:

AdapterType:
Description: RAS Async Adapter
Device ID: 4
MAC Address:
Manufacturer:

AdapterType:
Description: Packet Scheduler Miniport
Device ID: 5
MAC Address:
Manufacturer: Microsoft

AdapterType: Ethernet 802.3
Description: Packet Scheduler Miniport
Device ID: 6
MAC Address: 00:B0:D0:7B:83:72
Manufacturer: Microsoft

AdapterType:
Description: WAN Miniport (L2TP)
Device ID: 7
MAC Address:
Manufacturer: Microsoft

AdapterType: Wide Area Network (WAN)
Description: WAN Miniport (PPTP)
Device ID: 8
MAC Address: 50:50:54:50:30:30
Manufacturer: Microsoft

AdapterType: Wide Area Network (WAN)
Description: WAN Miniport (PPPOE)
Device ID: 9
MAC Address: 33:50:6F:45:30:30
Manufacturer: Microsoft

AdapterType:
Description: Direct Parallel
Device ID: 10
MAC Address:
Manufacturer: Microsoft

AdapterType:
Description: WAN Miniport (IP)
Device ID: 11
MAC Address:
Manufacturer: Microsoft

AdapterType: Ethernet 802.3
Description: Packet Scheduler Miniport
Device ID: 12
MAC Address: 3C:BF:20:52:41:53
Manufacturer: Microsoft

These are all normal against the protocols bound to the card and against other protocols installed elsewhere in the system, but as you see the data for the second card (which shows up when enabled as:

AdapterType: Ethernet 802.3
Description: NETGEAR FA310TX Fast Ethernet Adapter (NGRPCI)
Device ID: 2
MAC Address: 00:A0:CC:D3:2F:71
Manufacturer: Netgear

) ... is missing from the first dump.

Furthermore, if I use the GetObjectText_ member with both cards enabled, the result is:

instance of Win32_NetworkAdapter
{
   AdapterType = "Ethernet 802.3";
   AdapterTypeId = 0;
   Availability = 3;
   Caption = "[00000001] 3Com 3C920 Integrated Fast Ethernet Controller (3C905C-TX Compatible)";
   ConfigManagerErrorCode = 0;
   ConfigManagerUserConfig = FALSE;
   CreationClassName = "Win32_NetworkAdapter";
   Description = "3Com 3C920 Integrated Fast Ethernet Controller (3C905C-TX Compatible)";
   DeviceID = "1";
   Index = 1;
   Installed = TRUE;
   MACAddress = "00:B0:D0:7B:83:72";
   Manufacturer = "3Com";
   MaxNumberControlled = 0;
   Name = "3Com 3C920 Integrated Fast Ethernet Controller (3C905C-TX Compatible)";

   NetConnectionStatus = 2;
   PNPDeviceID = "PCI\\VEN_10B7&DEV_9200&SUBSYS_00961028&REV_78\\4&24AB0D93&0&20F0";
   PowerManagementSupported = FALSE;
   ProductName = "3Com 3C920 Integrated Fast Ethernet Controller (3C905C-TX Compatible)";
   ServiceName = "EL90XBC";
   SystemCreationClassName = "Win32_ComputerSystem";
   SystemName = "VBNETDEV";
   TimeOfLastReset = "20021027073016.372875-300";

Quote:
};

instance of Win32_NetworkAdapter
{
   AdapterType = "Ethernet 802.3";
   AdapterTypeId = 0;
   Availability = 3;
   Caption = "[00000002] NETGEAR FA310TX Fast Ethernet Adapter (NGRPCI)";
   ConfigManagerErrorCode = 0;
   ConfigManagerUserConfig = FALSE;
   CreationClassName = "Win32_NetworkAdapter";
   Description = "NETGEAR FA310TX Fast Ethernet Adapter (NGRPCI)";
   DeviceID = "2";
   Index = 2;
   Installed = TRUE;
   MACAddress = "00:A0:CC:D3:2F:71";
   Manufacturer = "Netgear";
   MaxNumberControlled = 0;
   Name = "NETGEAR FA310TX Fast Ethernet Adapter (NGRPCI)";

   NetConnectionStatus = 2;
   PNPDeviceID = "PCI\\VEN_11AD&DEV_0002&SUBSYS_F0041385&REV_20\\5&C2FC231&0&2870F0";
   PowerManagementSupported = FALSE;
   ProductName = "NETGEAR FA310TX Fast Ethernet Adapter (NGRPCI)";
   ServiceName = "ngrpci";
   SystemCreationClassName = "Win32_ComputerSystem";
   SystemName = "VBNETDEV";
   TimeOfLastReset = "20021027073016.372875-300";

Quote:
};

When the second card is disabled, its card's general info is returned, but missing some members, including the mac address:

instance of Win32_NetworkAdapter
{
   Availability = 3;
   Caption = "[00000002] NETGEAR FA310TX Fast Ethernet Adapter (NGRPCI)";
   ConfigManagerErrorCode = 22;
   ConfigManagerUserConfig = FALSE;
   CreationClassName = "Win32_NetworkAdapter";
   Description = "NETGEAR FA310TX Fast Ethernet Adapter (NGRPCI)";
   DeviceID = "2";
   Index = 2;
   Installed = TRUE;
   Manufacturer = "Netgear";
   MaxNumberControlled = 0;
   Name = "NETGEAR FA310TX Fast Ethernet Adapter (NGRPCI)";

   NetConnectionStatus = 0;
   PNPDeviceID = "PCI\\VEN_11AD&DEV_0002&SUBSYS_F0041385&REV_20\\5&C2FC231&0&2870F0";
   PowerManagementSupported = FALSE;
   ProductName = "NETGEAR FA310TX Fast Ethernet Adapter (NGRPCI)";
   ServiceName = "ngrpci";
   SystemCreationClassName = "Win32_ComputerSystem";
   SystemName = "VBNETDEV";
   TimeOfLastReset = "20021027073016.372125-300";

Quote:
};

--

Randy Birch
MVP Visual Basic
http://www.mvps.org/vbnet/
Please respond only to the newsgroups so all can benefit.


| As a matter of fact, I think you can get this through WMI.



Fri, 15 Apr 2005 10:44:08 GMT  
 MAC Address = 00 00 00 00 00 ????
<blush>

--

Randy

Please respond only to the newsgroups so all can benefit.



| REEERRRRRRRRRR! SNARL HISSSS HISSSSSS!!!!!!!!!!!!!!!!!!!!
|
| Seriously though folks, Randy is one of the smartest people I've known
over
| the course of the past 6 years working for Microsoft....next to me...<G!>



Fri, 15 Apr 2005 10:44:58 GMT  
 MAC Address = 00 00 00 00 00 ????
As a matter of fact, I think you can get this through WMI.

Dim Services as Object
Dim obj as Object
Set Services = GetObject("winmgmts:").InstancesOf("WIN32_NetworkAdapter")

For Each obj in Services

    Debbug.Print obj.GetObjectText_

Next

But most software won't expose it this way.  So, when the connection goes
away, so does the information in the registry.

Thanks Jim!


Quote:
> I recently installed a system where the PC and software were provided as
> a unit from the manufacturer, including an onboard 100BaseT adapter.
> The SW is licensed to the MAC address of that adapter.

> Because this was to be used in a Gig-E environment (TCP/IP only), we
> added a new NIC and moved the cable over to it.  Of course the software
> refused to run, for the reason you describe.

> Rather than waste a network connection just for this, I unbound TCP from
> the on-board NIC and installed NetBEUI for that adapter only, with no
> cable connected.  Works fine, software is happy.  After all, the adapter
> does have a permanent MAC address... you just have to coax it into
> exposing it. :-)

> --

>     Jim Mack
>     MicroDexterity Inc
>     www.microdexterity.com

> "Randy Birch" wrote...
> > Why should it?  I have two nic cards in my machine .. if I disable
> one, I
> > can't retrieve the mac address of that card.  In order to use Netbios
> to
> > obtain the mac address via a call to Netbios(), or the IP mac address
> via
> > SendArp(), the protocols have to be bound and active on the
> controller.
> > Under working circumstances, the network driver interface initializes
> the
> > card, at which point the mac address (either the burned-in address or
> the
> > override locally administered address) is available.  When the cable
> is
> > removed, or the card is disabled, the protocols are unbound.  Not even
> a
> > command-line arp or nbtstat under these circumstances will list the
> mac
> > address of the machine when the network connection is disabled,
> non-active
> > or not connected.

> > --

> > Randy Birch
> > MVP Visual Basic
> > http://www.mvps.org/vbnet/
> > Please respond only to the newsgroups so all can benefit.



> > | Hi,
> > |
> > | I launch the GetMacAddress function to retrieve the MAC address.
> > |
> > | IF the LAN cable is NOT connected,  it returns "00 00 00 00 00".
> > |
> > | IF I plug the LAN cable, it returns the correct value...
> > |
> > | WHY ?
> > | My pc is Win2000Pro based.
> > | The LAN adapter is SiS 900. It's a notebook.
> > |
> > | any suggestion ?
> > | thanks
> > |
> > | Franco
> > |
> > |



Fri, 15 Apr 2005 09:25:21 GMT  
 MAC Address = 00 00 00 00 00 ????
Thanks Jim,

It works fine.
My problem was this: I've a SW licensed to the MAC address.
I was not able to install it on  stand-alone PCs (cable not plugged)
I've installed the NetBeui Protocol. Now, the MAC address is
readed with or without the LAN cable.

Thanks
Franco


Quote:
> I recently installed a system where the PC and software were provided as
> a unit from the manufacturer, including an onboard 100BaseT adapter.
> The SW is licensed to the MAC address of that adapter.

> Because this was to be used in a Gig-E environment (TCP/IP only), we
> added a new NIC and moved the cable over to it.  Of course the software
> refused to run, for the reason you describe.

> Rather than waste a network connection just for this, I unbound TCP from
> the on-board NIC and installed NetBEUI for that adapter only, with no
> cable connected.  Works fine, software is happy.  After all, the adapter
> does have a permanent MAC address... you just have to coax it into
> exposing it. :-)

> --

>     Jim Mack
>     MicroDexterity Inc
>     www.microdexterity.com

> "Randy Birch" wrote...
> > Why should it?  I have two nic cards in my machine .. if I disable
> one, I
> > can't retrieve the mac address of that card.  In order to use Netbios
> to
> > obtain the mac address via a call to Netbios(), or the IP mac address
> via
> > SendArp(), the protocols have to be bound and active on the
> controller.
> > Under working circumstances, the network driver interface initializes
> the
> > card, at which point the mac address (either the burned-in address or
> the
> > override locally administered address) is available.  When the cable
> is
> > removed, or the card is disabled, the protocols are unbound.  Not even
> a
> > command-line arp or nbtstat under these circumstances will list the
> mac
> > address of the machine when the network connection is disabled,
> non-active
> > or not connected.

> > --

> > Randy Birch
> > MVP Visual Basic
> > http://www.mvps.org/vbnet/
> > Please respond only to the newsgroups so all can benefit.



> > | Hi,
> > |
> > | I launch the GetMacAddress function to retrieve the MAC address.
> > |
> > | IF the LAN cable is NOT connected,  it returns "00 00 00 00 00".
> > |
> > | IF I plug the LAN cable, it returns the correct value...
> > |
> > | WHY ?
> > | My pc is Win2000Pro based.
> > | The LAN adapter is SiS 900. It's a notebook.
> > |
> > | any suggestion ?
> > | thanks
> > |
> > | Franco
> > |
> > |



Fri, 15 Apr 2005 19:01:45 GMT  
 
 [ 8 post ] 

 Relevant Pages 

1. Returned MAC-Adress is only 00 00 00 00 00 ????

2. Date of 00/00/96

3. find convert input/ouput file QB2.00->VB3.00

4. #2:00:00 AM#

5. #2:00:00 AM# Format

6. Need comdlg32.dep ver 6.00.8169 and comctl32.dep ver 6.00.8022

7. Upgrading from comctl32 5.00.3714 to 5.00.3828

8. Problems after Upgrade 4.00.3711.08 to 4.00.5303.01

9. Windows CE .NET Online Chat - July 26th 12:00-13:00 PST (20:00 BST, 19:00 GMT)

10. ADO/SQL Server: datetime column appears to be "1901-1-1 00:00:00" after insertion

11. Replacement for Mac QB1.00

12. ANN: Windows CE .NET Online Chat - July 24th 12:00-13:00 PST (20:00 BST, 19:00 GMT)

 

 
Powered by phpBB® Forum Software