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?
Asked
Active
Viewed 2,580 times
1 Answers
3
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.

1adam12
- 985
- 5
- 13
-
Great answer. No need for lower level api, access via service would be fine. How will phone know what ip address my local computer has? Will it have access to the default gateway and dhcp server of the network that my computer computer is on? Any examples showing how to set up this kind of service? Thanks! ā Robert Jan 30 '11 at 15:46
-
1Have a look here http://www.j2i.net/BlogEngine/post/2010/08/24/Getting-to-my-Isolated-Files.aspx This is an example of setting up a service on your desktop and connecting to it from your phone via the USB. The example is using the idea to copy files off the device but it could be adapted for other uses. ā 1adam12 Feb 03 '11 at 13:05