通过 USB 数据线将数据从 WP7 手机发送到 PC [英] Send data from WP7 phone to PC via USB cable

查看:28
本文介绍了通过 USB 数据线将数据从 WP7 手机发送到 PC的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有兴趣在 PC 屏幕上显示来自 wp7 传感器的数据.是否可以通过 USB 数据线将数据发送回 PC?

I’d be interested in show data from wp7 sensors on a PC screen. Is it possible to send data back to the PC via the USB cable?

推荐答案

当手机通过 USB 插入时,它显示为与设备的以太网连接.这意味着使用标准 HTTP 调用将数据发送回在您的机器上运行的服务非常容易.

When the phone is plugged in via USB it appears as an Ethernet network connection to the device. This means it is easy enough to send data back to a service running on your machine using standard HTTP calls.

这可以通过在您的 PC 上设置一个简单的 Web 服务并在 Silverlight 中围绕它生成 WCF 代理来轻松完成.然后,您可以像使用任何其他网络服务一样简单地使用它.

This is easily done by setting up a simple web service on your PC and generating a WCF proxy around it in Silverlight. You can then simply use it as you would any other web service.

如果您正在寻找对 USB 本身的较低级别的串行访问,那么不幸的是,没有电话 API 不公开该功能.

If you are looking for lower level serial access to the USB itself, then unfortunately no the phone APIs don't expose that functionality.

这篇关于通过 USB 数据线将数据从 WP7 手机发送到 PC的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