Pocket PC logging now working
#91
Evolved Member
Thread Starter
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
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.
#93
Evolving Member
iTrader: (2)
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.
#94
Evolving Member
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?
#96
Evolved Member
Thread Starter
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
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
#98
Evolving Member
iTrader: (2)
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...
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...
#99
Evolved Member
Thread Starter
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.
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.
#100
Evolving Member
iTrader: (2)
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
- 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
#103
Evolved Member
iTrader: (25)
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
http://nextelonline.nextel.com/NASAp...eSKU=PPC6800SP
#105
Evolved Member
iTrader: (25)
http://www.sprintpcs.com/flash2/idem...6800SP&xType=2