Author Topic: Bluetooth connection with several servers(PC)  (Read 2025 times)

Offline extra2use

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
Bluetooth connection with several servers(PC)
« on: March 15, 2007, 11:27:26 AM »
I would like to ask if a mobile storing a program which is written in J2ME be connected with several servers (PC) that have programs written in J2SE. It is not necessarily be the same time. I just wonder how can I use the same mobile to automatically connect to one server and switch to another server when the mobile approaches it. It is because it is needed for the server to perform a device pairing(I use the icon appears on the task bar of Window XP Home SP2) before I can perform the connection between mobile and PC. It is totally ok if I only connect the mobile with one PC, but I want to switch to another one automatically instead. How can I skip the device pairing part which should be performed manually? And most importantly, can I do the switching between different servers with different USB Bluetooth Dongle?

By the way, I have just read some of the previous posts in other forum, and discover that one PC can connected to Multiple USB Bluetooth Dongle, is that really work? Is that each of the Bluetooth Dongle can perform the corresponding function properly just like using several PCs each connected with a different Bluetooth Dongle? Can anyone tell me more about that? If it really works, I can then needless to use several PCs for it.

I am using Bluecove and Windows platform. Thanks a lot for your kind help!

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 2491
  • Karma: 1000
    • Wireless Communication Library
Re: Bluetooth connection with several servers(PC)
« Reply #1 on: March 15, 2007, 12:03:16 PM »
Good time of the day!

Well. Firstly you should understand that some services need authentication and some no. Bluetooth has two basic security level: authentication and encryption. Authentication (pairing) is a mechanism to identify devices (PIN). Encryption is a simple data encryption rules.
When you create service on PC you should specifi will this service use authentication or not. The same params you should specify on your phone.
Then windows will not shows any dialogs about pairing.

Also, Windows XP SP2 provides several functions to handle incoming authenticartion requests. Not sure is it available in J2SE, but IMHO should be something. In any case you can handle that requests on L2CAP level (not on RFCOM).

I am not sure that I completly understand your question about switching between servers. There is no problems to do it. Where have you got the problems?

About several dongles. Well. Somtime it works, sometime not. It depeneds on devices and drivers. I am working on my own bluetooth stack implementation which will support several dongles on the same PC.

Feel free to contact with me by ICQ or MSN for futher issistance.
WCL - Wireless Communication Library
TextBlue - Bluetooth Proximity Marketing Software
WCL Phone Explorer - Free Phone Content Manager

Offline extra2use

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
Re: Bluetooth connection with several servers(PC)
« Reply #2 on: March 15, 2007, 12:35:45 PM »
Thanks a lot for your quick response.

