i am receiving and sending data between pc-chipcon board through serial port .the incomming data is link quality packet.i want to check the value of link quality and by observing the value i should send another signal to increase power in the chipcon board .


iam having problem with the received packet .i dont know how to observe the value of the received packet either in integer or hexadecimal format .the received data from serial port will be in the form of hexadecimal number then how i sould convert the received packet from hexadecimal number to decimal or is there any another way to receive packet in decimal form .can any one tell me how to take the data which i received for manipulating.

this is c++ code to receive data from serial port


....................................................................................
char rs_getch(const int io_port)
{
char rxchar;
BOOL bReadRC;
static DWORD iBytesRead;
bReadRC = ReadFile(hCom, &rxchar, 1, &iBytesRead, NULL);
if (iBytesRead)
return rxchar;
else return 0; // return 0 if no character read
}]
............................................................................

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.