Yes you are right, I don't really know what I am doing. Can you explain it to me please?
At this stage I know how to write a file to the Com port. One of the commands write a ping request to the LCD screen but I don't know how to read the data back from the LCD screen?
This is the latest readFile() code that I have
How does that look?
void receive_packet(COMMAND_PACKET *packet)
unsigned char buf;
unsigned long len;
ret = ReadFile(handle,
if(len > 0)
//if(trace == 1)
printf("read char %d\n", (int)buf);
But when I open a hyperterminal I know that I am not reading anything?
these are the list of commands that I call in the main()
Can you tell me what I am doing wrong?
outgoing_response.command = 0; // coomand to send ping
outgoing_response.data_length = 0;
I really dont know how to intercept or catch the response from the command?