Lost Password?

Go Back   CodeCall Programming Forum > Software Development > Java Help

Java Help Java Help forum discussing all Java platforms - J2ME, J2SE and J2EE - as well as relevant standards, APIs and frameworks such as Swing, Servlets, JSPs, Applets, Struts, Spring, Hibernate, ANT, EJB, and other Java-related topics.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-26-2008, 10:19 AM
urip urip is offline
Newbie
 
Join Date: Jan 2008
Posts: 3
Rep Power: 0
urip is on a distinguished road
Default PC application with bluetooth

Hello everybody,

I'm trying to develop a PC application with a Bluetooth connection using a USB dongle.
The application is supposed to search for devices in range, choose one of them, and then send him a file...


I have searched the net looking for a way to do it, but didn't find one.
Is it possible to develop such application? If so, how can I do it? What should I look for? Is Java the ideal language for this application? (I don't care to use C# or C++ instead...)



Thanks....
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
  #2 (permalink)  
Old 01-26-2008, 12:25 PM
monkey_instinct's Avatar   
monkey_instinct monkey_instinct is offline
Learning Programmer
 
Join Date: Dec 2007
Posts: 87
Rep Power: 3
monkey_instinct will become famous soon enough
Default

That's an interesting question. I haven't program anything like that but I found some information for you (and for my own enjoyment ). Apparently Java provides an API to interact with bluetooth devices on the package javax.bluetooth. You can find the information here: Using the Java APIs for Bluetooth Wireless Technology
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 01-26-2008, 02:38 PM
urip urip is offline
Newbie
 
Join Date: Jan 2008
Posts: 3
Rep Power: 0
urip is on a distinguished road
Thumbs up

Quote:
Originally Posted by monkey_instinct View Post
That's an interesting question. I haven't program anything like that but I found some information for you (and for my own enjoyment ). Apparently Java provides an API to interact with bluetooth devices on the package javax.bluetooth. You can find the information here: Using the Java APIs for Bluetooth Wireless Technology
How didn't I find this one? Seems like a very good place to start from...
Thank you very much
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-13-2008, 08:08 AM
urip urip is offline
Newbie
 
Join Date: Jan 2008
Posts: 3
Rep Power: 0
urip is on a distinguished road
Default Another question...

Well, after a lot of work, using bluecove (jsr-82), I've succeeded in making a device discovery search, select a mobile phone, search for services and make a connection attempt..
So far so good, but when I try to connect the mobile, my cell demands a passkey (in order to pair itself to the PC).
So I have two questions (I've listed some code in the bottom):

1. Is it possible to send a message without the passkey and the pairing? (only by clicking yes/no to accept the connection by the cell) For instance, when I send a file from one mobile phone to another, it doesn't request a passkey, only an approval from the mobile user. How is it done?

2. If it's not possible to connect without the passkey, how do I enter the pairing passkey back in the PC?

This is how I'm trying to initialize the connection:
Code:
    ...
    //after finding the remote device...
    int[] attrSet = new int[] { 0x0100};
    UUID uuidSet[] = new UUID[] { new UUID(0x1106) };
    int bl = _discoveryAgent.searchServices(attrSet, uuidSet, devices[i], this);
    ...
 
    public void serviceSearchCompleted(int transID, int respCode)
    {
            if(respCode == SERVICE_SEARCH_COMPLETED)
            {
                try
                {
                    //servRecord holds the found ServiceRecord
                    String connectionUrl = servRecord[0].getConnectionURL(ServiceRecord.NOAUTHENTICATE_NOENCRYPT, false);
                    StreamConnection streamConnector = (StreamConnection) Connector.open(connectionUrl);
                    String msg = "Success.";
                    OutputStream os = streamConnector.openOutputStream();
                    os.write(msg.getBytes());
                    streamConnector.close();
                }
                catch(Exception exc)
                {
                    System.out.println("Error occured: " + exc);
                }
            }
    }

I hope I explained the code enough
Thanks
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Cracking an Application Method One (PART 1) TcM Security Tutorials 18 05-30-2008 07:40 AM
Adding MSCOMM control to Visual C++ Application ifitzgerald C and C++ 2 09-14-2007 10:05 AM
Help with Application Logic for .NET 2.0 hoser2001 C# Programming 5 08-03-2007 10:08 AM
Two ASP.NET application in one virtual folder pepe123 C# Programming 0 07-12-2007 05:18 AM
MS-SQL deadlock and hang the Java application reachpradeep Database & Database Programming 1 03-11-2007 04:20 AM


All times are GMT -5. The time now is 03:49 PM.

Contest Stats

John ........ 87.50000
dargueta ........ 75.00000
Xav ........ 50.00000
MeTh0Dz ........ 20.00000
gaylo565 ........ 18.00000
Johnnyboy ........ 3.00000

Contest Rules

Ads