Bluetooth Read VI error - simple bluetooth client/server

Hello,
I've been able to run both the simple and advanced bluetooth LV examples, but I can't make the simple code below to work between my laptop and my PDA. Connection is established, but the Bluetooth Read VI returns an empty string.
Thanks in advance for any ideas.
Server
Client

Hello,
Take a look at the link below, it has a lot of information about using bluetooth within LabVIEW.
http://digital.ni.com/public.nsf/allkb/921795DD63E315B686256DD60082B252?OpenDocument
Thanks.
Best Regards
Luciano Borges
R&D Engineer
Pirelli Brazil

Similar Messages

  • Can Simple Data Client/Server VIs communicate between computers?

    I am having trouble using the Simple Data Client VI / Simple Data Server VI to communicate between computers? Can these VIs do this ..or do they simply communicate between each other on a single computer? TIA.

    NO it can be used between two computers. You have to replace the localhist string with the IP address of the computer running the server and make sure that the server computer is allowing external connections on the specified port.
    Regards,
    André
    Using whatever version of LV the customer requires. (LV5.1-LV2012) (www.carya.nl)

  • File transfer, read write through sockets in client server programming java

    Hello All, need help again.
    I am trying to create a Client server program, where, the Client first sends a file to Server, on accepting the file, the server generates another file(probably xml), send it to the client as a response, the client read the response xml, parse it and display some data. now I am successful sending the file to the server, but could not figure out how the server can create and send a xml file and send it to the client as response, please help. below are my codes for client and server
    Client side
    import java.io.BufferedInputStream;
    import java.io.BufferedOutputStream;
    import java.io.BufferedReader;
    import java.io.DataInputStream;
    import java.io.DataOutputStream;
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileWriter;
    import java.io.IOException;
    import java.io.InputStreamReader;
    import java.io.PrintWriter;
    import java.net.InetAddress;
    import java.net.Socket;
    import java.net.UnknownHostException;
    public class XMLSocketC
         public static void main(String[] args) throws IOException
              //Establish a connection to socket
              Socket toServer = null;
              String host = "127.0.0.1";     
              int port = 4444;
              try
                   toServer = new Socket(host, port);
                   } catch (UnknownHostException e) {
                System.err.println("Don't know about host: localhost.");
                System.exit(1);
            } catch (IOException e) {
                System.err.println("Couldn't get I/O for the connection to host.");
                System.exit(1);
              //Send file over Socket
            //===========================================================
            BufferedInputStream fileIn = null;
              BufferedOutputStream out = null;
              // File to be send over the socket.
              File file = new File("c:/xampp/htdocs/thesis/sensorList.php");
              // Checking for the file to be sent.
              if (!file.exists())
                   System.out.println("File doesn't exist");
                   System.exit(0);
              try
                   // InputStream to read the file
                   fileIn = new BufferedInputStream(new FileInputStream(file));
              }catch(IOException eee)
                   System.out.println("Problem, kunne ikke lage fil");
              try
                   InetAddress adressen = InetAddress.getByName(host);
                   try
                        System.out.println("Establishing Socket Connection");
                        // Opening Socket
                        Socket s = new Socket(adressen, port);
                        System.out.println("Socket is clear and available.....");
                        // OutputStream to socket
                        out = new BufferedOutputStream(s.getOutputStream());
                        byte[] buffer = new byte[1024];
                        int numRead;
                        //Checking if bytes available to read to the buffer.
                        while( (numRead = fileIn.read(buffer)) >= 0)
                             // Writes bytes to Output Stream from 0 to total number of bytes
                             out.write(buffer, 0, numRead);
                        // Flush - send file
                        out.flush();
                        // close OutputStream
                        out.close();
                        // close InputStrean
                        fileIn.close();
                   }catch (IOException e)
              }catch(UnknownHostException e)
                   System.err.println(e);
            //===========================================================
            //Retrieve data from Socket.
              //BufferedReader in = new BufferedReader(new InputStreamReader(toServer.getInputStream()));
              DataInputStream in = new DataInputStream(new BufferedInputStream(toServer.getInputStream()));
              //String fromServer;
            //Read from the server and prints.
              //Receive text from server
              FileWriter fr = null;
              String frn = "xxx_response.xml";
              try {
                   fr = new FileWriter(frn);
              } catch (IOException e1) {
                   // TODO Auto-generated catch block
                   e1.printStackTrace();
              try{
                   String line = in.readUTF();                    //.readLine();
                   System.out.println("Text received :" + line);
                   fr.write(line);
              } catch (IOException e){
                   System.out.println("Read failed");
                   System.exit(1);
            in.close();
            toServer.close();
    public class XMLSocketS
          public static void main(String[] args) throws IOException
              //Establish a connection to socket
               ServerSocket serverSocket = null;
                 try {
                     serverSocket = new ServerSocket(4444);
                 } catch (IOException e) {
                     System.err.println("Could not listen on port: 4444.");
                     System.exit(1);
              Socket clientLink = null;
              while (true)
                        try
                             clientLink = serverSocket.accept();
                           System.out.println("Server accepts");
                             BufferedInputStream inn = new BufferedInputStream(clientLink.getInputStream());
                             BufferedOutputStream ut = new BufferedOutputStream(new FileOutputStream(new File("c:/xampp/htdocs/received_from_client.txt")));
                             byte[] buff = new byte[1024];
                             int readMe;
                             while( (readMe = inn.read(buff)) >= 0)
                             {     //reads from input stream, writes the file to disk
                                  ut.write(buff, 0, readMe);
                             // close the link to client
                             clientLink.close();                         
                             // close InputStream
                             inn.close();                         
                             // flush
                             ut.flush();                         
                             // close OutputStream
                             ut.close();     
                             //Sending response to client     
                             //============================================================
                             //============================================================
                             System.out.println("File received");
              }catch(IOException ex)
              {System.out.println("Exception.");}
                        finally
                             try
                                  if (clientLink != null) clientLink.close();
                             }catch(IOException e) {}
                 clientLink.close();
                 //serverSocket.close();
    }

    SERVER
    import java.net.*;
    import java.io.*;
    public class XMLSocketS
          public static void main(String[] args) throws IOException
                   //Establish a connection to socket
               ServerSocket serverSocket = null;
                 try {
                     serverSocket = new ServerSocket(4545);
                 } catch (IOException e) {
                     System.err.println("Could not listen on port: 4444.");
                     System.exit(1);
              Socket clientLink = null;
                  try
                             clientLink = serverSocket.accept();
                         System.out.println("Server accepts the client request.....");
                         BufferedInputStream inn = new BufferedInputStream(clientLink.getInputStream());
                             BufferedOutputStream ut = new BufferedOutputStream(new FileOutputStream(new File("c:/xampp/htdocs/received_from_client.txt")));
                             byte[] buff = new byte[1024];
                             int readMe;
                             while( (readMe = inn.read(buff)) >= 0)
                             {     //reads from input stream, writes the file to disk
                                  ut.write(buff, 0, readMe);
                             ut.flush();                         
                             //Sending response to client     
                             //============================================================
                             BufferedInputStream ftoC = null;
                             BufferedOutputStream outtoC = null;
                             // File to be send over the socket.
                             File file = new File("c:/xampp/htdocs/thesis/user_registration_response.xml");
                             try
                                  // InputStream to read the file
                                   ftoC = new BufferedInputStream(new FileInputStream(file));
                             }catch(IOException eee)
                             {System.out.println("Problem reading file");}
                             // OutputStream to socket
                             outtoC = new BufferedOutputStream(clientLink.getOutputStream());
                             byte[] buffer = new byte[1024];
                             int noRead;
                             //Checking if bytes available to read to the buffer.
                             while( (noRead = ftoC.read(buffer)) >= 0)
                                  // Writes bytes to Output Stream from 0 to total number of bytes
                                  outtoC.write(buffer, 0, noRead);
                             outtoC.flush();
                             //============================================================
                             System.out.println("File received");
              }catch(IOException ex)
              {System.out.println("Exception.");}
                        finally
                             try
                                  if (clientLink != null) clientLink.close();
                             }catch(IOException e) {}
                 clientLink.close();
                 //serverSocket.close();
          }CLIENT SIDE
    import java.io.*;
    import java.net.*;
    public class XMLSocketC
              @SuppressWarnings("deprecation")
              public static void main(String[] args)
                   // Server: "localhost" here. And port to connect is 4545.
                   String host = "127.0.0.1";          
                   int port = 4545;
                   BufferedInputStream fileIn = null;
                   BufferedOutputStream out = null;
                   // File to be send over the socket.
                   File file = new File("c:/xampp/htdocs/thesis/sensorList.xml");
                   try
                        // InputStream to read the file
                        fileIn = new BufferedInputStream(new FileInputStream(file));
                   }catch(IOException eee)
                   {System.out.println("Problem");}
                   try
                             System.out.println("Establishing Socket Connection");
                             // Opening Socket
                             Socket clientSocket = new Socket(host, port);
                             System.out.println("Socket is clear and available.....");
                             // OutputStream to socket
                             out = new BufferedOutputStream(clientSocket.getOutputStream());
                             byte[] buffer = new byte[1024];
                             int numRead;
                             //Checking if bytes available to read to the buffer.
                             while( (numRead = fileIn.read(buffer)) >= 0)
                                  // Writes bytes to Output Stream from 0 to total number of bytes
                                  out.write(buffer, 0, numRead);
                             // Flush - send file
                             out.flush();
                             //=======================================
                             DataInputStream in = new DataInputStream(new BufferedInputStream(clientSocket.getInputStream()));
                             BufferedWriter outf = new BufferedWriter(new FileWriter("c:/xampp/htdocs/received_from_server.txt",true));
                             String str;
                             while(!(str = in.readLine()).equals("EOF")) {     
                                  System.out.println("client : Read line -> <" + str + ">");
                                  outf.write(str);//Write out a string to the file
                                  outf.newLine();//write a new line to the file (for better format)
                                  outf.flush();
                             //=======================================
                             // close OutputStream
                             out.close();
                             // close InputStrean
                             fileIn.close();
                             // close Socket
                             clientSocket.close();
                        }catch (IOException e)
                        {System.out.println("Exception.");}
         Could you please point where am I doing the stupid mistake, client to server is working properly, but the opposite direction is not.
    Thanks

  • Need help coding simple chat client/server

    I'm writing a simple chat server/client... its works fine when run on console.. but when i used Frames, AWT gui's.... it seems that the thread that is used to read the incoming message is suspended ... until i press the [send] button.. It seems to me that AWT consumes the time listening to any event.... and my thread is waiting... for the some AWT specific events to occur.....
    If your interested guys.. i'm willing to post the source code.. here.

    Try using the swing components. I think they are supposed to be more thread safe than awt. There is a tutorial for dealing with threads and swing:
    http://java.sun.com/tutorial/uiswing/overview/threads.html
    hopes this helps

  • Simple iCal client/server configuration guide?

    Is there a simple guide somewhere which explains how to setup the iCal client once your iCal Server is up and running?

    Read Antonio Rocco's posts. Specifically read these:
    http://discussions.apple.com/thread.jspa?messageID=7602817&#7602817
    http://discussions.apple.com/thread.jspa?threadID=2013389&tstart=0
    Long story short, its all about the DNS config. after you get that sorted, config Open Directory. after that, iCal. Antonio will get you sorted...

  • Xfce and bluetooth socket creation error

    Trying to get blueman-applet to work with Bluez on XFCE.
    Everything works including searching and paring, but cannot send/receive from command line or nautilus/thunar.
    Blueman gives an error of socket registration. And obex_test does the same too.
    err (/usr/lib/python2.7/site-packages/blueman/ods/OdsManager.py:116)
    Couldn't create opp server (DBusException(dbus.String(u'Could not create server socket'),),)
    pa_context_event (/usr/lib/python2.7/site-packages/blueman/main/PulseAudioUtils.py:306)
    3
    err (/usr/lib/python2.7/site-packages/blueman/ods/OdsManager.py:116)
    Couldn't create ftp server (DBusException(dbus.String(u'Could not create server socket'),),)
    # su -
    # obex_test -b nn:nn:nn:nn:nn 5
    Using Bluetooth RFCOMM transport
    OBEX Interactive test client/server.
    > s
    Server register error! (Bluetooth)

    I just logged back in and saw this post of mine today.
    Since no one knew or at least produced a response to it so I would tell what I later found that day.
    The kernel I compiled was somehow missing one of the bluez support!

  • Help Needed With Basic Client/Server App

    I was wondering if anyone can help with a simple blackjack client/server application i've been writting (basically its a moddified chat application). The problem i'm having seems to lie within the connection management i've written.
    What i'm trying to get is that only 4 players can connect at one time and that each player takes a turn (which i've implemented using threads) to play their hand (as you would if you were playing it for real). The problem is that it will allow the players to connect, but oddly enough, it will not allow a new transaction to be created (i.e. allow a player to take their turn) until 2 players have connected.
    Even when it does create the transaction, after taking input from the client once, the server seems to stop doing anything without any error message of any kind.
    Its really annoyed me now, so you guys are my last hope!
    The code can be found in full here:
    Client Application: http://stuweb3.cmp.uea.ac.uk/~y0241725/WinEchoClient.java
    Server Application: http://stuweb3.cmp.uea.ac.uk/~y0241725/ThreadServer.java
    Card Class: http://stuweb3.cmp.uea.ac.uk/~y0241725/Card.java
    Deck Class: http://stuweb3.cmp.uea.ac.uk/~y0241725/Deck.java
    Please feel free to play around with this code as much as you feel necessary!

    (one last bump back up the forum before i give up on this completely)

  • Help with MIDlets - TCP client server program

    Hi I am new to using MIDlets, and I wanted to create a simple TCP client server program.. I found a tutorial in J2me forums and I am able to send a single message from server(PC) to client(Phonemulator) and from client to server. But I want to send a stream of messages to the server. Here is my program and I am stuck in the last step wher i want to send lot of messages to server. Here is my program, Could any one of u tell me how to do it? Or where am i going wrong in thsi pgm?
    Code:
    import java.io.InputStream;
    import java.io.IOException;
    import java.io.OutputStream;
    import javax.microedition.io.Connector;
    import javax.microedition.io.SocketConnection;
    import javax.microedition.io.StreamConnection;
    import javax.microedition.lcdui.Alert;
    import javax.microedition.lcdui.AlertType;
    import javax.microedition.lcdui.Command;
    import javax.microedition.lcdui.CommandListener;
    import javax.microedition.lcdui.Display;
    import javax.microedition.lcdui.Displayable;
    import javax.microedition.lcdui.Form;
    import javax.microedition.lcdui.StringItem;
    import javax.microedition.lcdui.TextField;
    import javax.microedition.midlet.MIDlet;
    import javax.microedition.midlet.MIDletStateChangeExcepti on;
    public class SocketMIDlet extends MIDlet
    implements CommandListener, Runnable {
    private Display display;
    private Form addressForm;
    private Form connectForm;
    private Form displayForm;
    private TextField serverName;
    private TextField serverPort;
    private StringItem messageLabel;
    private StringItem errorLabel;
    private Command okCommand;
    private Command exitCommand;
    private Command backCommand;
    protected void startApp() throws MIDletStateChangeException {
    if (display == null) {
    initialize();
    display.setCurrent(addressForm);
    protected void pauseApp() {
    protected void destroyApp(boolean unconditional)
    throws MIDletStateChangeException {
    public void commandAction(Command cmd, Displayable d) {
    if (cmd == okCommand) {
    Thread t = new Thread(this);
    t.start();
    display.setCurrent(connectForm);
    } else if (cmd == backCommand) {
    display.setCurrent(addressForm);
    } else if (cmd == exitCommand) {
    try {
    destroyApp(true);
    } catch (MIDletStateChangeException ex) {
    notifyDestroyed();
    public void run() {
    InputStream is = null;
    OutputStream os = null;
    StreamConnection socket = null;
    try {
    String server = serverName.getString();
    String port = serverPort.getString();
    String name = "socket://" + server + ":" + port;
    socket = (StreamConnection)Connector.open(name, Connector.READ_WRITE);
    } catch (Exception ex) {
    Alert alert = new Alert("Invalid Address",
    "The supplied address is invalid\n" +
    "Please correct it and try again.", null,
    AlertType.ERROR);
    alert.setTimeout(Alert.FOREVER);
    display.setCurrent(alert, addressForm);
    return;
    try {
    // Send a message to the server
    String request = "Hello\n\n";
    //StringBuffer b = new StringBuffer();
    os = socket.openOutputStream();
    //for (int i=0;i<10;i++)
    os.write(request.getBytes());
    os.close();
    // Read the server's reply, up to a maximum
    // of 128 bytes.
    is = socket.openInputStream();
    final int MAX_LENGTH = 128;
    byte[] buf = new byte[MAX_LENGTH];
    int total = 0;
    while (total<=5)
    int count = is.read(buf, total, MAX_LENGTH - total);
    if (count < 0)
    break;
    total += count;
    is.close();
    String reply = new String(buf, 0, total);
    messageLabel.setText(reply);
    socket.close();
    display.setCurrent(displayForm);
    } catch (IOException ex) {
    Alert alert = new Alert("I/O Error",
    "An error occurred while communicating with the server.",
    null, AlertType.ERROR);
    alert.setTimeout(Alert.FOREVER);
    display.setCurrent(alert, addressForm);
    return;
    } finally {
    // Close open streams and the socket
    try {
    if (is != null) {
    is.close();
    is = null;
    } catch (IOException ex1) {
    try {
    if (os != null) {
    os.close();
    os = null;
    } catch (IOException ex1) {
    try {
    if (socket != null) {
    socket.close();
    socket = null;
    } catch (IOException ex1) {
    private void initialize() {
    display = Display.getDisplay(this);
    // Commands
    exitCommand = new Command("Exit", Command.EXIT, 0);
    okCommand = new Command("OK", Command.OK, 0);
    backCommand = new Command("Back", Command.BACK, 0);
    // The address form
    addressForm = new Form("Socket Client");
    serverName = new TextField("Server name:", "", 256, TextField.ANY);
    serverPort = new TextField("Server port:", "", 8, TextField.NUMERIC);
    addressForm.append(serverName);
    addressForm.append(serverPort);
    addressForm.addCommand(okCommand);
    addressForm.addCommand(exitCommand);
    addressForm.setCommandListener(this);
    // The connect form
    connectForm = new Form("Connecting");
    messageLabel = new StringItem(null, "Connecting...\nPlease wait.");
    connectForm.append(messageLabel);
    connectForm.addCommand(backCommand);
    connectForm.setCommandListener(this);
    // The display form
    displayForm = new Form("Server Reply");
    messageLabel = new StringItem(null, null);
    displayForm.append(messageLabel);
    displayForm.addCommand(backCommand);
    displayForm.setCommandListener(this);

    Hello all,
    I was wondering if someone found a solution to this..I would really appreciate it if u could post one...Thanks a lot..Cheerz

  • Client/Server API with push?

    I set up a simple Socket client server architecture with the Java socket API. However, my clients sometimes are initiators or requests, and sometimes my server is the initiator of infos. Example: client want to get infos from server but also want to tell the server something. The server tells all registered clients something but also can accept requests from clients. So both sides are client AND server (depending on what they currently want to do).
    The socket API is just a classic client/server API, i.e. a server listens and a client sends requets and get responses. For my server to send requests to all clients, this is not enough. Is the only way to have all clients offering a socket server on their computer, too? so that this 2-way-request-communication works?
    This is basically some kind of "push" technology, but i don't want my clients to "poll" the server just to emulate the feature of sending requests from the server to the client. Is there some other (perhaps non-socket) API that offers this?

    @sjasja: how is the socket api symmetrical?It is, trust me! Connection initiation isn't, but after that it is. (Let's assume connected TCP/IP.)
    The server does bind() and accept(), the client does connect(). After that, the connection is symmetrical: either end can issue any number of read() and write() calls in any order. You write() to a socket, it pops out from read() at the other end (though not necessarily as a single packet; TCP/IP is stream oriented, so write() "packets" can and will be glued together, or fragmented at the whimsy of network routers and friends.)
    - accept() //wait for client to send request
    - socket.getInputStream() //read request
    - socket .getOutputStream() //write responseThose don't read or write; they get streams which you can read from and write to.
    In the server, when accept() returns a new connection, you'd start a reader thread for that client. The thread would read() (or readLine() if you implement a line-oriented protocol) and handle the incoming messages. Whenever you want to write to the client, write to the stream returned by socket.getOutputStream(). You may need to synchronize writes if you have several threads that do sequences of write()s that need to arrive at the client sequentially.
    As to the difficulty of socket programming: I don't think it particularly difficult. But then I've written dozens of socket programs since my first one in '85... The Java Tutorial socket chapter shows a simple client/server pair; not terribly difficult I think. In particular, check out the KKMultiServer at the bottom of the sample server chapter.

  • Cannot initialize SecurID client-server communications

    Hi!
    I've installed RSA/Ace Server on a machine where iPortal is running too. The path to ace server's config files is /opt/ace/data. We've configured SecurID Server Identifier Name as "Server000". We don't really know what this means, so we didn't change it.
    We've also followed the troubleshooting guide found in iPortal's Admin docs (telnet the config and helper's ports), and mimmic the portal procedures. However we get exactly the same error: cannot initialize client-server communications.
    We've also installed 2 Unix agents on 2 differente IP's. What kind of agents must be configured for authentication to work ?
    What can be causing this ?

    I've experience to connect the ace server with portal server. The configuration is very simple and I think most of the setting in your portal is correct. One thing you should make sure is to config the portal server machine as a client to the ace server and it work. (In your case, it is same machine).
    Clive Chan

  • Help needed on TCP/IP Multi-port Client-Server

    Hi all, I am trying to develop a client-server application to stream some data over a few random port numbers (defined by myself) to stream data over to the TCP server (i.e another computer) in LabVIEW. So far, I have created my application using the NI examples for "Simple Data Client + Server" and it works fine. I also understand that the "TCP Listen" VI is only able to listen for 1 TCP connection only and a way around this is to use queueing idea to receive & process the incoming data.The downside to the idea is that the "base port" (i.e initial port) needs to be the same (on every TCP client) with the TCP Server and it is not fit for the purpose I intended.
    Basically on the TCP server side, i need to chart/monitor the data on different port numbers that is being streamed real-time from the one TCP client computer. Is this possible in LabVIEW?
    Can anyone (incl. NI gurus) advise and point me in the right direction?
    *lost*
    Solved!
    Go to Solution.

    Hi
        http://zone.ni.com/devzone/cda/epd/p/id/2739 Here you can download that component.But you can also use TCP icons which is available in Data Commmunications>Protocals>TCp for communication and to read and write data use variant to flattened string. I have attached a small example where i will transfer a constant string to the host PC to check the link between client and the server. Hope this helps you.
    Attachments:
    TCP Comm.zip ‏47 KB

  • Please tell me how to use the Simple bluetooth client server example.

    Hi i used the simple bluetooth client server example in labview 7.1. Iam getting an error saying your system does not support the network operation.  I have following doubts also.
    1. Should i pair the device before running the labview.
    2. Should i enable the file transfer wizard in the software given with the bluetooth adapter.
    Please help
    Thank you
    R.Prem kumar 
    09940446193

    Hi R.Prem,
    Could you please let me know what error code is associated with this error message? Also could you please provide a description of the setup you are currently using? Thanks!
    Best regards,
    Steven

  • Bluetooth client server VIs

    Hii all,
    I am developing bluetooth application using labview bluetooth vis.
     I have my bluetooth enabled PC using bluetooth dongle. Now I want to send some data, say a string Hello from my PC to a Nokia mobile 2700 series. Is it possible?
    If Yes , in such case
    1) What will be my client and what will be the server? as I intend to use client/server VIs provided in labview example finder . What is the exact difference between client and server in bluetooth domain?
    2) Can I run both the VIs on same PC?
    3) Simple Client VI uses "Bluetooth Open connection" VI ...so which address do I need to provide there ..is it PC's bluetooth address or Nokia's bluetooth address?
    4) Simple Server VI uses "Create Listener" VI who asks for UUID...which UUID needs to be provided..is it PC's or Mobile's bluetooth?
    Please do the needful.
    Best Regards

    In looking at some of the documentation, it appears that the driver required for using Bluetooth with LabVIEW is very specific.  You need to have the Microsoft Bluetooth driver - not the driver that comes with the Bluetooth device.  Also try lowing your security settings, or removing them.
    Here are a few links to try:
    Requirements for Using Bluetooth with LabVIEW
    Bluetooth Tutorial
    Brian R.
    District Sales Manager
    Washington DC
    National Instruments

  • Client server stuff - but simple -Duke $10 offered

    Hi folks
    I want to count # of times a method in server is called by the client.
    In the server code I put a count and in each method implementation I increment count.
    I am getting following errors for the count ..
    CalculatorImpl.java:44: cannot resolve symbol
    symbol : variable count
    location: class CalculatorImpl
    count++;
    ^
    PLEASE HELP ME>>>>>
    ---------------here's the code -----------
    import java.net.MalformedURLException;
    import java.rmi.Naming;
    import java.rmi.Remote;
    import java.rmi.RemoteException;
    import java.rmi.server.UnicastRemoteObject;
    public class CalculatorImpl
    extends UnicastRemoteObject
    implements Calculator
    public static void main (String[] args)
         int count;
    try {
    new CalculatorImpl ().go ();
    } catch (Exception e) {
    System.err.println (e);
    private void go ()
    throws MalformedURLException, RemoteException
    Naming.rebind ("rmi://127.0.0.1/CalculatorImpl", this);
    public CalculatorImpl ()
    throws RemoteException
    public int add (int x, int y)
    throws RemoteException
         count++;
    return x + y;
    public int sub (int x, int y)
    throws RemoteException
         count++;
    return x - y;
    public int mul (int x, int y)
    throws RemoteException
         count++;
    return x * y;
    public int div (int x, int y)
    throws RemoteException
         count++;
    return x / y;
    public int report ()
    throws RemoteException
    return count;
    public void reset ()
    throws RemoteException
    count = 0;

    Kuno
    Can you let me know what is your opinion on following...
    I have a simple client Server code running (Loop back IP is used in Name.bind) in 2 windows, third window rmiregistry is running to lookup for the remote object.
    Say another second client come in while the first client is in the middle of the code...
    1) What will happen ?
    2) Will both clients get their own objects seperately ?
    3) How do they track the use of a method in the remote object ?
    Thanks a bunch...

  • Bluetooth : Blueman dbus error

    Hello dear archers,
    I am facing a problem trying to setup bluetooth at my desktop pc. It is a USB Bluetooth donge.
    I followed http://wiki.archlinux.org/index.php/Bluetooth but i cannot launch blueman-manager.
    I get the following error :
    Connection to BlueZ failed
    Bluez daemon is not running, blueman-manager cannot continue.
    Further in the wiki i tried
    [razor@RAZPC-LIN ~]$ hcitool scan
    Scanning ...
    00:25:BC:65:D3:75 anna petraki's iMac
    00:22:98:1E:E1:C7 1 mouni stin axladia
    So the bluetooth device is actually working. Then i tried using the bluez-simple-agent:
    dbus.exceptions.DBusException: org.freedesktop.DBus.Error.ServiceUnknown: The name org.bluez was not provided by any .service files
    I have installed all the python packages for bluetooth ( dbus-python pygobject python-pybluez )
    Do you have any idea what is going wrong?

    oh yes, sorry forgot to mention, both of them are started. here is my /etc/conf.d/bluetooth
    [razor@RAZPC-LIN ~]$ cat /etc/conf.d/bluetooth
    # Bluetooth configuraton file
    # Bluetooth services (allowed values are "true" and "false")
    # Run the bluetoothd daemon (default: true)
    #DAEMON_ENABLE="false"
    # Run hid2hci (default: false)
    HID2HCI_ENABLE="true"
    # Run the sdp daemon (default: false)
    # If this is disabled, hcid's internal sdp daemon will be used
    SDPD_ENABLE="true"
    # Run the bluetooth HID daemon (default: false)
    HIDD_ENABLE="true"
    # Activate rfcomm ports (default: false)
    RFCOMM_ENABLE="true"
    # Run bluetooth dial-up networking daemon (default: false)
    #DUND_ENABLE="true"
    # Run bluetooth PAN daemon (default: false)
    #PAND_ENABLE="true"
    # rfcomm configuration file (default: /etc/bluetooth/rfcomm.conf)
    RFCOMM_CONFIG="/etc/bluetooth/rfcomm.conf"
    # Options for hidd, dund and pand (default: none)
    #HIDD_OPTIONS=""
    #DUND_OPTIONS=""
    #PAND_OPTIONS=""
    HAL and other services like Avahi which require dbus work as expected. Does this .service file lie anywhere so i can check if it exists or it is created dynamically uppon bluetooth daemon startup?
    Thanks for your reply.

Maybe you are looking for