Click here to Skip to main content
15,921,452 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi guys,

I work for a company that provide service to track vehicles with gps devices, rigth now I need to find a way to send commands to an enfora devices over the air using the tcp protocol, I have tried many ways with no results unfortunately. I just can send commands via sms.

I would like to send commands to request the current position, to open doors, etc.

This is the code how I sent AT commands to other brands and it works like a charm!
C#
var toBeSend = Encoding.ASCII.GetBytes(msj);
tcpClient.Client.Send(toBeSend);

What can be the problem, anyone knows?

If anyone have a script no matter if it is in c#, Java, PHP, Python, etc. please share it with me.
Posted
Comments
Dave Kreskowiak 27-Jan-15 18:01pm    
I think you're going to have to be a bit more specific about what this thing supports. You say that you can send commands to it over SMS. OK, that has nothing to do with TCP/IP.

Does the device even support it? You don't say. If so, how? Over what interface?

1 solution

Hi, did you solve your problem? I’m able to send commands via TCP with no problems but it seems like the device is ignoring them. How is the package format you’re using? Could you provide an example byte per byte of a valid AT command sent over TCP?

I could give you the the Java class I’m using for managing TCP connections in server mode, I made it myself.
 
Share this answer
 

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