NBFind and NBConfig can't find my SBL2E but IPSetup can
-
- Posts: 18
- Joined: Thu May 15, 2014 9:19 am
NBFind and NBConfig can't find my SBL2E but IPSetup can
I'm building a modified version of dualserial. After loading it into my sbl2e, it serves up configuration web pages just fine, and IPSetup and VirtualSErialPorts find it (though it looks odd; prepended by a 0xF6 0x8B pair of characters), but NBFind and NBConfig from within NBEclipse can't find it anymore.
What are NBFind and NBConfig looking for? and how could I possibly have killed whatever they're looking for in my version of dualserial?
Thanks,
jmh
What are NBFind and NBConfig looking for? and how could I possibly have killed whatever they're looking for in my version of dualserial?
Thanks,
jmh
Re: NBFind and NBConfig can't find my SBL2E but IPSetup can
Do you have more than one network connection active on your PC? AKA do you have a wired and wireless connection (or two wired connections)?
Dan Ciliske
Project Engineer
Netburner, Inc
Project Engineer
Netburner, Inc
-
- Posts: 18
- Joined: Thu May 15, 2014 9:19 am
Re: NBFind and NBConfig can't find my SBL2E but IPSetup can
I do have two ethernet interfaces on my PC, and in fact my local network is on the "second" interface. But apparently NBFind and NBConfig have already been updated to search all available interfaces (like IPSetup and VirtualSErialPorts, and just yesterday AutoUpdate (ask Forrest).) But thank you for asking.
I think the problem is partly my fault. In conversation with "Tom" (in sales? at least he responds to the "sales@netburner.com" emails) I agreed to try to add a configuration port option, so there would be at least a hope of accessing multiple NB devices behind a NAT device that doesn't itself have port redirection (like most Linksys WRT54G routers.) I added a short field to the ConfigRecord struct, which of course breaks everything else that doesn't know there's a new field.
But the problem is also partly NetBurner's. It seems every NB app and every host app has its own idea about the ConfigRecord struct. They're all the same, but it means you can't change it in just one place and recompile everything. And I don't think there's a global makefile for the pctools anyway.
My latest approach is to use 2 of the 3 "bUnused" bytes in the struct to convey the configuration port up to the host. Then host apps like IPSetup and NBFind will have to use that info when launching a web browser page to do the configuration. But at least, they should be happy with the length and the checksum. Work in progress...and it doesn't help with using IPSetup to do the configuration, since I think that still uses port 20034, and so every NB device would have to be able to change that port, too.
On that note, where can I find source for NBFind and NBConfig?
Thanks,
jmh
I think the problem is partly my fault. In conversation with "Tom" (in sales? at least he responds to the "sales@netburner.com" emails) I agreed to try to add a configuration port option, so there would be at least a hope of accessing multiple NB devices behind a NAT device that doesn't itself have port redirection (like most Linksys WRT54G routers.) I added a short field to the ConfigRecord struct, which of course breaks everything else that doesn't know there's a new field.
But the problem is also partly NetBurner's. It seems every NB app and every host app has its own idea about the ConfigRecord struct. They're all the same, but it means you can't change it in just one place and recompile everything. And I don't think there's a global makefile for the pctools anyway.
My latest approach is to use 2 of the 3 "bUnused" bytes in the struct to convey the configuration port up to the host. Then host apps like IPSetup and NBFind will have to use that info when launching a web browser page to do the configuration. But at least, they should be happy with the length and the checksum. Work in progress...and it doesn't help with using IPSetup to do the configuration, since I think that still uses port 20034, and so every NB device would have to be able to change that port, too.
On that note, where can I find source for NBFind and NBConfig?
Thanks,
jmh
Re: NBFind and NBConfig can't find my SBL2E but IPSetup can
You can find all the source for the various utilities in the 'pctools' directory of the install.
However, I would like to offer a comment to you about the config record sizing issue you encountered. This is a very low level detail that must be absolutely correct for the overall system to work. It is a binary structure that is used in every facet of the NNDK's operation. The problem is that there can be multiple config records in Flash, but if the size doesn't line up, the secondary config gets nuked. If the variables are in a different order, it gets nuked. If someone is running with an earlier version and things don't line up properly, it gets nuked. In short, there is no easy way for us to change it and actually support our users previous work.
We have wanted to change the Config Record structure for years, but cannot do so without completely breaking support for earlier versions of the modules. That is why this is not easy to do: because we will never support it in it's current form.
However, I would like to offer a comment to you about the config record sizing issue you encountered. This is a very low level detail that must be absolutely correct for the overall system to work. It is a binary structure that is used in every facet of the NNDK's operation. The problem is that there can be multiple config records in Flash, but if the size doesn't line up, the secondary config gets nuked. If the variables are in a different order, it gets nuked. If someone is running with an earlier version and things don't line up properly, it gets nuked. In short, there is no easy way for us to change it and actually support our users previous work.
We have wanted to change the Config Record structure for years, but cannot do so without completely breaking support for earlier versions of the modules. That is why this is not easy to do: because we will never support it in it's current form.
Dan Ciliske
Project Engineer
Netburner, Inc
Project Engineer
Netburner, Inc
Re: NBFind and NBConfig can't find my SBL2E but IPSetup can
I would have just used a field like the tftp file name for your port number and not modified any of the config record stuff. Most people don't use tftp. The 20034 is the IEEE assigned NetBurner port number, so I think you would want that to stay the same. Your going to have to add revision keys/id's to all the s/w to handle the case when the new field you added is not present or not initialized yet.
Re: NBFind and NBConfig can't find my SBL2E but IPSetup can
These utilities are compiled in to NBEclipse. If you need the source, please submit a request on support.netburner.com and I will be happy to send it to you. All source files for NBEclipse are written in Java and the Eclipse xml plugin format.heineckenb wrote: On that note, where can I find source for NBFind and NBConfig?
Forrest Stanley
Project Engineer
NetBurner, Inc
NetBurner Learn Articles: http://www.netburner.com/learn
Project Engineer
NetBurner, Inc
NetBurner Learn Articles: http://www.netburner.com/learn
-
- Posts: 18
- Joined: Thu May 15, 2014 9:19 am
Re: NBFind and NBConfig can't find my SBL2E but IPSetup can
ick.The 20034 is the IEEE assigned NetBurner port number
Also ick.Your going to have to add revision keys/id's to all the s/w to handle the case when the new field you added is not present or not initialized yet
I guess the short answer is, if you want to put multiple NB's behind a NAT router, you'd better get a router that does port redirection as well as port forwarding. Which mine doesn't.
Oh, well, I've learned a

