Welcome! Log In Create A New Profile

Advanced

Pocket Pc / Windows CE Host For Gcode

Posted by Michael.Duffin 
Pocket Pc / Windows CE Host For Gcode
March 15, 2009 11:03AM
Hi I am writing a Arduino Host for the Pocket Pc / Windows CE Platform.

Currently it should work on any device which supports the .net Compact Framework 2.
This include PocketPc 2003 SE? devices and above and Windows Ce.Net devices ver 4.0 and above. I have only implemented support for manual G-Code entry. Reading a file in will be easy though (working on syntax checking now!)

I have tested it with a Viewsonic Airpanel 100 (Large ce.net PDA) and works a treat even with USB. Provided the device has USB host then drivers for the FTDI chip are available else simply use RS232.

The attached photo is a bit rubbish, really just to show there are some nice big ce devices out there which would make a great replacment for your PC. You can pick something like this up for less that £30. It has a nice big 10" screen and 800x600 resolution.

If anyone is interested in helping develop/test please let me know.

I think the Arduino is fantastic, I dont intend to use this for a RepRap machine, I am actually using it to control a small 3 axis router but as I have had a lot of help from RepRap forum members I'd like to offer a little back.

Michael.
Attachments:
open | download - Image0009.jpg (431.6 KB)
Re: Pocket Pc / Windows CE Host For Gcode
March 15, 2009 06:25PM
Almost finished...

Added support for importing of .gcode files, Manual Jogging and some basic syntax checking of gcode.

Have compiled versions for PPC2003 and CE.NET>4.0

If anyone would like to try please let me know, Also let me know what device you are using. More importantly the resolution of your devices display so as I can fit all of the controls on your screen.
Re: Pocket Pc / Windows CE Host For Gcode
April 06, 2009 08:10AM
Excellent. I had been thinking about using pocket PC's to get a more fully featured interface at low cost. I don't have any .NET knowledge, however, so I didn't get to that (and probably never would have!)

I like your solution a lot... this means that you'll have a color screen and a PC independent RepRap and (in my case) you can use your old smartphone for this. I'd have to make a cable to get serial working. If the software works on my 320x240 device, I'll definitely give it a go!

A Jog dial to move XYZ axes would also be a great feature. Also, a temperature display. But I know I'm asking a lot smiling smiley


Regards,

Erik de Bruijn
[Ultimaker.com] - [blog.erikdebruijn.nl]
Re: Pocket Pc / Windows CE Host For Gcode
April 06, 2009 02:30PM
Hi Erik,

The .Net Compact framework is very easy to work with as easy as Qbasic was way back...

I have a stable working version for my Windows Ce 4.0 tablet, I can load and run Gcode and manualy Jog the machine.

I use USB as my device supports USB host as do many other PDA's HPC's, Check on Pinouts.ru to find out If your device does support USB host. I can give you PocketPC Drivers for the FTDI USB chip if it does.

I'll rescale the app for 320x240 as my device is 800x600 for you in the next day or so as i'm off work, I have not currently implemented the Temp readout but could also do that aswell easily enough. I will also post the source code at some point if you want to have a play with it.

Do you use your device in Landscape or Portrait? Let me know & i'll upload a copy, Also make sure you are able to install the Compact .NET 2.0 redistributable on your device first.

Glad someone thinks it could be usefull I have a few old PocketPc's that are really worthless but would make brilliant CNC controllers / Reprap Gcode hosts. Touchscreen and the lot!!

Thanks

Mike.
Re: Pocket Pc / Windows CE Host For Gcode
April 06, 2009 02:49PM
Ah, good old qbasic. Used that 12 years ago to learn to program when I was 14 years old. I guess it should be easy winking smiley

I don't have windows, so I guess I still need that and need MS virtual studio etc. I've got so many IDE's already, Netbeans, eclipse, arduino, etc. I'm hesitant to invest in yet another, and I prefer a completely open environment since most future phones will support Android/Linux, so unless I'm seriously going to play with it. Still, there are so many windows CE devices out there that your solution would be valuable.

About my particular device: Normally the device is in portrait. But the shape/form doesn't favour one direction or the other. And if this interface works, I might integrate it into a 'front panel' that controls the entire machine.

I don't think it has a USB host, but I'll see. I does act as a USB device (gadget mode). Apart from taht, at least there is a UART on the device. I already have a cable that served to connect a GPS to. I could probably reuse that to quickly get it to control the arduino over serial.

Thanks for the trouble so far. Don't go through too much trouble for my specific situation, though!

Erik


Regards,

Erik de Bruijn
[Ultimaker.com] - [blog.erikdebruijn.nl]
Re: Pocket Pc / Windows CE Host For Gcode
April 06, 2009 03:01PM
Erik,

