Hi All,
I’m working on an application that works as follows:
From a Nokia 6670 I connect using bluetooth to a GPS Receiver, I get the data and then I send it across the Internet to a server.
The problem I’m having is that the phone connects once to the GPS Receiver, and the second time it throws an exception like:
Exception: java.io.IOException
SymbianOS error = -11:
General: System Error
My Connection funciton looks like this:
Does anybody know how to solve this problem?Code:public void myFunct() { StreamConnection conn = null; InputStream is = null; try{ conn = (StreamConnection)Connector.open(url); is = conn.openInputStream(); int i = 0; char c; String s = ""; // Start reading the data from the GPS do{ i = is.read(); // read one byte at the time. c = (char)i; s += c; }while(i != -1); this.GPS.append(s, null); // closing the connection conn.close(); }catch(Exception e) { Alert alert = new Alert("Error"); alert.setType(AlertType.ERROR); //soundAlert.setTimeout(20); alert.setString(e.toString()); display.setCurrent(alert); } }

Reply With Quote



