Notices
ECU Flash

Pocket PC logging now working

Thread Tools
 
Search this Thread
 
Old Jun 30, 2007, 01:46 AM
  #91  
Evolved Member
Thread Starter
 
jcsbanks's Avatar
 
Join Date: May 2006
Location: UK
Posts: 2,399
Likes: 0
Received 5 Likes on 4 Posts
Sounds good, but I'm just about to go away.

I have downloaded the code and will look at it whilst I'm away.

Thanks! I suspect I can learn about making a nice object orientated program from looking at this as well

Last edited by jcsbanks; Jun 30, 2007 at 02:21 AM.
Old Jun 30, 2007, 09:40 AM
  #92  
Evolving Member
 
evo828's Avatar
 
Join Date: Apr 2007
Location: Slovakia
Posts: 195
Likes: 0
Received 1 Like on 1 Post
The FTDI support means it will work will FTDI or Tactrix cable if we've got FTDI drivers working first?
Old Jun 30, 2007, 11:16 AM
  #93  
Evolving Member
iTrader: (2)
 
galvitron's Avatar
 
Join Date: Sep 2004
Location: South Bay
Posts: 287
Likes: 0
Received 0 Likes on 0 Posts
evo828, Yes that is correct. I guess I didn't mention the details for anyone else... OS for the device can be any of these: - PocketPC 2003 - PocketPC 2003 SE - WinCE 4.X - Windows Mobile 5.0 PocketPC - Windows CE 5.0 - Windows Mobile 6.0 (All versions) NOTE: Smartphone editions of these OS's may have User Interface issues... COM communication is done by modifying your ROM to handle a different baudrate. Typical for this scenario, and the one jcsbanks is using, is 19200 baud. Then a regular serial cable can handle logging (no tactrix cable needed). To use the tactrix cable you MUST use a device that has a USB host controller chip on the device. According to the official USB specification, all mini host plugs will have a gray plastic connection on the device side (as opposed to black for non-hosts). Unfortunately manufacturers do not strictly follow this so the only way to know is to try. FTDI guys confirm that the Toshiba e405 and e805 will support this. You can pick them up used on ebay for as little as 30 USD. These devices require an adapter cable for the tactrix cable. All devices using the tactrix cable must have the device recognised by Windows and then be asked for a driver file ( point to the tactrix cable ). I don't beleive anyone has successfully done this yet, but it will happen as the technology required is all there... The file needed to setup your handheld is in Logger\Logger Setup\Release\LoggerSetup.CAB. Simply copy this file to your device via ActiveSync (put it anywhere) and the run it on the handheld. It will install a shortcut to Start->Programs. Enjoy, and post any results.

Last edited by galvitron; Jun 30, 2007 at 11:30 AM.
Old Jun 30, 2007, 12:56 PM
  #94  
Evolving Member
 
evo828's Avatar
 
Join Date: Apr 2007
Location: Slovakia
Posts: 195
Likes: 0
Received 1 Like on 1 Post
Thanx - the only hardware piece that I'm missing is the adapter cable (Acer n50 has USb Host controller). The PDA is running on Windows Mobile 2003 - do you think that would be working?
Old Jun 30, 2007, 08:06 PM
  #95  
Evolving Member
iTrader: (2)
 
galvitron's Avatar
 
Join Date: Sep 2004
Location: South Bay
Posts: 287
Likes: 0
Received 0 Likes on 0 Posts
Definitely. Windows Mobile 2003 = PocketPC 2003
Old Jul 7, 2007, 05:07 AM
  #96  
Evolved Member
Thread Starter
 
jcsbanks's Avatar
 
Join Date: May 2006
Location: UK
Posts: 2,399
Likes: 0
Received 5 Likes on 4 Posts
galvitron, I can't get the logging to work with the logger you posted. With the proliferation in complexity and complete redesign you've done I'm afraid I don't know where to start debugging it either!

A few issues I can see:
- non unique logging filenames and problems closing them produces errors when a log fails to start and you retry it within a minute, this seems to sometimes hang the OS and the device needs to be restarted
- when logging is supposed to start, no data seems to be being returned and sometimes the application locks up instead of returning to the start screen
Old Jul 9, 2007, 09:24 AM
  #97  
Evolving Member
iTrader: (2)
 
galvitron's Avatar
 
Join Date: Sep 2004
Location: South Bay
Posts: 287
Likes: 0
Received 0 Likes on 0 Posts
OK, sorry about that. Like I mentioned before I don't have the cable working yet...

