ADICON Support Forum Applied Digital, Inc.
Page 1 of 2 12>
Topic Options
#8458 - 11/21/04 06:26 AM Leopard-II on a Wireless LAN
Rex Offline
active contributor


Registered: 09/15/04
Posts: 106
Loc: UK
I'm posting this in case it would help anyone else in a similar situation. There is usually more than one solution to any problem and I don't claim this one is perfect but it works for me.

My Leopard-2 has been sitting on the floor of the "lab" while I debugged the code but I'm getting close to installing it properly. The trouble is I don't want to run any more cables around the house but I do want to be able to add new features and tweak the code as ideas occur. The home LAN is an 802.11g (54Mbps) wireless one so, if I could get C-Max to talk to the Leopard over that, my problem would be solved.

RS232 servers for wireless LANs have been around for a while but a lot of them are industrial-strength models and the manufacturers are very proud of them - as indicated by the price. After a little web research I located a unit that seemed to have the features I needed but was more reasonably priced - a WiSER 2400.IP-2.5 from OTC Wireless. This radio unit (as OTC call it) is limited to 11Mbps (801.11b) but, as the Leo's serial port runs as 9600bps, that really shouldn't slow it down too much. The radio comes with a software utility that allows it to be configured through a serial port and, once connected to the network, via the wireless LAN. The only shortcoming I found with the WiSER is that it only supports shared-key authentication and I use open authentication on my LAN. Fortunately my access-point can be set to allow both types of authentication so that was easily solved.

Getting the radio connected to my LAN was pretty straightforward. I use MAC-address filtering for a little extra security so I added the radio's MAC (printed on the back) to the access-point's "allowed" list. I hooked the unit to my PC serial port with the provided cable (marked "Computer") and fired-up the utility. First I defined it's IP address on the Configuration, Serial-IP-Proxy tab. It can be used with DHCP but I wanted the IP address to be fixed so I set it manually. On the same tab, I also set the mode to TCP(Server) . On the Configuration, Wireless-Port tab, I entered the name of my access-point and selected infrastructure mode. Then on the Encryption tab, I selected 128-bit encryption and entered the key in hexadecimal. Within a couple of seconds, the radio's green RX LED was on continuously and the utility's Link-Status tab showed it was connected. To prove it was working, I exited the utility and restarted it specifying connection through the wireless LAN. Everything seemed to work fine but I noticed that when switching to a new tab it was necessary to click the Refresh button to get the actual settings from the radio.

Now the radio was on the LAN it was time to get it talking to the Leopard. This required a little more use of the utility but it could now be done over the LAN. On the Configuration, Serial-Port tab I set Leo's serial parameters: 9600 Baud, No Parity, 8 Data bits, 1 Stop bit, No Flow control . The radio Serial-mode should be Data And Command . On the Configuration, Peer-Host tab I entered an IP address of 0,0,0,0 as recommended for TCP(Server) operation. Now I connected the radio to Leopard's serial port with the other supplied cable (marked "Board").

To use C-Max with this type of connection it is necessary to have a comport redirector running. OTC don't provide this software but it is readily available for free download on the web. I used HW Virtual Serial Port from HW Group (http://www.hw-group.com/products/hw_vsp/index_en.html). Whatever redirector is used, it must be configured to address the radio. In the HW software this is done on the Virtual-SP tab by entering the IP Address of the radio (as set earlier) and the Port number. The WiSER radio's default port is 8002 but this can be changed using the utility if required by other redirector software. Now it is just a matter of selecting a Port name and clicking on Create Com . C-Max supports Com1 to Com8 - I used Com8. With this done, the link should be in place and C-Max should connect through the specified comport as if a normal serial cable was being used.

I tested my new wireless link with some care. I started by checking that I could access the timers and variables - Yes! Then I tried uploading the IR File - OK! Finally I attempted a program download - Wow, it really worked.

Its a little slower than a direct serial connection - any wireless overhead is added to the normal RS232 transfer time - but perfectly usable. Its certainly much faster than running a serial cable to the Leopard to make an update and I can connect to Leo from any PC in the house. When I get motivated I'll construct a VB program that can get and set Leo's variables via the IP-proxy but, for the moment, it does everything I need.

Top
#8459 - 11/22/04 07:43 PM Re: Leopard-II on a Wireless LAN
Todd R. Offline
active contributor


Registered: 05/27/03
Posts: 178
Loc: CA
Very cool! Is the RS232 radio unit inside the wall? Powered by what? What is the distance range for this??

Maybe ADI can add this as a standard option in the new color Leopard 3!!

While they're at it, how about a complete temp sensing solution with 5vdc converted power, and an opamp signal increase for accuracy!

