Touch Panel Controller Solution
Touch Panel Controller Solution
It seems that getting into home automation brings along with it the eternal quest for a reasonable (cost) touchscreen device to interface with the server software. This is especially true with HouseBot due to the ease with which it can interface to a variety of devices. I have used a Dell Axim (small screen area with limited resolution), Nokia 770 (good resolution, adequate screen size for couch use, but there are some issues with the rdp client), and both a Desxcape and Viewsonic 12" smart display (great solution but rdp dependent, screen size is a bit on the large size). Recently I came across a Windows CE 5.0 device made by Comfile called the Cuwin 3200 ( http://www.cubloc.com/product/05_02.php ). It is a barebones 7" touchscreen device with a USB host, ethernet port, SD card slot and more. It has a variable voltage input of 9-24 V and only requires 500 mA making power-over-ethernet a possibility for the device. The best part is that it comes in at $399 (shipping was ~$10).
I purchased one for some testing and it runs the HouseBot CE 5.0 swremote without issue. You just have to be diligent with your images as memory can become a problem when using multiple images or button types to build a theme for the device. It also has an rdp client built in. The only issue is the bar at the top of the screen when a rdp session is active (see pictures). The resolution on this thing is great and it has the potential for in-wall mounting with the right enclosure. Hope this is of use.
Images running the native CE 5.0 swremote:
I purchased one for some testing and it runs the HouseBot CE 5.0 swremote without issue. You just have to be diligent with your images as memory can become a problem when using multiple images or button types to build a theme for the device. It also has an rdp client built in. The only issue is the bar at the top of the screen when a rdp session is active (see pictures). The resolution on this thing is great and it has the potential for in-wall mounting with the right enclosure. Hope this is of use.
Images running the native CE 5.0 swremote:
- Attachments
-
- cuwin_size.JPG (104.7 KiB) Viewed 11553 times
-
- ce_swremote.JPG (51.93 KiB) Viewed 11551 times
-
- ce_swremote2.JPG (94.95 KiB) Viewed 11552 times
Re: Touch Panel Controller Solution
Images using the rdp client:
- Attachments
-
- rdp_swremote.JPG (60.41 KiB) Viewed 11542 times
-
- rdp_swremote2.JPG (54.79 KiB) Viewed 11539 times
-
- rdp_swremote3.JPG (71.6 KiB) Viewed 11541 times
-
- HouseBot Guru
- Posts: 757
- Joined: Wed Apr 02, 2003 8:10 pm
- Location: Pelham AL
Re: Touch Panel Controller Solution
Osler,
pretty neat. But I'm unclear on whether its better to run the Win CE SW remote on the device itself or run the RDP client and point it to a SW remote on another "hosting" PC (which is running a suitably sized SW remote. Make sense?
pretty neat. But I'm unclear on whether its better to run the Win CE SW remote on the device itself or run the RDP client and point it to a SW remote on another "hosting" PC (which is running a suitably sized SW remote. Make sense?
Steve
Re: Touch Panel Controller Solution
I was just demonstrating that you have both options available with this thing.
Ideally, I'd like to use the CE swremote. The biggest issue is that CE doesn't support transparency (and oh how I love transparency). I will have to play with it some more to see how far I can push it with multiple images/buttons etc. before it shuts the little guy down. I tried to load my nokia theme on it and it died (lots of images/buttons in the theme, multiple panels). However, I haven't thrown the 1 gig SD card into the mix yet nor optimized memory available for applications.
If you have a massive theme and really want transparency, you will need to use rdp. The issue with this is the number of concurrent sessions in XP (I can only get 3 to run in a stable fashion). I will look into hiding the little rdp bar at the top of the screen.
Osler
Ideally, I'd like to use the CE swremote. The biggest issue is that CE doesn't support transparency (and oh how I love transparency). I will have to play with it some more to see how far I can push it with multiple images/buttons etc. before it shuts the little guy down. I tried to load my nokia theme on it and it died (lots of images/buttons in the theme, multiple panels). However, I haven't thrown the 1 gig SD card into the mix yet nor optimized memory available for applications.
If you have a massive theme and really want transparency, you will need to use rdp. The issue with this is the number of concurrent sessions in XP (I can only get 3 to run in a stable fashion). I will look into hiding the little rdp bar at the top of the screen.
Osler
Re: Touch Panel Controller Solution
Ok...I've got RDP working for the Cuwin 3200 with autologin. Sadly, the version of the RDP client included with CE 5.0 doesn't allow for reading passwords from a .rdp file. This necessitated some hacking around in VS 2005. I have written a small app called AutoRun.exe that will start cetsc.exe (the CE terminal service client) and pass it the location of AutoRun.rdp. This file contains the settings for the client, including whether the connection bar is pinned and/or displayed. The problem is that this file can pass everthing needed to start a session EXCEPT for the password. AutoRun.exe will pause for 3 seconds after cetsc.exe is started and then send a password (located in AutoRun.txt) to the RDP login screen and hit return via keybd_event (an unmanaged sub in coredll.dll on all CE devices). It appears to work well for what it does, but is likely not terribly robust code.
HOW TO USE:
1) Download the .zip and unzip.
2) Right-click on AutoRun.rdp and select Open With -> Notepad. Edit the settings for ServerName (IPAddress), UserName, and Domain (if needed). The file should look like this:
Save the file once it is modified.
3) Open AutoRun.txt in Notepad and put your password on the first line. Keep it simple (lower case, no funky symbols...letters and numbers are ok). Save the file.
4) Connect the Cuwin 3200 via ActiveSync and transfer AutoRun.exe to \Storage Card\AutoRun and transfer AutoRun.txt and AutoRun.rdp to \Storage Card\. The locations for these are hard coded at the moment.
5) Run AutoRun.exe from the Cuwin 3200 and it should start the RDP session, convery the password to the session, and log on to the desktop of the remote computer.
Source Code for AutoRun.exe (VS 2005)
Osler
HOW TO USE:
1) Download the .zip and unzip.
2) Right-click on AutoRun.rdp and select Open With -> Notepad. Edit the settings for ServerName (IPAddress), UserName, and Domain (if needed). The file should look like this:
Code: Select all
Domain:s:<INSERT DOMAIN NAME HERE-LEAVE BLANK IF NOT NEEDED>
MCSPort:i:3389
enablecredsspsupport:i:1
KeyboardFunctionKey:i:12
KeyboardSubType:i:0
KeyboardType:i:4
KeyboardLayoutString:s:0x00000409
DisableFileAccess:i:0
ServerName:s:<INSERT RDP SERVER IP ADDRESS HERE>
BBarEnabled:i:1
EnablePrinterRedirection:i:0
EnableSCardRedirection:i:0
AutoReconnectEnabled:i:1
EnableDriveRedirection:i:0
EnablePortRedirection:i:0
AudioRedirectionMode:i:2
BitmapPersistenceEnabled:i:0
BBarShowPinBtn:i:1
Compress:i:1
StartFullScreen:i:1
KeyboardHookMode:i:2
MaxReconnectAttempts:i:20
ColorDepthID:i:3
bitmapcachepersistenable:i:0
disable cursor setting:i:0
disable themes:i:0
disable menu anims:i:0
disable full window drag:i:1
disable wallpaper:i:0
username:s:<INSERT USER NAME HERE>
autoreconnection enabled:i:1
displayconnectionbar:i:1
redirectsmartcards:i:1
redirectcomports:i:0
redirectprinters:i:0
redirectdrives:i:0
audiomode:i:2
keyboardhook:i:2
compression:i:1
winposstr:s:0,3,0,0,800,600
session bpp:i:24
desktopheight:i:480
desktopwidth:i:800
screen mode id:i:2
3) Open AutoRun.txt in Notepad and put your password on the first line. Keep it simple (lower case, no funky symbols...letters and numbers are ok). Save the file.
4) Connect the Cuwin 3200 via ActiveSync and transfer AutoRun.exe to \Storage Card\AutoRun and transfer AutoRun.txt and AutoRun.rdp to \Storage Card\. The locations for these are hard coded at the moment.
5) Run AutoRun.exe from the Cuwin 3200 and it should start the RDP session, convery the password to the session, and log on to the desktop of the remote computer.
Source Code for AutoRun.exe (VS 2005)
Code: Select all
Imports System.Runtime.InteropServices
Public Class Form1
Declare Sub keybd_event Lib "coredll.dll" (ByVal bVk As Byte, ByVal bScan As Byte, ByVal dwFlags As Integer, ByVal dwExtraInfo As Integer)
Const VK_SHIFT As Integer = &H10
Const VK_RETURN As Integer = &HD
Const KEYEVENTF_EXTENDEDKEY As Integer = &H1
Const KEYEVENTF_KEYUP As Integer = &H2
Const KEYEVENTF_SILENT As Integer = &H4
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.Hide()
Dim CERDP As New Process
Dim I As Integer
Dim PwdFile As System.IO.File
Dim PwdReader As System.IO.StreamReader
Dim Pwd As String
PwdReader = PwdFile.OpenText("Storage Card\AutoRun.txt")
Pwd = PwdReader.ReadLine
PwdReader.Close()
Pwd = Pwd.ToUpper
CERDP.StartInfo.FileName = "cetsc.exe"
CERDP.StartInfo.Arguments = Chr(34) & "Storage Card\AutoRun.rdp" & Chr(34)
CERDP.Start()
Do Until CERDP.Responding = True
Application.DoEvents()
Loop
For I = 1 To 30
System.Threading.Thread.Sleep(100)
Application.DoEvents()
Next
For I = 0 To (Pwd.Length - 1)
SendChar(Pwd.Substring(I, 1))
Next
keybd_event(VK_RETURN, 0, KEYEVENTF_SILENT, 0)
keybd_event(VK_RETURN, 0, KEYEVENTF_KEYUP, 0)
Me.Close()
End Sub
Public Sub SendChar(ByVal ch As Char)
Dim vk As Byte
vk = BitConverter.GetBytes(ch)(0)
keybd_event(vk, 0, KEYEVENTF_SILENT, 0)
keybd_event(vk, 0, KEYEVENTF_KEYUP, 0)
End Sub
End Class
- Attachments
-
- AutoRun.zip
- (6.38 KiB) Downloaded 506 times
-
- HouseBot Guru
- Posts: 757
- Joined: Wed Apr 02, 2003 8:10 pm
- Location: Pelham AL
Re: Touch Panel Controller Solution
This is good stuff. But if I understand correctly (not a given), the only advantage to using the RDP approach instead of a local HB remote client is the ability to display transparency, and possibly avoiding memory limitations in the cuWin with larger themes. Just the same, pretty cool; I'm still interested in pursuing use of the CuWin in one are of my home. Just need to get my head around the $400 or so.
Thanks for your work on this.
Thanks for your work on this.
Steve
Re: Touch Panel Controller Solution
Steve:
Correct - transparency and theme size are the limiting factors for using a local client instead of rdp. I haven't yet created an optimized theme with simple panels and buttons to see how far I can get with a local client. I did try to load my sonos theme (800 x 480) which I thought was relatively simple and it couldn't handle it. The cuwin croaked during panel intialization of the local client. It says there is 64K of RAM....but you actually only have ~32K available after local resources take their piece of the pie.
$399 isn't bad for what you get. Even if you can pick up a thin client from ebay for sub-$100, you still have the problem of interfacing a touchscreen to it. The HP thin clients do have Elo drivers available; however, they don't have a good size for around the house use. IMO, a 7-10" screen is the best and least clunky size to use. Elo touchscreens, though very nice and responsive, ain't cheap. You're going to drop more on the screen than what I paid for this all-in-one solution. This is also about the price I picked up my Smart Displays for and is, IMO, a reasonable expenditure. Just my $0.02.
Osler
Correct - transparency and theme size are the limiting factors for using a local client instead of rdp. I haven't yet created an optimized theme with simple panels and buttons to see how far I can get with a local client. I did try to load my sonos theme (800 x 480) which I thought was relatively simple and it couldn't handle it. The cuwin croaked during panel intialization of the local client. It says there is 64K of RAM....but you actually only have ~32K available after local resources take their piece of the pie.
$399 isn't bad for what you get. Even if you can pick up a thin client from ebay for sub-$100, you still have the problem of interfacing a touchscreen to it. The HP thin clients do have Elo drivers available; however, they don't have a good size for around the house use. IMO, a 7-10" screen is the best and least clunky size to use. Elo touchscreens, though very nice and responsive, ain't cheap. You're going to drop more on the screen than what I paid for this all-in-one solution. This is also about the price I picked up my Smart Displays for and is, IMO, a reasonable expenditure. Just my $0.02.
Osler
-
- HouseBot Guru
- Posts: 757
- Joined: Wed Apr 02, 2003 8:10 pm
- Location: Pelham AL
Re: Touch Panel Controller Solution
Osler - thanks. I think RDP operation would be acceptable; I could even live with the bar at the top. (But it would be interesting to see what the theme size limit these things have.)
I've been using Fujitsu pen tablets (Win-based touch screens). But for something like an in-wall install (and/or where you don't need full theme functionality - a 'thin' theme), they're too clunky (although cheaper than the CuWin). Its just hard to part with $400 with the economy in the toilet.
I've been using Fujitsu pen tablets (Win-based touch screens). But for something like an in-wall install (and/or where you don't need full theme functionality - a 'thin' theme), they're too clunky (although cheaper than the CuWin). Its just hard to part with $400 with the economy in the toilet.
Steve
Re: Touch Panel Controller Solution
Yeah...I hear ya about the economy. The market is like "magic money"....poof, it's gone.
I solved the bar issue. The bar behavior is set in the .rdp file. Currently, you can unpin it and it will disappear when run via AutoRun.exe, just like on the desktop version.
Osler
I solved the bar issue. The bar behavior is set in the .rdp file. Currently, you can unpin it and it will disappear when run via AutoRun.exe, just like on the desktop version.
Osler
Re: Touch Panel Controller Solution
Ok...finally got this up and running. I rewrote the .exe so that you have a screen to fall back to if the connection is lost with a big "CONNECT" button to reinitiate the RDP connection. I also got power-over-ethernet to work with this thing. It is a maximum of 12 watts per specs, so it falls well within the POE protocol for power delivery. So, in a nutshell, it is mounted in the wall with a single Cat-5e cable providing data and power support .
New AutoRun.exe, AutoRun.rdp, and AutoRun.txt files included. Once configured and installed to the SD Card, change the dip switches to have it boot to AutoRun.exe on power up and you are off to the races.
Osler
EDIT: I must apologize for all of the Mama Mia album shots in my themes. My kids seem to love Abba and I don't really know what to do about it.
New AutoRun.exe, AutoRun.rdp, and AutoRun.txt files included. Once configured and installed to the SD Card, change the dip switches to have it boot to AutoRun.exe on power up and you are off to the races.
Osler
EDIT: I must apologize for all of the Mama Mia album shots in my themes. My kids seem to love Abba and I don't really know what to do about it.
- Attachments
-
- cuwin_02.jpg (21.33 KiB) Viewed 11166 times
-
- cuwin_01.jpg (17.42 KiB) Viewed 11167 times
-
- Cuwin SDCard Files.zip
- (7.19 KiB) Downloaded 542 times
Last edited by Osler on Thu Jan 29, 2009 9:39 pm, edited 1 time in total.
Re: Touch Panel Controller Solution
Some pics of the POE injector. It is a 2 jack, surface-mount Cat-5e connector. Brown/Brown-White and Blue/Blue-White are brought out to connect to the power supply. There is another one of these in the wall with the touchscreen to split power away from the data line.
Osler
Osler
- Attachments
-
- cuwin_04.jpg (32.48 KiB) Viewed 11166 times
-
- HouseBot Guru
- Posts: 757
- Joined: Wed Apr 02, 2003 8:10 pm
- Location: Pelham AL
Re: Touch Panel Controller Solution
Thanks for your work on this. I haven't ruled it out, in fact I know exactly where I'd use one. Maybe once I'm feeling flush again I'll spring for one.
-
- HouseBot Guru Extraordinaire
- Posts: 1121
- Joined: Tue Sep 28, 2004 7:49 am
- Location: The Netherlands
Re: Touch Panel Controller Solution
Anybody seen this gadget already? Cool bu expensive...
http://www.hp.com/united-states/campaigns/touchsmart/
Just another smartscreen but it's a nice design and it runs windows
http://www.hp.com/united-states/campaigns/touchsmart/
Just another smartscreen but it's a nice design and it runs windows
Re: Touch Panel Controller Solution
Yes, but for the price I could buy 5 of these Cuwin CE 5.0 devices. The HPs are very nice, though.
Osler
Osler
-
- HouseBot Guru Extraordinaire
- Posts: 1121
- Joined: Tue Sep 28, 2004 7:49 am
- Location: The Netherlands
Re: Touch Panel Controller Solution
I wanted to buy a paceblade A120 at the time.
http://www.paceblade.com/site/desktopdefault.aspx
But these things are also very expensive and I had to run multiple software remotes which dramatically increases complexibilty in my system since lot's of panels pop using script commands. Using multiple remotes would mean multiple scripts etc. So I went for 5 times a 15 inch touchscreen and a VGA splitter. Now all touchscreens show the same screen but in my household that's no problem. The only downside is that the touchscreens aren't portable due to the vga, serial and audio connections whereas a paceblade or hp would be perfect for taking it with you to your sunny terras;)
http://www.paceblade.com/site/desktopdefault.aspx
But these things are also very expensive and I had to run multiple software remotes which dramatically increases complexibilty in my system since lot's of panels pop using script commands. Using multiple remotes would mean multiple scripts etc. So I went for 5 times a 15 inch touchscreen and a VGA splitter. Now all touchscreens show the same screen but in my household that's no problem. The only downside is that the touchscreens aren't portable due to the vga, serial and audio connections whereas a paceblade or hp would be perfect for taking it with you to your sunny terras;)