[QUESTION] connecting from smartphone to PC

  • Thread starter Thread starter Drazen Dotlic
  • Start date Start date
D

Drazen Dotlic

Hi,

first of all, thanks in advance for any help. Then, my assumptions (correct
me if I'm wrong):
- once I establish Blootooth connection, I can connect to PC using TCP/IP
(and should also be able to use serial port, but let's ignore that)
- on PC side, I can see that (Bluetooth software provided) LAN adapter has
address 169.254.0.175 (subnet mask 255.255.0.0)
- I already tried using this IP adress from one utility on the phone and it
was success, it connected fine

My scenario is that I will have utility on the phone ("client") and one on
the PC ("server").
Question is - how can I find this address (PC IP on the adapter connecting
phone and PC) from the phone programatically so that I can connect to it? If
it can not be done, can I do the reverse - connect from the desktop to the
phone and send PC's IP address?

Regards,

Drazen
 
The address you get is a so-called AutoConfiguration Private IP Address
(APIPA) - it cannot be predicted as it is reandomly chosen from roughly
128,000 addresses in a private address space. You need to open IP properties
of your BT connection and set the address to a fixed known value - say
192.168.10.1 with netmask 255.255.255.0
At the same time configure your BT connection on the phone side to a static
address of 192.168.10.2 and the same netmask.

There are ways of queirying the PC IP address via SMB broadcast, but I'm
don't believe it can be done from the phone (nor the other way around) as
the Windows CE OS does not have NetBIOS implementation
 
Back
Top