BASIC Programmability 
Freedom of Programming Expression
Programmable Controllers


Code & Applications > Serial-over-IP Application

Serial-over-IP Application

Release Date:Original (v1.00): 13/4/2009
Last update (v3.11): 22/12/2011

Project files:


Installation

Source Code
Compiled Binary: for EM500EV, EM1202EV, EM1000EV, DS1202, DS1000, DS1002, DS1003, DS1010, DS1012, DS1013, EM1000EV+GA1000, DS1000G, DS1002G, DS1003G, DS1010G, DS1010GC, DS1012G, DS1012GC, DS1013G, DS1013GC, EM1206EV, EM1206EV+GA1000, DS1206, DS1206N.

Minimum TIDE version:2.20.51 (Download page)
Minimum TiOS version:3.20.01 (Download page)
Minimum TDST version:5.07.11 (Download page)
Platform: EM1000 (DS1000), EM1206, DS1202 (EM1202EV), DS1206 (DS1206N), EM500 (EM500EV)
You may also need:Device Explorer v1.0.0 or newer

About The Application

Many Tibbo customers first came to know us by our fixed-function device servers and modules. This project is a serial-over-IP (SOI) application written in Tibbo BASIC. The application is almost 100% compatible with our fixed SOI firmware. Notable differences are:

  • Wi-Fi support with seamless switching from Ethernet to WiFi.
  • Added web admin interface -- setup your devices via the web browser;
  • Multi-port (multi-channel) operation;
  • No LinkServer support.

Like our fixed firmware devices, the SOI application works with Tibbo Device Server Toolkit (TDST).

We have a separate Serial-over-IP Solutions Manual that explains everything in detail. The following procedure is meant as a simple introduction on how to configure our device servers. As an example, we will set up one serial port of the DS1003 4-port device to operate with a virtual serial port (VSP, a.k.a. "virtual COM") on the PC. There are many other ways to configure a device server, but you will get the general picture.

Preparing the DS1003

  • This procedure uses Tibbo Device Server Toolkit (TDST) for Windows. Download and install it on your PC. Minimum version is V5.4.3 (we recommend to always use the current one published on our site).
  • If your DS1003 doesn't have the application preloaded, load it now using Device Explorer. Subsequent upgrades of this application can be done using the DS Manager (part of the TDST).
  • After that, initialize application settings:
  • Press the setup button on the DS1003 — green and red status LEDs will start blinking (green-red-green-red...) indicating that your device is now in the serial programming mode.
  • Wait at least 5 seconds, then press and hold the setup button again. After a few seconds you will hear a short beep, and the green status LED will turn on — your device is now initialized. A long beep and red LED signal indicate a problem. Note: not all devices have buzzers. For example, the DS1206 will not beep as it has no buzzer.
  • Reboot the device.
  • The DS1003 will boot with DHCP off. Run the DS Manager utility to look at the basic settings of the device. Note: from time to time our users encounter firewall issues. You may have to disable your firewall (or allow UDP traffic on port 65535) for the DS Manager to be able to see your DS1003.
DS1003 in DS Manager

DS1003 in DS Manager

  • Find your DS1003 in the list, click Settings.
  • Enable DHCP or set the desired IP address.
  • Click OK.
  • The DS1003 will reboot with the new IP/DHCP configuration. You can click Refresh to see what IP address is actually being used by the DS1003.

Using web admin

Once you know the IP address of the DS1003 you can also use your web browser to setup the device. Point the browser to the target IP address and the rest is obvious.

Configuring VSP-DS1003 link

Connection Wizard

