-1

i've created a UDP server in c# that listen to specific port for UDP data, the project relie on Dataloggers to send data via GPRS, but because we do not have these dataloggers yet, and for testing purposes, is there any way or idea to make my android phone that has a SIM card send data to the server static ip adress with specific port through gprs network ? pls help

i've seen some videos of sending gprs data using gprs module like sim900 and arduinos, but i have only a smartphone right now

asked Oct 27, 2022 at 2:04

1 Answer 1

0

GPRS is simply your communication layer. You wouldn't care if a PC is connected to your hard-wired network or wifi, only that it is able to communicate with the IP and port. If your UDP server is available any client that knows its IP and port, (and isn't blocked by firewalls, or network topology) should be able to communicate with it. While doing so from Android may have benefits, a simple console app would test your server the same way.

https://learn.microsoft.com/en-us/dotnet/api/system.net.sockets.udpclient.send?view=net-6.0

UdpClient udpClient = new UdpClient();
Byte[] sendBytes = Encoding.ASCII.GetBytes("Is anybody there");
try{
 udpClient.Send(sendBytes, sendBytes.Length, "www.contoso.com", 11000);
}
catch ( Exception e ){
 Console.WriteLine(e.ToString()); 
}
answered Oct 27, 2022 at 3:29
Sign up to request clarification or add additional context in comments.

3 Comments

but what i want is simulating gprs data send even via SMS to the server so he can get this msg, slipt it, and get the useful data from it! sorry i'am knew in all communication app and layer
SMS is a different thing entirely. Receiving a message sent over cell network will require you to have a cell enabled device or use an API like Twilio. twilio.com If you could post more details about your project it may clear up misunderstanding.
Well the project is creating a winforms application for receiving data sended by dataloggers and displaying it or saving it in mysql database. The dataloggers use UDP over GPRS communication to send data to the server where the app is installed, i'll need also in the futur to receive sms sended by those dataloggers in the server

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.