NetBIOS Name Service class

Also the Session Service may be used for this purpose??

I don’t think any of my PCs are running WINS, so I don’t believe that WINS is necessary.

WINS is Microsofts implementation of NetBIOS.
F.e.: the MsSuffix you see in the code came from the WINS implementation: How WINS Technology Works: Windows Internet Name Service (WINS) | Microsoft Learn

Maybe the answer is also on that page

Oh okay, I didn’t realise that. I’ll study the WINS spec tomorrow. It’s late so I have to get some sleep now :frowning:

Sleep? It’s 9 AM here ;D

Thanks again for helping me with this. It will be really neat to access FEZ devices in My Network Places. If I open this window and double-click a host in my HomeGroup it automatically opens a web browser and connects to the root directory of a web server on that host. This would be usefull for quickly accessing web servers running on these devices.

I’ve attached a screen shot of the WINS settings on my OfficePC computer. NetBIOS over TCP is enabled, but no WINS server addresses are setup, and don’t think my DHCP server returns an address for a WINS server. From reading Microsoft’s document, I believe that NetBIOS is a part of WINS, but that a small network with only one subnet does have or need a full WINS server.

I believe that my network consists of only B nodes, and therefore name to IP resolution is done in broadcast mode. I’m guessing that each Windows computer builds its list of My Network Places by broadcasting requests for name resolution from each uinque hostname, and that each host is supposed to respond with its IP address. I haven’t looked in detail at your code. Does your NetBIOS server respond to these broadcasts?

Idd, it listens to direct and broadcasted messages.

F.e. when you do a “ping testhost” your PC will broadcast a NetBIOS request with the name “testhost”, when you set a breakpoint in the code you will see that this name is matched agains all registered names. Of course, you will have to add some code to call the CompressName method if you want to get the readable name from the received uncompressed name.

Once in a while (each 1 or 2 minutes) your PC will broadcast the workgroup name with suffix 0x1E.

There might be something missing.

A full NetBIOS compliant device uses 3 ports:
137: NetBIOS Name Service (which I have implemented)
138: NetBIOS Datagram Service (not implemented)
139: NetBIOS Session Service (not implemented)

I think there should be some activity on TCP port 139 too before Windows will show the device. I will see if I can setup a listener socket and debug if there is anything that wants to connect to that port.

More info: NetBIOS - Wikipedia

Yes, I think it may be something like that.

It could be that FEZCOBRA is not listed in My Network Places because my PC has not been able to resolve its name to an IP address using the Datagram service??

When I use nbtstat -A [ip address of cobra] I get a response.
When I use nbtstat -a [name of cobra] I don’t get a response.

From reading Microsofts specs, it seems that it uses the Session Service (TCP port 139) to get information about what a host has to offer the network (e.g., shares, printers, etc). Maybe if a host doesn’t respond to this request, it doesn’t list the host in My Network Places??

I tried to find more details about what information is exchanged in a session, but have not found anything yet.

I was going to ask, what does putting a Fez into your network neighbourhood do for you? Without an active service to connect to, there’s no use is there?

@ Brett: idd, we should not open port 139 here, since then we should need to implement the whole session protocol, which we do not need on a FEZ.

I personnally feel no need to implement the “Client for Microsoft-networks” and “File and printer sharing for Microsoft-networks” stuff :slight_smile:

agreed - which is why i wonder whether adding the Fez to a workgroup to appear in the network neighbourhood is adding anything. It’s not like you can then double click it and get anything from it… so again, is there anything I’m missing?

You are both right. There probably isn’t any practical use for it, but it would be interesting to learn how to do it.

I’m wondering if using NetBIOS for name registration is the right way to go anyway, especially for a FEZ device that is using DHCP. Perhaps a more practical approach would be to use DHCP to register a hostname. Much the same way that GHI does with the W5100 Dhcp.EnableDhcp(string mac, string hostName) function.

When I use the Connect shield on a Panda II, and enable DHCP with a hostname of “FEZPanda”, I can ping “FEZPanda” and can connect to its web server using “http://FEZPanda/”, without a NetBIOS client.

hi,
i think you guys are looking for something like this:

which is made for such devices… just like how today’s routers work.

and :

http://www.codeproject.com/KB/IP/upnpnattraversal.aspx

Jay

@ Jay Jay: thanks for pointing at upnp, the service that I always disable in Windows :wink:

But in fact, it seems like it is indeed what we need.
As usual, wikipedia has a great intro: Universal Plug and Play - Wikipedia

Maybe we only need a small part of UPnP, called SSDP: Simple Service Discovery Protocol - Wikipedia

@ JayJay and @ Wouter
Very cool :slight_smile:
This is exactly what I am looking for.

Glad i could help…

I’ll be watching your progress :D…

Currently I’m adding the DPWS service to my Spider and it works beautify…

Jay.

Hey guys,
just wanted to let you know that today i ran into these cool tool that would help with UPnP in case any of you is working on that…

BTW any news on the subject?

@ Jay Jay
Sorry, but I haven’t had time to do anything with UPnP.
I did find that same link the last time you posted info about UPnP back in December.
It looked like a good starting point for some NETMF code.

Hi,

I tried WouterH code on my Cobra board, It seems it would work only when using “FEZCOBRA”, any other name would not work.
I am using Advance IP Scanner softrware by Radmin and when using any name the IP scanner will “see” it with the right name, but when I ping it, only the FEZCOBRA name will respond.

Working:

NameService nameService = new NameService();
            nameService.AddName("FEZCOBRA", NameService.NameType.Unique, NameService.MsSuffix.Default);

Not working:

NameService nameService = new NameService();
            nameService.AddName("AnyName", NameService.NameType.Unique, NameService.MsSuffix.Default);

Any ideas??

Thanks

Hi,

I think I found the problem:
It seems like I should use upper case names

Thanks anyway