I will take a look here shortly.
Old Jul 9, 2007, 09:58 AM
  #98  
Evolving Member
iTrader: (2)
 
galvitron's Avatar
 
Join Date: Sep 2004
Location: South Bay
Posts: 287
Likes: 0
Received 0 Likes on 0 Posts
John,

The logfilename default when the program starts should be unique. But I did allow the user to change it...I am using a datetime format of: "MMddyyyyhhmm" in the form load.

I think the write timeout is an issue here. If I remember correctly, you had it set to infinite (-1) and I set it to 500 instead because if no response came from the first write it would hang indefinitely. I will tinker with that some more.

To help with debugging I will explain the basic layout of the code...

The program creates a Com class (either normal serial port based or FTDI based) and starts it up. It then uses the timer like in your original app to send/receive. I wrapped up the send and receive functions so that there could be a generic function that handles both types of communication. It is actually less complicated than the code looks.

I will do some more testing...
Old Jul 9, 2007, 10:46 AM
  #99  
Evolved Member
Thread Starter
 
jcsbanks's Avatar
 
Join Date: May 2006
Location: UK
Posts: 2,399
Likes: 0
Received 5 Likes on 4 Posts
I have the readtimeout set to 500 as well (I set it in the code rather than the designer) and then use a try... catch timeoutexception.

I did some quick and dirty stuff with the -9999 values though, but that shouldn't cause any trouble, but it was a bit of the code I really didn't like.
Old Jul 9, 2007, 10:59 AM
  #100  
Evolving Member
iTrader: (2)
 
galvitron's Avatar
 
Join Date: Sep 2004
Location: South Bay
Posts: 287
Likes: 0
Received 0 Likes on 0 Posts
Okay, I see a couple of problems within the start button handler.

- After the panels are enabled and before the com port class is created (around line 571), there needs to be a Me.Refresh() command.

- In the while loop below that (still in the start button handler), right after it does a Stop command on the com class (line 641, inside the try) it needs:

If Not fp Is Nothing Then
fp.Close()
End If

- What I said above about the timer is inaccurate...it uses the while loop with Application.DoEvents
Old Jul 11, 2007, 05:36 PM
  #101  
Evolved Member
iTrader: (25)
 
Thoe99's Avatar
 
Join Date: Jun 2003
Location: Orlando, FL
Posts: 2,199
Received 18 Likes on 12 Posts
Would this be able to hook up with a wideband and log data somehow?
Old Jul 11, 2007, 05:39 PM
  #102  
Evolving Member
iTrader: (2)
 
galvitron's Avatar
 
Join Date: Sep 2004
Location: South Bay
Posts: 287
Likes: 0
Received 0 Likes on 0 Posts
What kind of wideband do you have? There may be an issue with connecting more then one device (ECU and Wideband) at the same time to a pocketPC
Old Jul 11, 2007, 06:18 PM
  #103  
Evolved Member
iTrader: (25)
 
Thoe99's Avatar
 
Join Date: Jun 2003
Location: Orlando, FL
Posts: 2,199
Received 18 Likes on 12 Posts
Innovate LC-1. I'm thinking about getting one of these phones, and wanna run it by you guys to make sure it works before I get it.

http://nextelonline.nextel.com/NASAp...eSKU=PPC6800SP
Old Jul 12, 2007, 02:08 PM
  #104  
Evolving Member
iTrader: (2)
 
galvitron's Avatar
 
Join Date: Sep 2004
Location: South Bay
Posts: 287
Likes: 0
Received 0 Likes on 0 Posts
That phone will not work with JCSBanks' logger. You need a windows phone.
Old Jul 12, 2007, 02:19 PM
  #105  
Evolved Member
iTrader: (25)
 
Thoe99's Avatar
 
Join Date: Jun 2003
Location: Orlando, FL
Posts: 2,199
Received 18 Likes on 12 Posts
Originally Posted by galvitron
That phone will not work with JCSBanks' logger. You need a windows phone.
My bad, I guess you have to put in the zip code for that link to show up properly, but it's the Mogul™ by HTC, has Windows Mobile 6.0. I managed to get a 360 view link below to work:

http://www.sprintpcs.com/flash2/idem...6800SP&xType=2


Quick Reply: Pocket PC logging now working



All times are GMT -7. The time now is 07:00 PM.