2

How can I exchange data between my WP8 app and my desktop Windows app running on the PC that has the phone connected with a USB cable? On WP7, there was TCP/IP networking over USB connection. On WP8, it seems it no longer works.

On the device side, NetworkInterfaceList class lists the Ethernet adapter, however NetworkInformation.GetHostNames method says there is no IP address assigned to that NIC. Is there a way to assign an IP address to that NIC, and use it for phone-to-pc communication over the USB cable?

On the PC side, looks like the connectivity DLLs implement Smart Device Connectivity API. Where can I find Microsoft.Smartdevice.DeviceAgentTransport.dll for Windows Phone 8 platform?

Are there some other options?

P.S. I am not submitting anything to the marketplace, so private or undocumented APIs are OK for me.

Soonts
  • 20,079
  • 9
  • 57
  • 130
  • perhaps this is useful : http://www.codeproject.com/Tips/583315/Using-SerialPort-and-AT-Commands-for-Querying-Cell – mojtaba Jun 03 '13 at 20:33
  • @KenWhite, could you please tell me how is my question related to your "possible duplicate" link? – Soonts Jun 03 '13 at 20:34
  • 1
    @Ken: no, I don't think anything will ever be a duplicate of that question. – Ben Voigt Jun 03 '13 at 20:34
  • @mojtaba, thanks for you link, however the WP8's USB driver doesn't expose any COM ports. – Soonts Jun 03 '13 at 20:39
  • 1
    @Ben: I read the subject and then the answer of the linked question. The answer is the content I meant. You're right. I just went back and read the question. Soonts, I apologize. :-) My mistake. Your question is not a duplicate of that question. I'll delete my "possible dupe" link so that it doesn't mislead anyone. My mistake. – Ken White Jun 03 '13 at 20:42

1 Answers1

1

I was just looking for this one myself and found a good resource over at msdn, IP over USB. As long as you have the windows phone SDK installed you have everything.

Edit: A small update, it seems that the server code must be running on the device and the client on the host, but apart from that everything worked as expected.

  • Used regedit to add a new entry under HKEY_LOCAL_MACHINE\Software\Microsoft\IpOverUsbSDK and created values similar to other entries, just different ports.
  • It took a few seconds and a refresh of regedit for IpOverUsbEnum.exe to display the new service.
MichalisB
  • 568
  • 3
  • 14