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.




8 posts

Wannabe Geek


# 36530 27-Jun-2009 08:40
Send private message

hi there,

i wrote a code that will create a connection between my nokia 6300 mobile and Bluesoleil on my pc. i just want the mobile to be the server and the pc a client using the btspp. i want to connect to the bluesoleil and send a text from the mobile. However, the mobile can not get connected to the pc. it'll just stuck after asking my confirmation to connect. By the way, i've set both serial port A and B on the Bluesoleil.  What could be the problem? is there any tutorial on this topic?

the connection could not be established. it just stop responding when it executes the acceptAndOpen() method.

what do you guys suggest?

Create new topic
BDFL - Memuneh
63338 posts

Uber Geek
+1 received by user: 13858

Administrator
Trusted
Geekzone
Lifetime subscriber



8 posts

Wannabe Geek


  # 228729 27-Jun-2009 09:17
Send private message

i've a bluetooth dongle on my pc detected by the Bluesoleil 2.7.0.8 VoIP. i set the serial port A and B on the bluesoleil. is it not enough?

 
 
 
 


BDFL - Memuneh
63338 posts

Uber Geek
+1 received by user: 13858

Administrator
Trusted
Geekzone
Lifetime subscriber

  # 228730 27-Jun-2009 09:28
Send private message

IIRC Serial Ports are uni-directional - either Incoming or Outgoing. If you are expecting a connection from another device then it should be Incoming (or Server in some software).







8 posts

Wannabe Geek


  # 228739 27-Jun-2009 09:58
Send private message

i want the mobile device to act as a server. I've set the Serial Port A and B on the Bluesoleil. i want my pc (Bluesoleil) to act as a client. my problem is that the acceptAndOpen() can not proceed. What do you recommend me, then?

BDFL - Memuneh
63338 posts

Uber Geek
+1 received by user: 13858

Administrator
Trusted
Geekzone
Lifetime subscriber

  # 228742 27-Jun-2009 10:15
Send private message

Reading the description again - and not knowing where the code is running... Are you iniiating the connection from a program on your PC or Mobile?







8 posts

Wannabe Geek


  # 228743 27-Jun-2009 10:22
Send private message

Sorry sir, i am initiating the connection from the mobile. Which means, the connection code is on the mobile



8 posts

Wannabe Geek


  # 228749 27-Jun-2009 10:54
Send private message

here is the code that is supposed to establish the connection

LocalDevice device;
UUID uuid = new UUID("F0E0D0C0B0A000908070605040302010", false);//spp

try {
device = LocalDevice.getLocalDevice();
device.setDiscoverable(DiscoveryAgent.GIAC);

service = (StreamConnectionNotifier) Connector.open("btspp://localhost:" + uuid.toString() + ";name=BTClient;authorize=true");
ServiceRecord record = device.getRecord(service);
device.updateRecord(record);
bluetoothConnection = service.acceptAndOpen();
dataOut = bluetoothConnection.openDataOutputStream();
dataIn = bluetoothConnection.openDataInputStream();
System.out.println("Client Connected!");

} catch (Exception ioe) {
System.out.println("Excetpion stating BTServer: " + ioe.getMessage());
ioe.printStackTrace();
error(ioe.getMessage());
}

however, the execution stops at acceptAndOpen()

Create new topic



Twitter »

Follow us to receive Twitter updates when new discussions are posted in our forums:



Follow us to receive Twitter updates when news items and blogs are posted in our frontpage:



Follow us to receive Twitter updates when tech item prices are listed in our price comparison site:





News »

Video game market in New Zealand passes half billion dollar mark
Posted 24-May-2019 16:15


WLG-X festival to celebrate creativity and innovation
Posted 22-May-2019 17:53


HPE to acquire supercomputing leader Cray
Posted 20-May-2019 11:07


Techweek starting around NZ today
Posted 20-May-2019 09:52


Porirua City Council first to adopt new council software solution Datascape
Posted 15-May-2019 12:00


New survey provides insight into schools' technology challenges and plans
Posted 15-May-2019 09:30


Apple Music now available on Alexa devices in Australia and New Zealand
Posted 15-May-2019 09:11


Make a stand against cyberbullying this Pink Shirt Day
Posted 14-May-2019 20:23


Samsung first TV manufacturer to launch the Apple TV App and Airplay 2
Posted 14-May-2019 20:11


Vodafone New Zealand sold
Posted 14-May-2019 07:25


Kordia boosts cloud performance with locally-hosted Microsoft Azure ExpressRoute
Posted 8-May-2019 10:25


Microsoft Azure ExpressRoute in New Zealand opens up faster, more secure internet for Kiwi businesses
Posted 8-May-2019 09:39


Vocus Communications to deliver Microsoft Azure Cloud Solutions through Azure ExpressRoute
Posted 8-May-2019 09:25


Independent NZ feature film #statusPending to premiere during WLG-X
Posted 6-May-2019 22:13


The ultimate dog photoshoot with Nokia 9 PureView #ForgottenDogsofInstagram
Posted 6-May-2019 09:41



Geekzone Live »

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


Support Geekzone »

Our community of supporters help make Geekzone possible. Click the button below to join them.

Support Geezone on PressPatron



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.

Alternatively, you can receive a daily email with Geekzone updates.