Oh yeah, don't forget the Isolation relay rack for the outputs!

You gotta love this forum!
_________________________
Todd Reed

Top
#8460 - 11/23/04 02:14 PM Re: Leopard-II on a Wireless LAN
Rex Offline
active contributor


Registered: 09/15/04
Posts: 106
Loc: UK
Todd, the radio will fit into a cavity wall without too much trouble. Its about 7" high including the antenna but only 2 1/2" wide and 3/4" thick. My house walls are solid so its going under the floor above the Leopard. It takes 5V dc power at about 500mA.

Its hard to put a figure on the range. My wireless LAN works throughout the house and everywhere in the garden. The units are pretty smart and negotiate a lower bit-rate if the signal is poor or there is interference.

I agree with you - a wireless LAN interface would be a great feature (or option) for the next Leopard. I really resent the effort it takes to run cables so X10 and wireless LANs are my favourite forms of connection. Let's hope ADI feel the same way.

I've just finished hacking some VB code. Now I can get and set Leopard variables, timers, parameters, the RTC and X10 from any PC in the house. I can even force a Leopard restart - in case it takes exception to the flood of incoming commands...

Top
#8461 - 11/23/04 06:59 PM Re: Leopard-II on a Wireless LAN
ken-h Online   content
active contributor


Registered: 01/13/03
Posts: 102
Loc: Calgary, Alberta, Canada
[QUOTE] RS232 servers for wireless LANs have been around for a while but a lot of them are industrial-strength models and the manufacturers are very proud of them - as indicated by the price. After a little web research I located a unit that seemed to have the features I needed but was more reasonably priced - a WiSER 2400.IP-2.5 from OTC Wireless. This radio unit (as OTC call it) is limited to 11Mbps (801.11b) but, as the Leo's serial port runs as 9600bps, that really shouldn't slow it down too much. The radio comes with a software utility that allows it to be configured through a serial port and, once connected to the network, via the wireless LAN. The only shortcoming I found with the WiSER is that it only supports shared-key authentication and I use open authentication on my LAN. Fortunately my access-point can be set to allow both types of authentication so that was easily solved. [/QUOTE]And what would that price be???
_________________________
Ken H To Automate is all right.

Top
#8462 - 11/26/04 12:06 PM Re: Leopard-II on a Wireless LAN
Rex Offline
active contributor


Registered: 09/15/04
Posts: 106
Loc: UK
I don't know what you'd have to pay in Canada. UK prices for products from US companies are often set just by changing the currency symbol so you may get a better deal than I did.

I was happy with the price I paid because it was less than half (42%) that of competitive products.

Top
#8463 - 11/30/04 05:44 PM Re: Leopard-II on a Wireless LAN
Tim Marks Offline
newbie


Registered: 03/19/04
Posts: 12
OK, and now that Rex has done the hard part, it is time for somewhat to develop the killer ap for a PalmOS or PPC PDA with integrated WiFi, so we can all control our Leopards using the PDA as the remote... or even more cool, so you can use a PDA as a display for your oscelot.
Top
#8464 - 12/01/04 02:28 PM Re: Leopard-II on a Wireless LAN
Rex Offline
active contributor


Registered: 09/15/04
Posts: 106
Loc: UK
That may not be so hard...

Having got a few simple IP proxy communications functions implemented in VB - like getting/setting variables, timers and X10 status - I decided to try something with increased WAF. In a couple of hours I had a program that emulated the two most-used screens of the Leopard. It controls the Leopard by setting variables - which is what the normal buttons do anyway. Very well received by the target audience.

I could get tempted to try this out on a PDA if I can sneak one into the house.

Top
#8465 - 02/10/05 06:20 AM Re: Leopard-II on a Wireless LAN
Stephen Offline
newbie


Registered: 01/01/05
Posts: 24
Loc: Spain
Any more news on your progress with your latest project.
I wonder if it would be possible using the Wiser gadget and then use main lobby on a pc or Pocket pc to control the Leopard/Ocelot. This would up the WAF factor as well.

Top
#8466 - 02/10/05 12:59 PM Re: Leopard-II on a Wireless LAN
Guy Lavoie Administrator Offline
Beyond All Hope
*****

Registered: 12/21/02
Posts: 6244
Loc: Montreal, QC, Canada
I have been using Lantronix EPS1 print servers to connect to my own two Ocelots and for experimenting with a Leopard. I also use them to connect to other serial devices. You can often buy these on ebay for about $5 each. They have a parallel and a serial port, and you can then use a com port redirector to connect to the raw serial port.