No problem at all, What version of CE are you running? PocketPC2003, WM2005...?

Mike.
Re: Pocket Pc / Windows CE Host For Gcode
April 06, 2009 03:24PM
Cool smiling smiley

WM5... I guess that's WM2005, right? I assume there's some backward compatibility, so you might compile it for an older version for wider support?

It would be COM5 or COM7 if I recall that would interface to the GPS. That would be the UART I can probably use.


Regards,

Erik de Bruijn
[Ultimaker.com] - [blog.erikdebruijn.nl]
Re: Pocket Pc / Windows CE Host For Gcode
April 06, 2009 04:39PM
Sorry should of asked if it is Smartphone edition?

In Visual Studio I have 2 options for target device either Windows Mobile/Pocket PC or Smartphone.

It should run on any OS with .net compact framework v2, PocketPC 2003 and up as far as I know or wince 4.0 and up.

It should automaticly detect and list all found COM ports for you to select the correct one.

Mike.
Re: Pocket Pc / Windows CE Host For Gcode
April 06, 2009 06:47PM
It's not a smartphone but pocketPC / WM5.

Cool @ COM detection! Seems like a fully fledged host! I only need it to feed the machine with G-Code, no fancy gui stuff needed IMHO. Yet it could display a web-page with a picture of the layer being built, or anything for that matter that you wish to send from a PC. It would also be great if it could poll a page to download G-Code (from a HTTP based 'printer spool'). The other way around would be a webserver on the PocketPC that serves a web-interface and an upload feature.

This would make the machine:
- stand alone
- but still controllable by any PC.

But I'm getting way ahead of myself. winking smiley

I get carried away when someone makes something nice. I start imagining 'the ultimate system'.

I'm eager to try it whenever you've got something!


Regards,

Erik de Bruijn
[Ultimaker.com] - [blog.erikdebruijn.nl]
Re: Pocket Pc / Windows CE Host For Gcode
April 07, 2009 05:07AM
Have tried to squeeze it onto a 240,320 display....

Have attached first PPC version. The main form looks Ugly as I need to move the manual GCode entry stuff and Jogging to its own form. At the mo you need to scroll the screen left to right to reach some controls. But can sort easily if it works on your device. Also Jogging Increments & Speeds are all only working in MM the default units in the config file is not yet checked but again I don't mind sorting all that If I know it works on other devices than my own.

First thing you need is the .net 2.0 redistributables, get it from

[www.microsoft.com]

Unless your device already has that version framework on it?

Then copy the executable in my rar file to where you like on your PPC, on first run it will ask you to go into settings, Select your com port from the list and put a value in for each setting even if your not sure you can still change them later. Then click connect and try it.

Let me know if you have any problems michael at mickduffin dot com.

Mike.

Edited 1 time(s). Last edit at 04/07/2009 05:40AM by Michael.Duffin.
Attachments:
open | download - Release.rar (14.2 KB)
Re: Pocket Pc / Windows CE Host For Gcode
April 07, 2009 06:37AM
You're quick Mike!

I've put the files on an SD card to try them, but I'm still waiting on a charge. It's been in a drawer for quite a while. If I get it running I'll make a cable and see if I can actually use it to 3D print something!


Regards,

Erik de Bruijn
[Ultimaker.com] - [blog.erikdebruijn.nl]
Re: Pocket Pc / Windows CE Host For Gcode
April 07, 2009 06:50AM
No probs,

If it even jogs or you can enter code manually it should work with any .gcode input file.

Cant wait to see how it works on your device.


Mike.
Re: Pocket Pc / Windows CE Host For Gcode
April 07, 2009 07:36AM
Program runs fine! (already had a working .NET 2.0 version, apparently)

I must say that it's already a very decent app!

I can load gcode and I've configured it. I need my car to get the cable. Hopefully my girlfriend will be home with it soon. Meanwhile I can work on rewiring the machine. I had made an SPI SD card reader that is no longer needed now. This solution is far better smiling smiley


Regards,

Erik de Bruijn
[Ultimaker.com] - [blog.erikdebruijn.nl]
Re: Pocket Pc / Windows CE Host For Gcode
April 07, 2009 08:30AM
Good,

Like I say they are a few things not properly implemented on it but will sort them in a day or two if you manage to get it working on yours.

Strange I was thinking of making a MMC card reader to hold GCode, Again don't need to now with this. My PPC has wifi so can map network drive and use that as a folder to automaticly spool jobs from.

Also thought about using an asp web server for pocket pc (forgot what its called now) to send jobs to the arduino as they are uploaded through a webpage.

Mike.
Re: Pocket Pc / Windows CE Host For Gcode
April 07, 2009 10:35AM
Hi Mike,

