gprs 调制解调器上的 tcp/ip 套接字

发布于 2024-09-12 16:58:05 字数 282 浏览 0 评论 0原文

我想在连接到 gprs 调制解调器的设备和也连接到 gprs 调制解调器的另一个设备之间建立 TCP/IP 套接字连接。这两个设备都通过 sims.now 连接到 gprs。现在对于 tcp/ip 套接字连接,客户端如何获取目的地服务器的 IP 地址,以便与正在侦听传入连接的服务器建立连接。我有两个设备的编号,因为 sims 与它们集成,允许我们访问 gprs。但是对于 tcp/ip 套接字,我们必须知道目的地ip地址。那么我如何通过我们希望连接的simnumbers获得网络上其他客户端/服务器的ip地址.im使用套接字编程建立tcp/ip连接

i want to establish a TCP/IP socket connection between a device connected to gprs modem and another device that is also connected to gprs modem.both devices are connected to gprs via sims.now for tcp/ip socket connection how a client can get destination ip address of server in order to establish connection with it that is listening to the incoming connections.i have numbers of both devices since sims are integrated with them that allows us to access the gprs .but for tcp/ip socket we must know the destination ip address.so how can i get the ip address of other clients /servers on the network via their simnumbers to whom we wish to connect .i m using socket programming to establish tcp/ip connection

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

演多会厌 2024-09-19 16:58:05

嗯,您可以尝试一种免费的动态 DNS 服务,例如 dyndns.com - 您需要一端进行注册每次使用 ddclient 这样的小程序更改它的 IP - 然后使用主机名而不是数字 IP用于查找服务器。

但需要注意的是,这些设备实际上可能位于运营商专用网络内,并且被赋予不可路由的 RFC1918 地址。在这种情况下,您只能连接出去。

Hmm, you can try one of free dynamic DNS services like dyndns.com - you'd need one end to register it's IP every time it changes with a small program like ddclient - and then use the host name instead of numeric IP for looking up the server.

One caveat though - the devices could actually be within carrier private networks and be given non-routable RFC1918 addresses. In that case you can only connect out.

花开雨落又逢春i 2024-09-19 16:58:05

我所做的是,每个单元不断监控其分配的 IP 地址。

我使用 Ublox 的 LEON200 GPRS 调制解调器以及 TCP/IP、HTTP 和 FTP 堆栈。一旦此 IP 更改,它就会创建到我的服务器的 HTTP 连接,并使用 &_POST、IMEI 和新 IP 地址到更新查找表的 php 脚本中。每当任何设备需要连接到另一个设备时,我需要知道的是该设备的 IMEI 号码,然后使用相同的 HTTP 连接来 &_POST 向 php 脚本发出请求,该脚本将返回列出的 IP 地址。

这样我就可以从一个设备连接到另一个设备。在我的运营商上,我必须激活不受限制的 APN,因为 GSM 分配的 IP 地址在互联网 APN 端不可见。

我希望这会有所帮助。

What I did is, each unit constantly monitors its assigned IP address.

I use the LEON200 GPRS modem from Ublox with TCP/IP, HTTP and FTP stack. Once this IP changes, it creates a HTTP connection to my server, and use the &_POST, the IMEI and new IP address into a php script that updates a lookup table. Whenever any unit needs to connect to another unit, all I need to know is the IMEI number of the unit and then use the same HTTP connection to &_POST a request to a php script that will return the listed IP address.

This way I can connect from device to device. On my carrier, I had to activate an unrestricted APN for the GSM asigned IP addresss is not visable from the internet APN side.

I hope this will help.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文