I've also created an experimental program with a WiFi PDA that connects to a print server serial port, for wireless access. It works very well once you get the socket connection going. I've been using Embedded Visual Basic (free) to write the Pocket Windows program but now you can also use Visual Studio.NET to write PDA programs, although this is quite expensive.
_________________________
"If you don't know what you're doing, do it neatly..."

Top
#8467 - 02/12/05 03:21 PM Re: Leopard-II on a Wireless LAN
Rex Offline
active contributor


Registered: 09/15/04
Posts: 106
Loc: UK
By sheer coincidence, I've managed to persuade the chief domestic accountant that I should have a PDA for my Birthday in the not-too-distant future. I'll report back once I get the wrapping off and my code ported onto it.

Meanwhile, I've been adding a few functions to the VB interface to help with debugging Leopard and X10 programming problems. The WiSer has been running continuously since I plugged it in with no unexplained problems.

As Guy explains, you can make an IP connection to a Leopard inexpensively if you don't need it to be wireless. Then if you have a wireless access point you could still use a wireless PDA to get and set controller variables.

Top
#8468 - 03/14/05 03:37 PM Re: Leopard-II on a Wireless LAN
Rex Offline
active contributor


Registered: 09/15/04
Posts: 106
Loc: UK
I'm happy to report that my shiny new PDA now has full wireless control of the Leopard - and it works brilliantly throughout the house and garden.

I decided to be brave and totally rewrote my code in vb.net so I could take advantage of the compact framework (runtime support) built into current PDAs that run the Pocket PC operating system. It was a bit of a shock having to relearn a programming language I have used for years but the effort was well worth while. I implemented the Leopard interface as a reusable class so it is easily hooked into other programs. Who said you couldn't teach an old dog new tricks?

Guy is right (as he usually is) that Microsoft are very proud of vb.net - particularly the Professional version that is necessary for development of mobile applications. I must say, though, that I am very impressed with the development environment. The built-in emulator for Pocket PC makes debugging really easy. I had my communications code all written and tested before I got my hands on the actual PDA. I recommend serious consideration of vb.net for anyone who is planning to write code for a Pocket PC.

If the cost of the software is a big problem, you could make friends with a student or a teacher and have them get you a package at their special (and dramatically) discounted price. I understand there are also some web suppliers who don't need so see your academic ID.

Top
#8469 - 03/15/05 03:48 PM Re: Leopard-II on a Wireless LAN
Rex Offline
active contributor


Registered: 09/15/04
Posts: 106
Loc: UK
If anyone is interested in experimenting with this, drop me an email. I can send you a small demo program (executable and source) for a Pocket PC 2003 along with the class dll and some - brief - documentation.

The demo requires that your Pocket PC has wireless or wired access to an IP Proxy server connected to a Leopard's or Ocelot's serial port. Whilst I have not tested it, it should work with Guy's innovative solution using a serial print-server.

The executable should run on any Pocket PC 2003 (and 2002 if it has Compact Framework installed) just by copying it over. If you want to modify the demo project you'll require Visual Studio .NET Professional 2003.

The code was tested with a Leopard-II but, as far as I'm aware, there is no major difference in the communications protocol between Leopard-II and Ocelot.

Top
#8470 - 03/15/05 04:24 PM Re: Leopard-II on a Wireless LAN
Guy Lavoie Administrator Offline
Beyond All Hope
*****

Registered: 12/21/02
Posts: 6244
Loc: Montreal, QC, Canada
Yes, the Ocelot and Leopard both have the same serial commands (with the Leopard having additionnal commands for the screen functionality).

I don't have VB Studio.NET myself but I do have access to it at work. I would be interested in seeing your project files at least as an intro to Studio.NET and maybe for an actual future project. If you want to send it to me as a zipped file, just click on my name to get my email address in my profile. Thanks!
_________________________
"If you don't know what you're doing, do it neatly..."

Top
#8471 - 03/16/05 05:36 PM Re: Leopard-II on a Wireless LAN
Rex Offline
active contributor


Registered: 09/15/04
Posts: 106
Loc: UK
Thanks for the confirmation, Guy. My interface currently only handles variables, timers, parameters, X10 status, simple X10 commands, RTC and a few oddments so there is nothing dedicated to Leopard. I'm not convinced a PDA needs to be able to read and write screen objects or icon bitmaps so I don't plan on supporting them just yet. I've been able to perform all my required remote control by manipulation of the variables and a couple of timers.

I've sent you the sample code by email. I can't claim to be expert in vb.net so it may not be the finest introduction to the language but I hope it gives you some ideas.

Top
#8472 - 03/28/05 06:29 AM Re: Leopard-II on a Wireless LAN
Rex Offline
active contributor


