Know IP Address of USB tethering interface in Windows Phone - windows-phone-7

Is it possible to know the IPAddress of Windows Phone [Mango] devices when connected to PC through USB tethering.?
I am asking this because when i connect my phone to pc, using sockets it can connect to ANY Ipaddress. In other words, the SocketError enumeration always return me Success. which is quite strange.
If someone help me clarifying this issue.
Thanx

The phone itself can be accessed via the loopback interface (aka 127.0.0.1) - you can see that if you try to analyze the network traffic for a debug session. The level of access, however, is limited to the extent of the debugger integration.

While the phone is connected it gets the IP address 192.168.55.101. The network interface of the computer (e.g. to connect to it from the phone) has the address 192.168.55.100.

Related

Read/Send sms from wifi modem in c#

I have modem which is work on browser as wifi and when i connect to pc it becomes virtual router having ip address and DHCP settings. Now i want to use this wifi dongle as like long code or sms gateway.Also this modem is working on browser so it dont have port for communication to pc. How i can do this i.e. take sms which is stored in device local memory not on cloud and send it to clients. I cant use AT commands for read/write sms coz AT commodes only work when we have port number...pls suggest if any idea...is it possible?? I want implement this feature asp.net MVC5
Thanks in advance

what is the difference between Bluetooth service discovery and device inquiry?

I am using win32 sockets to develop a Bluetooth application. But I see that on the msdn they have:
•Bluetooth and WSALookupServiceBegin for Device Inquiry
•Bluetooth and WSALookupServiceBegin for Service Discovery
What is this service discovery? I mean if I have a Bluetooth device it should provide Bluetooth serivce right? Or am I confusing things here?
Could someone please explain this?
I would like to get a good understanding before starting any kind of coding :)
What is this service discovery? I mean if I have a Bluetooth device it should provide Bluetooth serivce right?
Yes. In order to use Bluetooth technology, a device must be compatible with the subset of Bluetooth profiles necessary to use the desired services.
Think of it as IP and Port numbers. While you need the IP (Bluetooth device) to connect to a host, you still need the Port (Bluetooth service) in order to connect and use the host. A Bluetooth service will tell you the capability of the device and what it can do.

P2P network on windows phone 7.1

I am trying to connect two windows phone emulators without router to form p2p network, is there any solution to connect them with access point without router and internet. and can be a possibility of using IP address of emulator.
answer plz
To the best of my knowledge no it is not possible in Mango - but is in WP8. You could however use a wireless network to perform create a UDP multicast socket and and then "connect" to one another that way.
Have a look at http://blogs.msdn.com/b/davrous/archive/2010/03/29/windows-phone-7-platformer-starter-kit-for-xna-studio-4-0.aspx it's got some pretty good pointers.

How to ping in Windows Phone?

I have a project based on windows Phone 7.5, which contains a module to ping remote devices (in the same subnet or internet). I tried to perform an echo request and reply on port 7. but reply does not comes back, rather, an NullReferenceException occurs when I try to access SocketAsyncEventArgs.Buffer. I also tried creating ICMP type packets in app, but no luck.
As far as my understanding goes, icmp packets are not allowed to perform ping. however, from desktop, the phone can be pinged if ip address of phone is known.
I have checked many applications on marketplace (like Console WP7 Lite, TestMyNet), those can perform ping by sending icmp packets and can also access Round trip time of ping operation.
I am wondering how those applications can ping to remote (accessible) devices, when windows phone sockets does not allow icmp packets.
Can anyone help me.
Thanx for help in advance
Are you sure these apps can ping local network? For example can they ping WP Wifi interface's gateway or the WP Wifi interface itself? Or can the only ping hosts on Internet? I tried both apps mentioned by you, and even more and they ping everything except local network. That is why i was convincend that they use external server to perform pings and roound-trip is only calculated or estimated somehow.
Piotr Wojtowicz

UDPAnySourceMulticastClient works only in Wi-fi?

I am developing an application in which device discovery in a network is required. I am using UDPAnySourceMulticastClient in windows phone 7 for discovering desktop clients. Whenever I connect desktop to a D-link or wi-fi connector, I am able to discover desktop in my wp7.
But my problem arises when I connect desktop through ethernet to some network and connect wp7 to the same network that desktop is using I am not able to discover desktops(Even though I am sending message to the group). Is it UDPAnySourceMulticastClient works only if both are connected through wi-fi network?
Thanks in advance
UDP multicast is dependent upon the hardware used to make the network (routers, etc.) to rebroadcast the message to all other clients. While more complex scenarios are possible, it's unusual for multicast to be enabled for anything other than communications connected to the same wireless hub.

Resources