NCD Articles Home Copyright © 2008, National Control Devices LLC
By Ryan Sheldon
Contact Us

Introduction to Wi-Fi 802.11b and Ethernet Communications

If you are new to network control applications, then you might be pleased to know you are not alone.  With regard to our products, it's just one of those things that can be as easy or complicated as you want it to be....and everything in between.  We researched MANY embedded network interface modules and found a pair that stood above all others, both in terms of functionality and compatibility.  And now that we have integrated both Ethernet and 802.11b Wi-Fi interface modules into many of our controllers, there are few things you need to know to help get you started as quickly as possible.
 
The Ethernet Advantage
There are many reasons why you might want to control a device using your local area network (LAN).  For starters, it will work with any computer over the network.  Communications are reliable, and if your office is anything like ours, Ethernet is already built in, so adding a Ethernet device of any kind is just about as complicated as plugging in a network printer in another office.  But my feature of Ethernet relay control may be a little surprising.  It takes me less than 10 minutes to write a brand new program on my computer to activate relays connected over Ethernet.  You see, the developers of the embedded Ethernet module we are using GIVES you a shortcut.  And its a BIG ONE.  You don't have to know anything about networking, you don't even have to know the IP address...and no joke, ground up programming takes less than 10 minutes.
 
The Wi-Fi 802.11b Wireless Network Advantage
If your installation does not have provisions for Ethernet, then wireless networking may be a more preferred option.  Wi-Fi shares most of the same virtues of Ethernet in terms of how the device works, but also adds the benefits of wireless connectivity.  The freedom of powering up one of our controllers and just having it work is unbeatable.  Unlike other wireless technologies Wi-Fi is perhaps the most widely used standard, and chances are really good that your network is in place and ready to talk to any Wi-Fi device.
 
Network Control the Easy Way
The embedded network modules we have chosen for our product line were manufactured by a company called Digi International (http://www.digi.com). On their web site, they have a very cool little program that you install on your computer called "RealPort".  RealPort searches your local area network for a compatible Digi embedded network module.  Once it finds the module's IP address, it maps that IP address to a COM port on your PC.  So what you end up with is a Virtual COM Port over your Ethernet or Wi-Fi connection.  So to make this perfectly clear, you only have to know how to write programs that talk to a serial port, and anyone, even first time programmers, can do that REALLY FAST! 
 
RealPort is probably one of the best Virtual COM port emulators I have seen.  It is a lot more robust than you might expect for a free program, and it is well supported (meaning they are still improving it).  To date, it has never lost communication with our controllers (in other words, it has never flaked out for no reason).  And installation could not be easier.  During installation, it will even ask you what COM port you want mapped to the network device.  You can also use the installation to remove older devices, or to remap existing devices to different COM ports.  RealPort is one of the greatest technologies I have seen, because it allows us non-influential programmers control some pretty influential devices...all while expending the least amount of brain power.
 
As Complicated as you want to Make It
First of all, I have to confess that I am not much of a programmer, my background is very strictly related to Embedded microprocessor programming and circuit layout.  Most of my customers who call me ask if its possible to control our network devices directly without using RealPort for virtual COM communications.  And they always seem to know more about networks than I do.  And their request is motivated by good reason, RealPort will not allow more than one computer to talk to a single device, so it becomes necessary to use a more direct approach to communications with our Ethernet and Wi-Fi devices.  And let me reiterate this point, what I am about to tell you comes from my customers who work with networking a lot more than I do, and from a programmer that I work closely with in the development of our products.
 
You can talk directly to our Ethernet and Wi-Fi controllers by sending commands to port 2101.  Before doing this, you will need to know the IP address of the device.  The IP address will automatically be assigned to your network using ADHOC.  The easiest way (for me) to find the IP address of the device is to start (but not finish) installing RealPort.  During the installation process, the IP address of the device(s) will be shown in a window that appears.  Once you know the IP address, you must login into the device to change the default baud rate from 9600 to 115.2K baud.  You do this by entering the IP address into the address bar of your favorite web browser.  You will then be prompted with a Login and Password.  The default Login word is "root", the default password is "dbps".  You will use the built-in web server and your favorite browser to look through the settings and store the default baud rate.  Once you have changed the default baud rate to 115.2K baud, you are ready to talk directly to the device without any special drivers, from anywhere on the network.  You will be tempted to make other configuration changes while you are logged in, I strongly urge you to keep all other settings at their defaults, at least for the time being until you have it working.  Making any other changes can cause you to loose communications with the controller, and we will have to instruct you on a procedure that will allow you to restore all default settings.  I cannot stress this point enough, please do not make any other changes while logged in except the default baud rate, even if you really know what you are doing.
 
Embedded Web Server?  Can I Control Relays over the Internet?
Yes, this device has an embedded web server.  This means you can talk to this device from anywhere on the network by entering the IP address into your URL of your favorite browser.  This does NOT however mean you can talk to this device over the internet.  If you have a network printer, or a network router, then you know you can login to these devices to make configuration changes.  Our devices work the same way, and they are no-more accessible over the internet as your printer would be or your network router.  But if you had some server software and a static IP address, that would all be different....and any device on your local area network could be accessed over the internet....and that includes your new internet controlled relay board.
 
Can the Embedded Web Server be Used to Activate Relay?
Not at this time.  The embedded web server is currently used exclusively for the purposes of configuring the interface and handling network protocols and security settings.  Though we are researching possibilities for integrating a web server that activates relays.
   
Advantages of Ethernet Communications Disadvantages of Ethernet Communications
Network infrastructure is likely in place already.  Though communication speed is not as fast as other direct wired communication methods, it's generally not a concern in most control applications.
Low Cost Interface
Multiple Users can Talk to a Single Device  
Reasonably Fast Communication Speed  
Virtual COM Support for Easy Programming  
A Single Network Can Talk to LOTS of Devices  
Advantages of Wi-Fi 802.11b Communications Disadvantages of Wi-Fi 802.11b Communications
Network infrastructure is likely in place already.  Of all wireless technologies we have seen, this is actually the slowest we have worked with.  Having said that, you can still activate many relays per second, but there is sometimes a network lag.  This is not really a disadvantage of the embedded Wi-Fi module as much as it is a disadvantage of the 802.11b standard, and the overhead required for Wi-Fi network communications.  Despite speed disadvantages, it really is perfect for relay control applications....who needs to turn on a light within 10ms anyway?
Can't beat the Plug in and Go Freedom or Wireless Technology This is the most expensive interface option we offer.
Multiple Users can Talk to a Single Device  
Reasonably Fast Communication Speed  
Virtual COM Support for Easy Programming  
A Single Network Can Talk to LOTS of Devices  
 
If you have any questions about this article, please feel free to contact me at ryans@controlanything.com or call our office at (417) 646-5644.  Our business hours are 9:00AM to 4:00PM Central Standard Time.
control anything... anywhere
Login   |   Logout
NATIONAL CONTROL DEVICES, LLC

Attention

We will be closed December 24th, 25th, and 26th.