Thank you very much for responding on this thread. I hope other readers will find it as illuminating as I have.
jmh
Re: NBFind and NBConfig can't find my SBL2E but IPSetup can
This is actually a two stage joke/easter egg (I'd have to ask Paul or Tom about it). Convert 20034 to hex and you get the 16 bit value: 0x4e42. Convert that to ASCII and you get: 'NB'. Turns out, it's not such a random port number after allheineckenb wrote:ick.The 20034 is the IEEE assigned NetBurner port number

Dan Ciliske
Project Engineer
Netburner, Inc
Project Engineer
Netburner, Inc
Re: NBFind and NBConfig can't find my SBL2E but IPSetup can
Is it your intent to make the config tools work from the wan side of a nat router? I don't think that will work since the tools use broadcasts, and those won't be forwarded through a nat router, regardless of the port number.
-
- Posts: 18
- Joined: Thu May 15, 2014 9:19 am
Re: NBFind and NBConfig can't find my SBL2E but IPSetup can
Right. And it would not make sense to "Find" NB devices over the internet. It looks like there are two ways to do configuration, using the web server on port 80 and using IPSetup on port 20034. I have already made some modifications to VirtualSErialPorts so that, for example, you can supply a URL such as xxx.dyndns.org, and it will look up the current IP address for your NAT router. Now you can assign (or re-assign if it moved) a virtual serial port to that IP address and a known listening port. And every NB device on your LAN can be listening on a different port. Just have to enable those ports through your firewall.
But the port is wide open. If the serial device hanging on the NB does not itself have access control (like a password), the only way I can figure to do any kind of access control, is to go in through a configuration port, and temporarily enable the serial port, do what you need to do, and then disable the serial port again. Using the web based configuration, at least the pages can be password protected (I don't think so using IPSetup.)
Now, if you have two NB devices on your LAN, there's no way to have one listening for web configuration on 80 and the other on, say, 81. I did complete modifications to dualserial and the SBL2E library code, and to VirtualSErialPorts, to put a port number (default 80) in the ConfigurationRecord, and it worked. I could move my NB to any port I wanted and reboot it, and then configure it on that port. (This is how all my IP cameras work, too.)
But every application that wants to launch a configuration web page (VirtualSErialPorts, IPSetup, NBFind or NBConfigure, what else?) would have to have all the same modifications made, and it just got messier and messier. It finally seemed more reasonable to get a router that supported port redirection with port forwarding, so if I went to <my routers ip address>:1024, it would go to, say, 192.168.1.246:80, and if I went to <my routers ip address>:1026, it could go to 192.168.1.248:80. (Could maybe do the same thing with 20034, but Find/broadcast still wouldn't work, and I don't think there's any password protection.)
So that's both the long and short answers to your question. Now, I've only been working with NetBurner code for a week or so, so this may all be old news, but I'm still ramping up. And forgive me if I sound preachy, this has all been spinning around in my head and this is the first time I've really put it into print.
jmh
But the port is wide open. If the serial device hanging on the NB does not itself have access control (like a password), the only way I can figure to do any kind of access control, is to go in through a configuration port, and temporarily enable the serial port, do what you need to do, and then disable the serial port again. Using the web based configuration, at least the pages can be password protected (I don't think so using IPSetup.)
Now, if you have two NB devices on your LAN, there's no way to have one listening for web configuration on 80 and the other on, say, 81. I did complete modifications to dualserial and the SBL2E library code, and to VirtualSErialPorts, to put a port number (default 80) in the ConfigurationRecord, and it worked. I could move my NB to any port I wanted and reboot it, and then configure it on that port. (This is how all my IP cameras work, too.)
But every application that wants to launch a configuration web page (VirtualSErialPorts, IPSetup, NBFind or NBConfigure, what else?) would have to have all the same modifications made, and it just got messier and messier. It finally seemed more reasonable to get a router that supported port redirection with port forwarding, so if I went to <my routers ip address>:1024, it would go to, say, 192.168.1.246:80, and if I went to <my routers ip address>:1026, it could go to 192.168.1.248:80. (Could maybe do the same thing with 20034, but Find/broadcast still wouldn't work, and I don't think there's any password protection.)
So that's both the long and short answers to your question. Now, I've only been working with NetBurner code for a week or so, so this may all be old news, but I'm still ramping up. And forgive me if I sound preachy, this has all been spinning around in my head and this is the first time I've really put it into print.
jmh