I just made a cable that should (in theory) work. But now it says "Port not available or already connected". I can only choose COM3, which could be right, but it could also be another port. When I try to run a manual G-Code, after +/- 5 seconds it says "Comms error". I cannot differentiate this result from when it is not connected at all.

The UART can handle 115200 bit/s
[pdadb.net]

I'm using it with a Sanguino at 115200. What baud rate does your program use by default? Perhaps that is the reason why it doesn't work?

Also, I cannot enter setup that, but when I restart the app I can get in the setup menu.


Regards,

Erik de Bruijn
[Ultimaker.com] - [blog.erikdebruijn.nl]
Re: Pocket Pc / Windows CE Host For Gcode
April 07, 2009 11:09AM
That should be the problem I am using an Arduino at 19200!! Good though now I know to allow user to select speed okay!!


Try this version.

Mike.
Attachments:
open | download - Release.rar (14.6 KB)
Re: Pocket Pc / Windows CE Host For Gcode
April 07, 2009 11:18AM
Actually mate looking at my code suggests that the error your receiving is the result of a caught exeption when trying to open the port, It is more likeley that another app eg Activesync is using that port.

To prove comms between your ppc and Sanguino first download a basic terminal package and manually connect if it works you should get "ok" back from the firmware, If not then It must be down to the com port on the device.

However you would still need the second version software for 115200 bit/s.

Let me know.
Mike.
Re: Pocket Pc / Windows CE Host For Gcode
April 07, 2009 12:39PM
Hi,

ActiveSync is not in 'my running programs'.

I've been trying all kinds of baud rates and COM port numbers to no avail. I used a known-to-work GPS device. Also, I use 8 data bytes and 1 stop bit (it works with this setting under linux).

Then I went searching. From this linux kernel boot on the HTC Blue angel (my device) I got this:
<6>[ 1.400000] TI Calypso / HTC firmware GSM UART line discipline
ver 0.1<6>pxa2xx-uart.0: ttyS0 at MMIO 0x40100000 (irq = 15) is a
FFUART
<6>[ 1.420000] pxa2xx-uart.1: ttyS1 at MMIO 0x40200000 (irq = 14)
is a BTUART
<6>[ 1.440000] pxa2xx-uart.2: ttyS2 at MMIO 0x40700000 (irq = 13)
is a STUART
<6>[ 1.450000] pxa2xx-uart.3: ttyS3 at MMIO 0x41600000 (irq = 0) is
a HWUART

COM1 = ttyS0, COM2 = ttyS1, etc. (at least I think so...)

This means that:
COM1 = GSM
COM2 = Bluetooth
COM3 = STUART (serial transfer uart??)
COM4 = HWUART (hardware UART, I guess)

There's probably not much you can do about it, but if you have pointers.

B.t.w. where do you get the COM3 from, which is in the list in the MD-CECNC configuration? Is it detected or assumed?


Regards,

Erik de Bruijn
[Ultimaker.com] - [blog.erikdebruijn.nl]
Re: Pocket Pc / Windows CE Host For Gcode
April 07, 2009 12:55PM
Hi,

The app should get the friendly name of all com ports from the registry, However there may be a problem with that so ive modded the software to allow you to enter any com port 1 - 9 also enter baud rate manually.

If you still have no luck try and find a free or demo terminal program for pocketpc and verify your device is working correctly.

Mike
Attachments:
open | download - Latest Release.rar (14.9 KB)
Re: Pocket Pc / Windows CE Host For Gcode
April 07, 2009 01:01PM
I made some progress:
1. I had to turn off receiving incoming beams.
2. It was COM1 after all.
3. Stopbit=2 gives garbage. It is garbage at the correct interval (test program that outputs a few lines). Stopbit=1 won't open the COM1.

I see (just now) that you have a new release again! I'm going to try it now!

B.t.w. I had been using a terminal program (putty should work fine for serial comms too)


Regards,

Erik de Bruijn
[Ultimaker.com] - [blog.erikdebruijn.nl]
Re: Pocket Pc / Windows CE Host For Gcode
April 07, 2009 01:13PM
Hi Mike!

I see the interface is a lot better now. I like how it's full screen and everything fits. I can't wait for the progress bar to actually display the print progress! smiling smiley

For now I'm still stuck with the comms problem in putty. I'll try another terminal. First I'm going to cook a meal!


Regards,

Erik de Bruijn
[Ultimaker.com] - [blog.erikdebruijn.nl]
Re: Pocket Pc / Windows CE Host For Gcode
April 07, 2009 01:47PM
No problem, To test I used a terminal app and sent an ascii string G1 X100
the Arduino/Sanguino would then run the move and reply with "ok" when complete.

I now also have the app working on a Toshiba E400 240x320 PocketPc 2003 SE device, I am using USB to connect the toshiba to the Arduino and works fine with ce ftdi drivers.


