UDP socket and GPRS
-
I am not sure when we use an UDP socket to send and receive messages from one windows application to a mobile device that uses a modem and SIM card, where a port be assigned to an IP. say I have a SIM card with fix IP xxx.xxx.xxx.xxx, when I send a message I get it in my Windows base app as coming from that IP and a big port number (i.e. 48618). The SIM card provider suggests that they don't assign any port number to a SIM card. the thing is that after a while the port number gets changed if there is no traffic and My application can't send a message to the device as I send to the IP and the port that I got the last message from. Best, Nahita
-
I am not sure when we use an UDP socket to send and receive messages from one windows application to a mobile device that uses a modem and SIM card, where a port be assigned to an IP. say I have a SIM card with fix IP xxx.xxx.xxx.xxx, when I send a message I get it in my Windows base app as coming from that IP and a big port number (i.e. 48618). The SIM card provider suggests that they don't assign any port number to a SIM card. the thing is that after a while the port number gets changed if there is no traffic and My application can't send a message to the device as I send to the IP and the port that I got the last message from. Best, Nahita
-
I am not sure when we use an UDP socket to send and receive messages from one windows application to a mobile device that uses a modem and SIM card, where a port be assigned to an IP. say I have a SIM card with fix IP xxx.xxx.xxx.xxx, when I send a message I get it in my Windows base app as coming from that IP and a big port number (i.e. 48618). The SIM card provider suggests that they don't assign any port number to a SIM card. the thing is that after a while the port number gets changed if there is no traffic and My application can't send a message to the device as I send to the IP and the port that I got the last message from. Best, Nahita
nahitan wrote:
the thing is that after a while the port number gets changed if there is no traffic
Can't you ping the device time to time? I supose when there is no communication for a while it will "timeout" and close the socket or whatever it uses and when it has something to send it will create a new one, send the message from there and keep it up again for a while. But if you don't let it timeout it might stick to the original port.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
-
nahitan wrote:
the thing is that after a while the port number gets changed if there is no traffic
Can't you ping the device time to time? I supose when there is no communication for a while it will "timeout" and close the socket or whatever it uses and when it has something to send it will create a new one, send the message from there and keep it up again for a while. But if you don't let it timeout it might stick to the original port.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
-
If there is an application on that mobile device that you want to communicate with, you have to have the specification for communicating with the application, you can't just guess at how to do it. Do you have the specification?
led mike
-
to maintain a port you need to send a ping every 45 seconds that is a lot of data and if you have 2000 devices, that would be a big number. I am just wondering where a port gets assigned. Thanks,
If there is no fix port number you can communicate with, how do you make a "connection" (i know it is connection less UDP) to the device the first place?
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
-
I can communicate with the application to the mobile device fine. My problem is that the port gets changed time to time and I was wondering if anybody knows where a port gets assigned in GPRS for a UDP socket. Thanks,
A port represents a way to identify which specific process a packet is addressed for on a system where multiple processes share the same network connection. Therefore ports are generally an application level mechanism. If the mobile device does not use this typical approach then I don't know what it uses, but someone does that would be related to that specific device. In a typical use of a TCP/IP stack the application can choose to be assigned a random port from the stack. In that case the "where" is in the TCP/IP stack code. Either way, I don't understand how knowing "where" the port assignment occurs helps you do anything about it. That aspect of the mobile devices system is not going to be exposed to your remote application. You will have to use the specifications for that device/application, as I previously stated, for communicating with it/them, period.
led mike