当模拟器或 Wi-Fi 不可行时,如何进行电话到服务器的开发?

发布于 2024-10-19 18:28:47 字数 594 浏览 6 评论 0原文

我正在一个严格禁止使用 Wi-Fi 的组织中开展一个针对多部手机(iPhone/BlackBerry/Android)的项目。该项目的性质使用手机的摄像头,因此模拟器程序不是一种选择,并且它需要能够与服务器通信,因此需要某种形式的连接。

所以我遇到的问题是,我无法使用手机的摄像头,也无法让它与我的开发机器或 QA 集群进行通信。由于上述 Wi-Fi 禁令,我无法将手机连接到无线网络。我可以让它使用 3G 或其他任何连接方式通过互联网进行通信,但它无法看到我的本地计算机或我们的 QA 环境,因为这些对外界不可见。而且我不能只使用模拟器,因为我需要使用相机。

我认为我唯一真正的选择是使用从文件加载的“特技”图像来模拟与服务器的通信,然后在通信部分投入生产时测试实际的电话到服务器的通信,或者进行尽可能多的测试我可以使用其他 Wi-Fi 网络,例如我家的 Wi-Fi 网络。

如果这些电话有以太网插孔 - 或者可以共享它们所连接的机器的网络连接 - 我的问题就会得到解决。或者,如果模拟器可以使用通过 USB 连接的网络摄像头(这不会模拟手机中实际摄像头的功能,但可能总比没有好)。不同的手机平台有不同的模拟器这一事实是不可避免的,但使情况进一步复杂化。

有没有人以前遇到过这个问题并有一个创造性的解决方案?

I'm working on a project for multiple mobile phones (iPhone/BlackBerry/Android) in an organization where Wi-Fi is strictly forbidden. The nature of the project employs the phones' camera so simulator programs are not an option, and it needs to be able to communicate to a server, so some form of connectivity is required.

So the problem I have is that I can't use the camera of the phone as well as have it communicate with either my development machine or a QA cluster. I can't get the phone to be on a network wirelessly because of the aforementioned Wi-Fi ban. I can have it communicate over the Internet using 3G or whatever it uses to connect, but then it can't see my local machine or our QA environment because those aren't visible to the outside world. And I can't just use the simulator because I need to use the camera.

The way I see it my only real options are to simulate the communication to the server with "stunt" images loaded from files and then test the actual phone-to-server communication when the communication piece goes to production, or do as much testing as I can on some other Wi-Fi network, like the one at my house.

If these phones had Ethernet jacks - or could share the network connection of the machine they're attached to - my problem would be solved. Or if the simulators could use, say, a webcam attached via USB (which would not simulate the capabilities of the actual camera in the phone but might be better than nothing). The fact that different phone platforms have different simulators is unavoidable but complicates the situation further.

Has anyone ran into this issue before and has an inventive solution?

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

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

发布评论

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

评论(3

就像说晚安 2024-10-26 18:28:47

可以为通过 USB 连接的电话分配 IP 地址。这是适用于 Android 的摩托罗拉 USB 驱动程序的一项功能。其他制造商也可能会这样做。连接后,它们的 IP 地址通常为 192.168.16.x,该地址是通过驱动程序从主机 PC 的 DHCP 给出的。

此时,您可以通过 TCP-IP 模式连接 ADB,并使用“adb tcpip”通过以太网进行调试。出于安全原因,您必须以 USB 模式启动手机,但如果需要,您可以在 tcpip 模式下调试它。不过,不确定源自电话的 IP 数据包是否可以通过 PC 连接路由到外部互联网。

It is possible to assign an IP address to a phone attached via USB. This is a feature of the Motorola USB drivers for Android. Other manufacturers may do the same. When attached, they usually have an IP address of 192.168.16.x, which is given via DHCP from the host PC via the drivers.

At this point, you can attach ADB via TCP-IP mode and debug to it over ethernet with 'adb tcpip '. You have to start out with the phone in USB mode for security reasons, but you can debug it in tcpip mode if necessary. Not sure if IP packets that originate from the phone are routable to the outside internet via the PC connection, though.

在巴黎塔顶看东京樱花 2024-10-26 18:28:47

检查有关 wifi 禁止的规则。看看您是否可以在密封的法拉第笼房间内使用连接到开发 Mac 的 Airport Express,而无需外部网络访问。您的组织可能已经有权访问此类房间。

或者看看您是否可以在外部测试设施或测试站点克隆您的 QA 服务器(带有非机密测试数据)。

Check the rules around the wifi prohibition. See if you can use an Airport Express wired to your development Mac inside a sealed Faraday cage room with no external network access. Your organization may already have access to such rooms.

Or see if you can clone your QA servers (with non-confidential test data) at an outside test facility or test site.

心不设防 2024-10-26 18:28:47

一种解决方案是在组织网络外部安装 Wi-Fi 接入点和路由服务器(如有必要),然后通过组织的防火墙建立必要的端口和地址。

如果禁令如此严格,或者防火墙规则如此不可改变,甚至这是不可行的,我建议一种根本没有创造性的解决方案(直接来自书籍),但我坚信它将比任何创造性的解决方案更有效。也许不是针对这个特定的问题,但肯定是为了项目和组织未来的成功:

购买一些关于敏捷开发的书籍,标记有关障碍和功能失调的组织的章节,然后将它们交给您的经理。改变你的组织或改变组织。

最好的。

One solution would be to install a Wi-Fi access point, and a routing server if necessary, outside of the organization's network -- then tunnel the necessary ports and addresses through the organization's firewalls.

If the ban is so strict, or the firewall rules so unchangeable that even that is not feasible, I suggest a solution which is not inventive at all (comes straight from the books) but which I firmly believe will work better than any inventive one. Maybe not on this particular problem, but certainly for the future success of the project and the organization:

Buy some books on agile development, mark the chapters on impediments and dysfunctional organizations, and give them to your managers. Change your organization or change of organization.

Best.

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