Page 1 of 1

.NET DLL for Finding NetBurners on the LAN

Posted: Tue Jun 12, 2012 5:09 pm
by tod
I tend to write a lot of C# .NET GUIs for the instruments we make. Usually there is a place for the user to enter the IP address of the instrument. I finally decided it would be more convenient to just find the device automatically much the way AutoUpdate and IPSetup do. Since NetBurner provides the source code for those apps and a tech note on the process, it wasn't too tough. However, there are some nitty-gritty details like dealing with big endian/little endian and making sure the UDP listener was configured to use the same port for both send and receive. Also parsing out byte streams tends to be a dark unexplored corner of C# but there's lots of support, and multiple ways to achieve the goal.

Since anyone else writing .NET apps to control a NetBurner based device might find this useful I'm uploading the .dll itself, along with the source code and a couple of sample applications showing how to use it to a Mercurial repository on BitBucket. One app is a very simple console app and the other is a more complicated WPF app.

The Mercurial (aka Hg) project has a wiki page with a little more information. Right now the code only reads the config record, it doesn't write it. Feel free to pull the code and make changes and push them back. I moved this from GitHub to BitBucketsince that is now the hosting service I use for all my Hg code. BitBucket is much more affordable (free) for lone (up to 5) developers that have a lot of projects. All of my private projects are moving from svn to the much nicer Hg distributed code control system. Plus BitBucket makes it simple to have both private and public repos.

For those already familar with hg the full clone syntax is:
hg clone https://bitbucket.org/tgentille/syncor-netburnerfinder
if you use ssh (much nicer once you set up your private/public key) the syntax is
hg clone ssh://hg@bitbucket.org/tgentille/syncor-netburnerfinder



Addendum
For those that aren't interested in the source code and building it themselves The .dll and a read me with hopefully enough info to get going are attached.
SyncorDeviceFinder.png
SyncorDeviceFinder.png (99.55 KiB) Viewed 21347 times

Re: .NET DLL for Finding NetBurners on the LAN

Posted: Tue Jun 12, 2012 7:45 pm
by v8dave
As always Tod, appreciate your time and energy to help support us and provide neat little bits of code. I have to admit, your code has saved me so much time in the past I feel I owe you a lot of beers if our paths somehow someday cross.

Is funny that you posted this particular peice as I was just getting ready to do a Netburner project that uses the Ethernet port to send data to a server and I want to be able to access it from another app on the same network and this little bit of code will make the design automated that little bit more.

Moving from C/C++ to C# to Java langauges in all my projects sure tests your brain to remember all this programming mallarky.. :)

Cheers again Tod,
Dave...

Re: .NET DLL for Finding NetBurners on the LAN

Posted: Tue Jun 12, 2012 10:58 pm
by tod
Dave,
You're welcom, glad someone can benefit from it. I just attached the .dll to the original post. If you have problems with anything on GitHub let me know, I really haven't done things this way before. It just occurred to me that I used some custom .dlls and those should be up there, so I just did that and I'll push an update soon that does the correct referencing of those in the new lib folder.

Tod

Re: .NET DLL for Finding NetBurners on the LAN

Posted: Thu Jun 21, 2012 10:20 pm
by tod
Since I'm moving over to Hg for source code control I moved the project to a public repository on BitBucket. I updated the original message with all the relevant links and commands.

Re: .NET DLL for Finding NetBurners on the LAN

Posted: Sun Jun 24, 2012 9:01 pm
by roland.ames
tod wrote:Since NetBurner provides the source code for those apps and a tech note on the process
Can you please point me to the tech note mentioned, I have the source code but haven't seen any doco (other than comments in source), on the ipsetup and autoupdate processes.

I need a console app that can set ipaddress and mask to a nb module (simplest version will assume only a single nb module on the network), and plan to base it on the examples and pctool source

Thanks,
Roland

Re: .NET DLL for Finding NetBurners on the LAN

Posted: Mon Jun 25, 2012 10:14 am
by pbreed
The clinetool example in the source tree may do exactly what you want already.
There is also a 100% java version of autoupdate in the latest tool set.


Paul

Re: .NET DLL for Finding NetBurners on the LAN

Posted: Mon Jun 25, 2012 12:13 pm
by tod
Netburner kindly gave me permission to upload the file here and it's also now in the project repository.

Re: .NET DLL for Finding NetBurners on the LAN

Posted: Fri Jun 26, 2015 7:09 am
by davecove
Thank you very much for this dll Tod! Your work is very much appreciated.

Dave