My App is configured to work with

StopBits=1
DataBits=8
Parity=None

This is correct for the Arduino G-Code Firmware, If anyone knows if the Sanguino in anyway differs let me know and i'll implement support for that.

Just looked at Sanguino firmware
ver(0.4) Converted to Sanguino version by Adrian Bowyer---

And it seems that is configured at 19200?


Mike.

Edited 1 time(s). Last edit at 04/07/2009 02:16PM by Michael.Duffin.
Re: Pocket Pc / Windows CE Host For Gcode
April 07, 2009 03:46PM
I set the baud rate correctly each time. This is not the problem anymore. I get bidirectional communication on COM1, but the stopbit is wrong (should be 1 for 8n1), so the characters are not normal ascii codes. When I use stopbit 1 it doesn't work ("Unable to open connection to COM1:") I'm a little bit stuck here.

I guess it has to do with the request to send (RTS) that will not be ignored by the device. In 8n2 mode it might ignore it (no hardware buffering).

B.t.w. My PocketPC uses a proprietary plug and this one doesn't have USB, only serial. confused smiley It would be difficult to use USB, if at all technically possible.

With your latest version I just get a list of com ports 1 through 9. Perhaps this code is useful to get even more information about devices:
[www.codeproject.com]

I've also tried the built in WM5 com port splitter that will create virtual com ports for multiple applications to read serial at the same time (for GPS sharing). Couldn't access this port either.

I guess my device isn't really suitable. A real shame, because I really liked your app and the way it would upgrade the RepRap.


Regards,

Erik de Bruijn
[Ultimaker.com] - [blog.erikdebruijn.nl]
Re: Pocket Pc / Windows CE Host For Gcode
April 07, 2009 04:02PM
Wierd.......

When you used a GPS on the PPC i'm guessing it as 4800 8,n,1 ? Did that work on COM1 is it possible its something else like a Bluetooth device simply echo'ing?

If it is definatley COM1 and your GPS worked fine then I can only assume you may need to reduce the baudrate in your sanguino firmware?

If all else fails I bought my PPC of ebay for £7! was toshiba E400

Also latest release attached now has temp reading + other bug fixes


Mike.

Edited 1 time(s). Last edit at 04/07/2009 04:19PM by Michael.Duffin.
Attachments:
open | download - Latest Release.rar (14.8 KB)
Re: Pocket Pc / Windows CE Host For Gcode
April 08, 2009 10:56AM
If I can get one at the same price range I'll definitely get myself a different device! I could find one at around 50 euro's, slightly too expensive for a device introduced > 4 years ago. I'm actually looking for something with WIFI.

I assume there's no full usb plug on the toshiba PDA. How do you get USB off it? Do you use the USB cable that normally goes into the PC (host) and use it the other way around?


Regards,

Erik de Bruijn
[Ultimaker.com] - [blog.erikdebruijn.nl]
Re: Pocket Pc / Windows CE Host For Gcode
April 08, 2009 12:36PM
Like your device it has a proprietary plug,

But it does have pins for USB HOST, I had to make an adapter much like your serial adapter, The PDA will even power the Arduino over USB.

If you search for a pinout of and PDA your interested on pinouts.ru that will tell you if the device has pins for USB HOST, However be sure it is HOST and not just CLIENT my device has both. I also have a Viewsonic airpanel its a 10" tablet that runs ce.net that does have a normal USB port on it, Its kind of better as everything can be big enough to control with your finger without the need for a stylus.

Please feel free to email me michael at mickduffin dot com if you find a PDA and would like to know if it would be suitable.

Mike.
Re: Pocket Pc / Windows CE Host For Gcode
April 09, 2009 03:25AM
Thanks for the info! I'll be looking out for a tablet PC / Pocket PC.


Regards,

Erik de Bruijn
[Ultimaker.com] - [blog.erikdebruijn.nl]
Re: Pocket Pc / Windows CE Host For Gcode
September 17, 2013 04:58PM
I dont know if you all are still trying this but I just bought a dell axim x30 with a 667mhz processor. I want to be able to run my printer from it. Any help would be greatly appreciated.


--------------| For Everything |--------------------------
Check it out here:
[reprapsquad.wordpress.com].
---------| For Everything Prototype Related |------
Now featuring comp case mods:
[RepRapLab.wordpress.com]

--------------| Find us at Twitter|------------------------
@REPRAPSQUAD (RS Main)
[mobile.twitter.com]
@REPRAPSQUADHQ (ProtoLab)
[mobile.twitter.com]
Re: Pocket Pc / Windows CE Host For Gcode
February 21, 2014 01:14AM
Haven't tried it yet, but thank you for hopefully making my device useful again.
Sorry, only registered users may post in this forum.

Click here to login