Connection Wizard

  • Launch Connection Wizard (it is a part of the TDST).
  • On the first screen, select "Create a link between a Virtual Serial Port and a Device Server". Click Next.
  • Select the number of the VSP (virtual COM) you want to use. For example, select "Create new VSP" and choose COM3 from the drop-down list (assuming that COM3 is unused on your PC). Click Next.
  • Point at your device server. Click Select from the list and double-click on your DS1003 in the DS Manager's screen. Do not change anything else. Click Next.
  • Select the channel (serial port on the DS1003) the VSP on your PC will be communicating with. There are four serial ports on the DS1003, so you have four choices here. Click Next when done.
  • Select which side (DS1003 or VSP) will send the data first. There are some configuration differences associated with this choice, but we won't go into such minute details here. "Any side" is a safe bet, so choose that and click Next.
  • Next is the Gateway and netmask settings screen. Assuming that your DS1003 is plugged into the same network with your PC this screen will offer no choices to make. Click Next.
  • Transport protocol and listening ports screen. Everything you (normally) need is selected by default. You are going to use TCP/IP, and you don't really care about ports as long as everything works. Click Next.
  • On-the-fly commands screen. These commands do a lot, but most importantly they configure the serial port on your DS1003 as requested by the software that is using your virtual COM. For example, if an application wants 115200bps, then it will "tell" the (virtual) COM, and virtual COM will send an on-the-fly command to the DS1003 telling it to switch designated serial port to 115200bps. Got it? So, don't touch the default choice and click Next.
  • Serial settings for the device server screen. No need to do anything here. We have on-the-fly commands enabled. Click Next.
  • Now you are at the summary screen. You can review how the virtual COM and your DS1003 will be set. Click Finish and you are done!

Additional setup

You can use the DS Manager or web admin to perform additional setup on top of that done by the Connection Wizard.

For example, for the DS1003 device you may want to go in and select RS485 interface for the serial port. Here is how you do this with the web admin:

  • Point your browser to the IP address of the DS1003.
  • On the login page click Login — there is no password by default.
  • Click Channel Settings (it's in the menu on the left).
  • Select the desired channel in the dropdown box on top of the page.
  • Scroll down to Serial Interface and select Half-duplex (RS485).
  • Click Save.
  • Reboot the DS1003.

Testing VSP-DS1003 link

Any "serial terminal" software will do and may we suggest our very own I/O Ninja.

  • Download and install I/O Ninja. You get to preview it for free, and there are no feature limitations -- it is a full product even in the evaluation mode.
  • Select File > New Session.
  • Choose Serial and click OK.
  • Select your VSP and click Open Port (the lightning-bolt icon).
  • I/O Ninja is now ready to send the data to the DS1003. Note: our TDST software includes a Tibbo Monitor, which you can find in the system tray. This Tibbo Monitor maintains a log of virtual COM activity. Observe what happens when you open/close the port in I/O Ninja, change baudrate, etc.

Wi-Fi Considerations

As of version 3.0, the SOI application supports Wi-Fi connections. That means you can now use devices featuring our GA1000 add-on module for connecting to serial devices over the air. Here's a quick video showing what it looks like. Note: The video looks best in full-screen HD mode.


Let's go over the settings:

Wifi settings

  • Wi-Fi Mode:
    • Permanent means that Wi-Fi is always on. As soon as the device boots it will activate the GA1000 and attempt to associate with the network. This doesn't mean the link is used, only that it's on. As long as the device has a wired connection, that connection will be used. As soon as the Ethernet cable is unplugged, the device will hop over to Wi-Fi instantly, with no set-up time required since it's already associated. Note that each adaptor (wired and wireless) will have a different IP address, so you won't be able to access the device's "wired" address when its cable has been disconnected. You would need to know (and use) the IP assigned to the wireless adaptor.
    • On demand means the GA1000 is normally off. As soon as the device loses Ethernet connectivity, it fires up the GA1000 and attempts to associate wirelessly. Once a wired connection becomes available again, the device automatically shuts down the GA1000 and resumes wired operation. This mode is useful for conserving power.
  • Access Point Name: That's the name of the access point you're trying to connect to. DS Manager does not currently have a Browse button for selecting available wireless networks, so you'll have to type this in manually. Be sure to get it right -- it's case-sensitive.
  • Security: In addition to WEP mode, version 3.0 introduces WPA and WPA2 support. You must select the security type your access point is using. If you're not sure what that is, try checking the access point configuration -- it is always listed there. Note: When using WPA or WPA2, the first association with a new network may take up to two minutes. Both the green and red LED will be on during this time, and the device will be busy crunching away at WPA encryption computations. This is a one-time delay: once done, future associations will be very fast.
  • Password: This is case-sensitive, of course. Note: ASCII passwords for WEP are not supported. If you're using WEP, you must enter a hexadecimal password (ten characters long).
  • DHCP and other network settings: Nothing Wi-Fi specific here. These are the same settings you already know from wired connections. We advise enabling DHCP unless you have a specific reason not to do so. Note: Do not attempt to set the same IP address for both the wired and wireless adaptors. It's not going to work.

Need more information?

Read our Serial-over-IP Solutions Manual!

Support Form