Sir,
I had an query on this program, I tried to execute this program onto my device but it is not working , is this only meant for emulators?
Regards
Naveen
Printable View
Sir,
I had an query on this program, I tried to execute this program onto my device but it is not working , is this only meant for emulators?
Regards
Naveen
not only for emulators, but should also work on any windows ce based device. what exactly is happening?Quote:
Originally Posted by chaps5555
First i want to tell u it is working fine with emulator. I have got pocket pc 2002 which has got serial port with its cradle.I want to acces the serial port and send and receive data from my hardware device . when i am debugging it on my device it is not able to read any thing.wht reallt hapeens if i senpto my device it responds with p back that shows transmission has occured . but when i am sending p it is not returning anyhting.but if i use it with emulator it is working fine.
What can be the problem.
Regards
Naveen
it's hard to tell what's wrong as i know nothing about the devices you're using.
again, i suggest to check all the settings in the code (DCB, ...) as well as the settings of the devices. i also recommend in such cases, to download some terminal application for wince and try how that one is behaving (search google for "vxHpc", there's a free trial download).
i could also imagine that there's some hardware incompatibility between the handheld and you device...
what is vxHpc? how will it help me.Can you tell me in my program i am opening Com1 that is com1 for my cpu that i through emulator.I attach me harware with a serial cable between my transreceiver and my pc ' Com1 which i am am opening through the program.But when i am downloading same program on real device wht should be the port number how will it recognise the cradles serial port.As i tried com1 to com40
UI am sending u piece of code
port.OpenPort("com1");
port.ConfigurePort(CBR_38400,8,0,NOPARITY ,ONESTOPBIT );
unsigned char data;
label1:
port.WriteByte('p');
port.WriteByte('q');
port.WriteByte('r');
::Sleep(5);
port.ReadByte(data);
port.ReadByte(data);
port.ReadByte(data);
at open .port i am opening com1 what should i write for pocket pc device 2002.
Regards
Naveen
first of all, your code did not help me much, as you seem to be using some (custom) software components that i don't know. what i'm trying to say is: what kind of object is your "port"????? :confused:
which com port you should use on your handheld device depends on the device itself! i dealt with devices where the port was no. 1, on others it was 6...
vxHpc is a terminal program that let's you connect via serial interface and send/receive characters (i.e. you type "p" and see what the other device returns).
!!!!!!!!! generally spoken, and that's true for everyone who's dealing with serial communication, YOU WILL NEED A TERMINAL PROGRAM AND MUST KNOW HOW TO USE IT! otherwise, finding errors will be very very hard at certain points. !!!!!!!!
finally, did you connect the device you're trying to communicate with directly to your handheld (or it's cradle), or did you try to connect to the device while it is connected to your cpu?
/miaou :sick:
i tried to connect the device ( it is juz a transreceiver with serial port with it.)directly to the cradle which has got serial port .My handheld dont have serial port its cradle has. i am not able to check wht is it number also is it com1 2 , or anyhting.
Regards
Naveen
again: try to connect to the device using a terminal program. when you were able to connect with the terminal program, continue testing with you self-written app.Quote:
Originally Posted by chaps5555
i am trying to connect the device through terminal program , it is juz showing intializing and not moving ahead .
regards
naveen
well, then there's something wrong in your serial connection.Quote:
Originally Posted by chaps5555
unfortunately, i don't think i can help you with this as i don't have the hardware you're using on my desk... consult the documentation of your devices for any further hints or search the web for some info on your transmitter.
sorry that i can not help you on that issue, but feel free to ask anything when you've got any questions concerning the code.
can i use the terminal program with my pocket pc and another pc wich does not have active sync.
regards
naveen
hey it worked
the code is really good but u require an additional hardware i.e null modem cable between pda serial port and the device .
http://www.waterlog.com/App%20Notes/...roduction.html
i am posting that this thread helps guyz in future.
And thanks to reset -leo for his generous help and support.
Regards
Naveen
i knew that there was something wrong with the serial connection... :cool:Quote:
Originally Posted by chaps5555
your welcome!
Hi,
I have a similar problem., but with some changes.
I need to comunicate through the serial connection of my PPC.
But i dont want to comunicate with the COM port of any PC or device.
I will have one switch (on/off, open/close) connected into my PPC (qtek 2020) through it's serial connection.
I just want to know if the switch is opened or closed.
Will i have to use the same code?? Open, read, write, close the COM port???
If i understood what all you had been saying, when you say Open, read, write, close the COM port you are talking about the PC COM port, not the PPC COM port, right???
Any one can help??
Thanks in advance,
Ventura
we were talking about the com (serial) port of the ppc. using mfc, there is no difference in the function calls to open, read, write, ... between pc and ppc.Quote:
Originally Posted by V3N7UR4
i think what may work is to connect one side of the switch to the tx pin of the serial port and the other side to the rx pin. then you send one character on the serial port (using Write()) and immediately call Read(). if read returns the character you sent, the switch is closed. if nothing is received, the switch is open!
i can in no way guarantee that this works, but it's the easiest thing i can imagine. of course, you may need some more electronics to connect the switch to the serial port, but i can not help you with that... don't blame me if you blow up your ppc's com port with such experiments ;)