Registered: 09/15/04
Posts: 106
Loc: UK
I'm not sure if this belongs in this thread...

Having written a couple more programs to perform various operations on the Leopard from my PDA, I noticed that 99% of the programing time went into designing and coding the user interface. Leopard owners will probably have found the same thing applies to C-Max programming. I started wondering if it was possible to write a program that would allow the user interface to be created automatically - according to parameters that could be adjusted at run-time.

Much code-crunching later, I have ShowCat - a Pocket PC program that can be tailored to display (and optionally modify) any combination of variables, timers and X10 status of a LAN-connected Leopard/Ocelot - without the need to write a single line of code! It includes the ability to display variables in a way that reflects their meaning within the C-Max. For example: Time variables can be displayed as hh:mm rather than just minutes; Boolean values can be shown as On/Off instead of 0/1; Months can be displayed as January, February, etc. With this running on a wireless Pocket PC, an Ocelot can have touch-screen control like a Leopard but without any additional programming!

By design, ShowCat should work equally well on Ocelots or Leopards connected through either wired or wireless servers. In practice I can only test it on my Leopard-II through the WiSER. If anyone would be interested in trying this on their own system, please drop me an email. You would need to have access to a wireless Pocket PC 2003 (or 2002 plus Compact Framework 1.0) and a Leopard or Ocelot connected to your LAN through an IP Proxy server.

Top
#8473 - 03/28/05 07:05 AM Re: Leopard-II on a Wireless LAN
Guy Lavoie Administrator Offline
Beyond All Hope
*****

Registered: 12/21/02
Posts: 6244
Loc: Montreal, QC, Canada
Hi Rex.

This sounds like it could have a wide appeal. For that reason, I'd suggest that you copy the contents of your previous message to a whole new thread with a subject line that would really describe what you're offering. Also, since your program equally applies to the much more prevalent Ocelot controller, it would be a shame if Ocelot users would somehow miss it because it was discussed in the Leopard specific section of the forum. Thus you might want to start the new subject in the "Custom Software" section.

Just a few suggestions to get the word out...
_________________________
"If you don't know what you're doing, do it neatly..."

Top
#8474 - 03/28/05 01:13 PM Re: Leopard-II on a Wireless LAN
Rex Offline
active contributor


Registered: 09/15/04
Posts: 106
Loc: UK
Thanks, Guy. I'll do as you suggest.
Top
#8475 - 04/05/05 10:47 AM Re: Leopard-II on a Wireless LAN
Rex Offline
active contributor


Registered: 09/15/04
Posts: 106
Loc: UK
Following Guy's suggestion, further posts on ShowCat should be on the new thread: http://www.appdigsupport.com/cgi-bin/ultimatebb.cgi?ubb=get_topic;f=12;t=000036
Top
#8476 - 04/09/05 02:08 AM Re: Leopard-II on a Wireless LAN
Stephen Offline
newbie


Registered: 01/01/05
Posts: 24
Loc: Spain
Sounds intersting. Excellent work.
Another excuse to buy more home automation toys. Mind you do I really need an excuse.

Top
#8477 - 05/13/05 05:42 PM Re: Leopard-II on a Wireless LAN
capted Offline
junior


Registered: 06/08/05
Posts: 26
Rex,

Fantastic development skills. Great Work.

I have a HP ipaq PDA with wireless so very interested in your work.

The question is what's the best way of connection to the Leopard II via a hardwired LAN rather than going the OTC serial-Wireless link.

In otherwords, how do I connect the Leopard to a hardwired LAN?

I could use my existing wireless access point to connecy my pda to the network and somehow connect the Leopard to the network using conventional Cat5 cable.

Thanks in anticipation

Top
Page 1 of 2 12>


Moderator:  Dan Smith, Monte G, ADI Tech Support, Guy Lavoie 
Hop to:
Who's Online
0 registered and 5 anonymous users online.
Recent Posts
Get Latched -vs- Get Real Time I/O
by Guy Lavoie
Yesterday at 06:18 PM
New Ocelot driver for Elve!
by Deane Johnson
09/07/10 07:13 AM
How to Send an X10 Command ... propertly
by John Hughes
09/06/10 08:21 PM
To send an IR command
by John Hughes
09/05/10 08:28 PM
C-Max & OS X compatibility
by bvnoldguy
09/03/10 08:24 PM
Shout Box

Newest Members
Madon, jsdds, Dave W, stevenotts, wesmo
2633 Registered Users
Forum Stats
2633 Members
19 Forums
3727 Topics
22065 Posts

Max Online: 58 @ 12/05/07 03:33 PM
September
Su M Tu W Th F Sa
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30