Windows XP Community - XPHeads



Need Help 1-Wire on XPE

microsoft.public.windowsxp.embedded


Reply
  #1 (permalink)  
Old 06-17-2008, 06:42 PM
DavidW
 
Posts: n/a
Need Help 1-Wire on XPE
Hi,

I have problem to reading from 1-Wire DS1991 that connected to COM2:

My problem is:

I have my shell application that after 1 second window timer delay, launch
my UtilApp.

In my Utillapp I use

1. Call to TMExtendedStartSession - and it is OK

2. Call TMSetup and here I got an error. (The port not ready.

When I run the UtilApp again (double click on UtilApp.exe), the application
read the DS1991 correctly.



I thing that the problem is that my UtilApp run before the system make the
COM2: ready.

I would like to know how I can control that the COM2 is ready before the
UtilApp is started to run.



Thanks,

David.






Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 06-19-2008, 12:48 PM
Mike Warren
 
Posts: n/a
Re: Need Help 1-Wire on XPE
DavidW wrote:

> I thing that the problem is that my UtilApp run before the system
> make the COM2: ready.
>
> I would like to know how I can control that the COM2 is ready before
> the UtilApp is started to run.


This surprises me as I find that real COM ports are ready very early.

Or is this a USB COM port? that would definitely make a difference.

Anyway, I suggest that from your shell app you attempt to open COM2 in
a loop until it succeeds and then run the main app.

Delphi code, but you should get the idea. :-)

for Loop := 1 to 20
begin
if SuccessOpenPort(Com2) then Break;
Sleep(500);
if Loop = 20 then ShowMessage('Unable to open COM2');
end;



--
- Mike
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 06-19-2008, 06:16 PM
DavidW
 
Posts: n/a
Re: Need Help 1-Wire on XPE
Thanks Mike,
This is a real COM, The boud is PCM-9375 from Advantch.
David

"Mike Warren" <miwa-not-this-bit@or-this-csas.net.au> wrote in message
news:xn0frmn7qaasay001@news.microsoft.com...
> DavidW wrote:
>
>> I thing that the problem is that my UtilApp run before the system
>> make the COM2: ready.
>>
>> I would like to know how I can control that the COM2 is ready before
>> the UtilApp is started to run.

>
> This surprises me as I find that real COM ports are ready very early.
>
> Or is this a USB COM port? that would definitely make a difference.
>
> Anyway, I suggest that from your shell app you attempt to open COM2 in
> a loop until it succeeds and then run the main app.
>
> Delphi code, but you should get the idea. :-)
>
> for Loop := 1 to 20
> begin
> if SuccessOpenPort(Com2) then Break;
> Sleep(500);
> if Loop = 20 then ShowMessage('Unable to open COM2');
> end;
>
>
>
> --
> - Mike



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 06-20-2008, 02:37 AM
Mike Warren
 
Posts: n/a
Re: Need Help 1-Wire on XPE
DavidW wrote:

> This is a real COM, The boud is PCM-9375 from Advantch.


Is it possible to do what I suggested and poll the port from your shell
program until it's available?

At least you could do that as a test that it really is the cause of
your problem.

--
- Mike
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 05:47 AM.








Design by Vjacheslav Trushkin for phpBBStyles.com.
Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0

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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74