Send data from WP7 phone to PC via USB cable

2020-02-11 07:13发布

问题:

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?

回答1:

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.

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.

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