I have tried to link several PCs each with a single BT device running the same program and it seems not workable. My situation is: There is temporarily two PCs which is separated by about 1.5 metres. Both the PCs have opened the same J2SE program and a mobile phone (nokia N70) has also opened the J2ME program. When the mobile has done the device pairing with one PC using the icon in the task bar in advance, it is completely ok for all its functions. However, when I tried to approach to the next PC, the function cannot work out properly, it simply doesn't have any response even the phone has detected the bluetooth from the second PC (without doing any settings using the icon in the task bar for device pairing). Isn't that mean that I should everytime do the settings on each PC before the mobile approach it? And is that because the two PCs are too near to each other with affect the connection with the mobile such that switching cannot be done? Is it necessary to find something to shield between the two PCs (though I don't know what can I use for shielding) or simply put the two PCs far apart (approx. 10 metres)? Or is it because both PCs have the same UUID? I would like to switch those servers without doing the settings manually each time as in my situation, the servers should be worked automatically without anybody staying next to them.

On the other hand, for using several USB Bluetooth Dongles, what requirements should have for devices and drivers? Indeed, if using multiple USB Bluetooth Dongles is workable on one PC, I would like to implement this instead of using several PCs to do the same things. Actually, I have thought of the following things but not sure whether it works: For example, I have a PC working as a server running J2SE program and several USB Bluetooth Dongles plugged in the USB drivers of my PC (maybe using extending USB wires) because I may place the Bluetooth Dongles in different areas. Also, I have my mobile phone (Nokia N70) running the J2ME programs. When I approach to an area with a Bluetooth Dongle, then the Bluetooth connection between the Server(PC) and the Client(mobile) will be established. After performing several functions (e.g. exchanging some messages), the user with the mobile goes to another area with another Bluetooth Dongle, then again, a Bluetooth connection will be established between PC and mobile via a different Bluetooth Dongle. Do you think it is possible to do so?

I am using BlueCove, Microsoft Windows XP SP2 (Home), J2SE, J2ME.

Thanks again for your kind help!

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 2491
  • Karma: 1000
    • Wireless Communication Library
Re: Bluetooth connection with several servers(PC)
« Reply #3 on: March 15, 2007, 01:21:21 PM »
Quote
I have tried to link several PCs each with a single BT device running the same program and it seems not workable. My situation is: There is temporarily two PCs which is separated by about 1.5 metres. Both the PCs have opened the same J2SE program and a mobile phone (nokia N70) has also opened the J2ME program. When the mobile has done the device pairing with one PC using the icon in the task bar in advance, it is completely ok for all its functions. However, when I tried to approach to the next PC, the function cannot work out properly, it simply doesn't have any response even the phone has detected the bluetooth from the second PC (without doing any settings using the icon in the task bar for device pairing). Isn't that mean that I should everytime do the settings on each PC before the mobile approach it? And is that because the two PCs are too near to each other with affect the connection with the mobile such that switching cannot be done? Is it necessary to find something to shield between the two PCs (though I don't know what can I use for shielding) or simply put the two PCs far apart (approx. 10 metres)? Or is it because both PCs have the same UUID? I would like to switch those servers without doing the settings manually each time as in my situation, the servers should be worked automatically without anybody staying next to them.

It seems like problem in authentication procedure. I can't say where it is in code, but your phone did it like can't authenticate. Try disable authentication. It should work better without one.

Quote
On the other hand, for using several USB Bluetooth Dongles, what requirements should have for devices and drivers? Indeed, if using multiple USB Bluetooth Dongles is workable on one PC, I would like to implement this instead of using several PCs to do the same things. Actually, I have thought of the following things but not sure whether it works: For example, I have a PC working as a server running J2SE program and several USB Bluetooth Dongles plugged in the USB drivers of my PC (maybe using extending USB wires) because I may place the Bluetooth Dongles in different areas. Also, I have my mobile phone (Nokia N70) running the J2ME programs. When I approach to an area with a Bluetooth Dongle, then the Bluetooth connection between the Server(PC) and the Client(mobile) will be established. After performing several functions (e.g. exchanging some messages), the user with the mobile goes to another area with another Bluetooth Dongle, then again, a Bluetooth connection will be established between PC and mobile via a different Bluetooth Dongle. Do you think it is possible to do so?

This is very good question and actual. I am using BlueTake BT007i dongles and it works on my XP SP2.
WCL - Wireless Communication Library
TextBlue - Bluetooth Proximity Marketing Software
WCL Phone Explorer - Free Phone Content Manager

Offline extra2use

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
Re: Bluetooth connection with several servers(PC)
« Reply #4 on: March 15, 2007, 07:57:20 PM »
Thanks for your reply.

For the first problem, it seems really the problem of authentication. However, I should exit my J2ME program before I can connect it with another PC. Does there any other way such that it is needless to do the settings manually WITHOUT closing the J2ME program?

For the second part, I have tried to plugged the two USB Bluetooth Dongles into my laptop. Nevertheless, only one of them is workable while the other one cannot be started. Since you can do so using Bluetooth dongles in Windows XP SP2, would you mind telling me more details about that?

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 2491
  • Karma: 1000
    • Wireless Communication Library
Re: Bluetooth connection with several servers(PC)
« Reply #5 on: March 15, 2007, 09:20:24 PM »
Sorry for a short delayed answer.
Try unpair PC before recoonect to other.
And if you contact with me by MSN or ICQ it will be better for discuss your problem :)
WCL - Wireless Communication Library
TextBlue - Bluetooth Proximity Marketing Software
WCL Phone Explorer - Free Phone Content Manager

Offline extra2use

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
Re: Bluetooth connection with several servers(PC)
« Reply #6 on: March 16, 2007, 11:17:29 AM »
Quote
Try unpair PC before recoonect to other.

um...is that you mean to do so by correcting the client-side program?

Actually, I have added you in ICQ and waiting for your authorization (nickname: Kazoo).

Thanks a lot!

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 2491
  • Karma: 1000
    • Wireless Communication Library
Re: Bluetooth connection with several servers(PC)
« Reply #7 on: March 16, 2007, 11:21:29 AM »
Good day!

I think yes. It should help.

I am online but didn;t see your auth. request in ICQ :)
WCL - Wireless Communication Library
TextBlue - Bluetooth Proximity Marketing Software
WCL Phone Explorer - Free Phone Content Manager