×

Discussion Board

Results 1 to 13 of 13
  1. #1
    Regular Contributor
    Join Date
    Dec 2009
    Posts
    79

    Question BLUETOOTH PROBLEM

    Hi all,

    I've found some Bluetooth source code and there I've found the code:

    Code:
     
    BCC.setPortName("COM2");  //setting the port number
    BCC.setBaudRate(57600);//setting the baud rate
    BCC.setConnectable(true);//connectable mode
    BCC.setDiscoverable(DiscoveryAgent.GIAC);
    and the import:

    Code:
    import com.atinav.bcc.*;
    Where can I download the class??? Thank you for your help.

    AND PLEASE HELP ME FAST. CAUSE I REALLY NEED THE ANSWER.

    Benni
    Last edited by benni-europe; 2009-12-23 at 17:38.

  2. #2
    Super Contributor
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,395

    Re: BLUETOOTH BCC ATINAV Download?

    This is J2SE code? To run on a PC? I think this is dead, look for another implementation of JSR82 on Windows (like BlueCove). You will need to adapt the code.

    Graham.

  3. #3
    Regular Contributor
    Join Date
    Dec 2009
    Posts
    79

    Re: BLUETOOTH BCC ATINAV Download?

    Sorry for your answer. No this is Java ME code. http://www.javabluetooth.com/ Click on "source code". Select chapter 8. There you find the Server code. In the constructor you'll find the code.

    But: WHERE CAN I GET THE API?

    Benni

  4. #4
    Super Contributor
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,395

    Re: BLUETOOTH BCC ATINAV Download?

    Hmmm... I don't see that. The code I see in Chapter 8 (ChatServer.java) imports com.rococosoft.io.*, whatever that is.

    I suggest you find an example somewhere else. Look here on the Forum wiki. There is no reason you should need third-party libraries to use Bluetooth on a mobile phone.

    It will be much quicker to find a better example, than to find this API.

    Graham.

  5. #5
    Regular Contributor
    Join Date
    Dec 2009
    Posts
    79

    Re: BLUETOOTH BCC ATINAV Download?

    Sorry. The code I meant is in chapter 7.

    Code:
    import javax.microedition.io.*;
    import java.io.*;
    import javax.bluetooth.*;
    import javax.obex.*;
    import com.atinav.bcc.*;
    
    public class FTServer extends ServerRequestHandler{
    
         public FTServer() throws BluetoothStateException {
         	
      	BCC.setPortName("COM2");  //setting the port number
        	BCC.setBaudRate(57600);//setting the baud rate
        	BCC.setConnectable(true);//connectable mode
            BCC.setDiscoverable(DiscoveryAgent.GIAC);               
         }	
         public int onConnect(HeaderSet request, HeaderSet reply) {
         	System.out.println("A OBEX connection has recieved .... ");
         	return ResponseCodes.OBEX_HTTP_OK;
         }
         public int onGet(Operation op) {
         	try{
         		//The server has recived a GET request for client.
    	     	System.out.println("Recived a GET request from client .....  ");
    	     	HeaderSet hdr = op.getReceivedHeaders(); 
    	     	
    	     	System.out.println("Server has recived a request for the file  "+(hdr.getHeader(HeaderSet.NAME)).toString());
    		InputConnection inpcon = (InputConnection)Connector.open("file://name="+(hdr.getHeader(HeaderSet.NAME)).toString()+";mode=r");
    		InputStream in     =  inpcon.openInputStream(); 
    		byte[] fileAsBytes     = new byte[97];
    		in.read(fileAsBytes);
    		System.out.println("File read fully into the port ....");
    		for(int i =0; i<fileAsBytes.length; i++)
    			System.out.print((char)fileAsBytes[i]);
    		DataOutputStream out = op.openDataOutputStream();
    		out.write(fileAsBytes, 0, fileAsBytes.length);
    		System.out.println("\n"+"File written back to client .... ");
    		op.close();
    		in.close();	     	
    	    }
    	catch(IOException e)    {
    		System.out.println(e.getMessage());
    	}
    	catch(ArrayIndexOutOfBoundsException e)    {
    		System.out.println(e.getMessage());
    	}
         	return ResponseCodes.OBEX_HTTP_OK;
         }
         public static void main(String args[]) throws IOException {
         	
         	FTServer server        	 = new FTServer();
         	LocalDevice  localDevice = LocalDevice.getLocalDevice();
       	SessionNotifier sn = (SessionNotifier)Connector.open("btgoep://localhost:1106;name=FTP");
       	System.out.println("Waiting for a client connection ..... ");
       	sn.acceptAndOpen(server);
     	System.out.println("A Client now connected .... ");
    
         }
    }
    Thanks for your answers.

    Benni

  6. #6
    Super Contributor
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,395

    Re: BLUETOOTH BCC ATINAV Download?

    My advice stands. These are not good examples. They are not well written, and they rely on libraries that you don't have. It is easy to find better example code. I strongly recommend you stop wasting your time trying to get these working, when there are much easier options.

    Graham.

  7. #7
    Regular Contributor
    Join Date
    Sep 2008
    Location
    Ahmedabad
    Posts
    254

    Re: BLUETOOTH BCC ATINAV Download?

    Hi,

    Graham is absolutely right, there are very good examples of JSR82 available which you can utilise according to your purpose. The Atinav API that you are trying to use is mainly for desktop and is built over JSR82 only. For mobile applications based on bluetooth there is no need for any third party library.

    I hope that you understand there is no need to use Atinav Library for Bluetooth based mobile applications.
    Sunil
    Mobile Application Developer

  8. #8
    Registered User
    Join Date
    Aug 2013
    Posts
    2

    Re: BLUETOOTH BCC ATINAV Download?

    please tell me...from where i can download atinav.bcc package????
    Last edited by Ayehsa Muqaddas; 2013-08-31 at 07:36.

  9. #9
    Registered User
    Join Date
    Dec 2012
    Location
    India
    Posts
    264

    Re: BLUETOOTH BCC ATINAV Download?

    I am not able to find the link "Source Code" in the web page. So I dunno where the package atinav.bcc can be downloaded anymore.

    I too strongly agree with others, there are better documentation available in Nokia Wiki. Check this link

    http://developer.nokia.com/Community...ivity_Articles

    More specifically, here are few links that may help you.

    http://developer.nokia.com/Community...ity_in_Java_ME
    http://developer.nokia.com/Community...ice_in_Java_ME
    http://developer.nokia.com/Community...hat_HelloWorld

  10. #10
    Nokia Developer Champion
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    3,073

    Re: BLUETOOTH BCC ATINAV Download?

    You can use JSR 82 for your needs and Good info about JSR 82 is available on http://en.wikipedia.org/wiki/Java_APIs_for_Bluetooth
    thanks,
    ~Amitabh
    (Champion of the Month -Aug'13)
    Follow me on my blog for Innovative Mobile Apps

  11. #11
    Registered User
    Join Date
    Aug 2013
    Posts
    2

    Re: BLUETOOTH BCC ATINAV Download?

    plzzzzz tell me...from where i can download com.atinav.bcc

  12. #12
    Registered User
    Join Date
    Dec 2012
    Location
    India
    Posts
    264

    Re: BLUETOOTH BCC ATINAV Download?


  13. #13
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Budapest, Hungary
    Posts
    28,568

    Re: BLUETOOTH BCC ATINAV Download?

    After a bit of checking this topic seems to be very irrelevant here, and in fact it probably was by the time of the original question.
    Here is the archived version of the product page: http://web.archive.org/web/200603261...R-82/index.htm
    And here is the archived version of an early download page: http://web.archive.org/web/200412120...xB.asp?suite=B

    The code snippets below are very suspicious already, they COM2 sounds as a serial port of your PC. While the download actually does not work, it has a name "J2ME UART (Sun KVM)", which says nothing Bluetooth, but UART is indeed a nice, scientific name for "serial port" (http://en.wikipedia.org/wiki/Univers...er/transmitter). And it is true that Java did not (and still does not) come with serial port support.
    So this product, when it existed, was a Bluetooth dongle you could plug into a serial port on your PC, and these magical lines we are staring at are simply configuring the serial port and this particular piece of hardware. J2ME support probably ended with support for the emulator that time, that is what "Sun KVM" also suggests.
    2.5 years later, http://web.archive.org/web/200705170...xB.asp?suite=B they had some generic J2ME download for WinCE (and if you check the J2SE list, there are a lot of devices listed), but that is all.
    My impression is that this API has never had anything to do with developing Bluetooth applications for Nokia devices.
    Last edited by wizard_hu_; 2013-09-06 at 13:52.

Similar Threads

  1. Replies: 5
    Last Post: 2012-01-23, 19:59
  2. Download manager hangs during file download on N95
    By ActiveRosh in forum Symbian Networking & Messaging (Closed)
    Replies: 1
    Last Post: 2009-10-13, 21:59
  3. Replies: 0
    Last Post: 2009-05-04, 08:46
  4. Download failed
    By agouraud in forum Digital Rights Management & Content Downloading
    Replies: 2
    Last Post: 2004-05-13, 05:11

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •