Click here to Skip to main content
15,437,171 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a machine that is a handheld.
with this machine i can connect to TCP LAN and send and receive data to/from server

i have a function TCP_configuration() //configure the local ip , local port , subnetmask ...

TCP_server_configuration() //configure the server ip and server port

TCP_connect() //make a connection to the server

Send_data() //send a string to the server

all this code in pure C

i connected to the server very well

when i tried to send data the server receive only first and second characters and do not continue to receive the others and continue as i only send the two characters only

after some trying i found that i must send all data to the server from machine before call receive in the server to receive all data right

how can i solve this problem and make the server receive all data without modify the server ?


NOTE: connect / Disconnect / send data / configuring in the machine are made by AT commands


to Connect for example i send ATDT\r to COM2 on the machine

to send data i send the string to COM2 too
Posted
Updated 25-Dec-11 21:02pm
v2

1 solution

As per my understand you are using a GPRS Modem to send data to TCP server using AT commands. can you tell me modem details so that i can help you more.

Check with the AT command Document, for that your AT commands parameters are correct. debug the commands with HYPERTERMINAL , either your modem is sending more that 2 chars.
 
Share this answer
 
Comments
amertarekt 26-Dec-11 3:15am     CRLF
it is not GPRS modem it is LAN modem on this machine it is called EZ-TCP external lan i am sure the machine modem send all data because when i debug the server and wait on receive for the machine to send all data then call receive i receive all the data
amertarekt 26-Dec-11 5:58am     CRLF
when i used Hyper terminal it work well hyper terminal receive all the sent data what is the problem now ?
Rajesh Anuhya 26-Dec-11 7:31am    
What about your server??, is server receiving all the data which is sent by HYPERTERMINAL ???(more that 2 chars).???
amertarekt 26-Dec-11 8:09am     CRLF
can you tell me first how to send a string using hyper terminal to a server i connected to the server by hyperterminal but i tried to write some thing to send it send when i press the first character only i tried my server by c# client and it worked well
Rajesh Anuhya 26-Dec-11 8:12am    
First type data in the notepad, what do you want to send.., copy it, right click on the Hyper terminal window then select "Paste to Host" Option.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900