Geekzone: technology news, blogs, forums
Guest
Welcome Guest.
You haven't logged in yet. If you don't have an account you can register now.


awishedforsong

6 posts

Wannabe Geek
Inactive user


#1139 27-Feb-2004 03:31
Send private message

I have a program to set up a TCP Connection over bluetooth, it requires a TCP address (127.0.0.1 for example) and a port number, does anyone know for what the address is supposed to be? or what port?

My guess is its my local BT device, but I'm not sure and this wouldn't have a TCP address or port number. Also the default value was 127.0.0.1 and port 2600, can i find out what port my device is on (its a usb device)?

All remote devices have a BT address but I can't map it to a TCP addresss I don't think you're supposed to.

Any help would be appreciatied! Thanks!


Create new topic
freitasm
BDFL - Memuneh
80646 posts

Uber Geek
+1 received by user: 41030

Administrator
ID Verified
Trusted
Geekzone
Lifetime subscriber

  #3898 27-Feb-2004 07:33
Send private message

Once you connect a Bluetooth device using Network Access, LAN Access or dial-up it'll get (if not configured) an IP address. Of course this address will depend on your DHCP server rules. There's no way to determine an IP address in advance, unless you configure the DHCP server.

If you're using LAN Access it'll probably be in the 192.168.0.1 range, because this is requried by ICS. Once the other device is configured simply check its properties. If it's a PC, run IPCONFIG /ALL, if it's a Pocket PC you can download and install VxCam, if it's a Palm open the log details.

127.0.0.1 is localhost, meaning your own computer. It's probably just a default for testing. The port is determinet by your program. TCP/IP over Bluetooth will give access to any port on the other device, if not blocked by a firewall.

Perhaps you care to ellaborate the question?




Referral links: Quic Broadband (free setup code: R587125ERQ6VE) | Samsung | AliExpress | Wise | Sharesies 

 

Support Geekzone by subscribing (browse ads-free), or making a one-off or recurring donation through PressPatron.

 




awishedforsong

6 posts

Wannabe Geek
Inactive user


  #3906 28-Feb-2004 10:28
Send private message

That makes sense, but I'm not using this over a network, most of the code is already pre-compiled, so I can only really say what I've got...

basically to initialise a bluetooth stack I use a parameter called BluetoothTCPClient, which looks like so:

new BluetoothTCPClient(String IPAddress, int portNumber)

where, from sample code the IP Address was 127.0.0.1 and the port number was 2600, but the connection was denied through this port, so what i thought was it was trying to connect to the device on the localhost (the PC) at this port, and port 2600 was where the device was for the sample code, but would be different for my PC, I have it going through every port at the moment, testing whether I can connect successfuly to any and continue, but i don't even know if my theory is anywhere correct.

I'm using the bluetooth classes from Bluetooth.org if you or anyone's familiar with them?
If anyone has successfully set up a Bluetooth Desktop Server using Java perhaps you could help? Any help would be greatly appreciated. Thanks!

awishedforsong

6 posts

Wannabe Geek
Inactive user


  #3919 29-Feb-2004 03:04
Send private message

Oops, i was mistaken, it was not 127.0.0.1 it was in the address you said. But I'm not on any network, is this an address on my machine? I'm a little confused as to whats going on.



awishedforsong

6 posts

Wannabe Geek
Inactive user


  #3920 29-Feb-2004 03:05
Send private message

Oh but when I run it with this address and port 2600 as was the default, it says no route to host.

Please help!?!

freitasm
BDFL - Memuneh
80646 posts

Uber Geek
+1 received by user: 41030

Administrator
ID Verified
Trusted
Geekzone
Lifetime subscriber

  #3922 29-Feb-2004 10:47
Send private message

It looks ike this program you're testing expects the P800 to be connected to your computer via mRouter (which is standard when you insert it in the cradle).

I say this because the address 192.168.0.1 is only valid in internal networks, not accessible from the internet.

You're not clear about what this program does. The required address is for the P800 to act as a server, or this is the address a client on the P800 expects to find as a server on your network?




Referral links: Quic Broadband (free setup code: R587125ERQ6VE) | Samsung | AliExpress | Wise | Sharesies 

 

Support Geekzone by subscribing (browse ads-free), or making a one-off or recurring donation through PressPatron.

 


awishedforsong

6 posts

Wannabe Geek
Inactive user


  #3954 2-Mar-2004 03:23
Send private message

This doesn't have anything to do with a p800, thats what I want to use it for but this code is just to setup a bluetooth browser, not even a server, it searches for devices and thats all, I am new at this, and I'm only discovering this stuff as I go along, thanks for all your help, if anyone has any other ideas keep them coming Thanks!

Create new topic








Geekzone Live »

Try automatic live updates from Geekzone directly in your browser, without refreshing the page, with Geekzone Live now.



Are you subscribed to our RSS feed? You can download the latest headlines and summaries from our stories directly to your computer or smartphone by using a feed reader.