On Thu, Jul 12, 2012 at 04:21:01PM +0100, Chris Green wrote:
On Thu, Jul 12, 2012 at 04:14:16PM +0100, Chris Green wrote:
Have I missed something obvious or is this really wierd? Any/all ideas very welcome.
Aahh, I think I *may* have missed something obvious, the NBNS in the names is the clue. It's the NETBIOS NAME SERVICE that this is responding to, not DNS.
So, some of the questions still stand, can anyone explain the odd encoding given that it is a NETBIOS request? ... and is this the code that's being exercised when I send a 'host' command to the device, I suspect not!
... and after much searching I found this:-
Each half-octet of the NetBIOS name is encoded into 1 byte of the 32-byte field. The first half-octet is encoded into the first byte, the second half- octet into the second byte, and so on. Each 4-bit, half-octet of the NetBIOS name is treated as an 8-bit, right-adjusted, zero-filled binary number. This number is added to the value of the ASCII character 'A' (hexadecimal 41). The resulting 8-bit number is stored in the appropriate byte.
Grrr! How to make something which is fundamentally simple much more complicated than necessary, Microsoft at work again! :-)
I'm still confused as to why this bit of code is even necessary on my Nanode/Arduino, will some (old) PCs be upset if they can't do Netbios name requests?