| Reply | « Previous Thread | Next Thread » |
|
From the 6600, I am able to use device discovery to get devices, and then find a Serial Port Service (SPS) on a device. I can then bond to that, this works fine.
However, I am having problems when trying to open a SPS on the 6600 when orginated from another device (in my case a PC). If I use the PC BT application to scan the 6600 (with no midlet running), it shows numerious profiles available including a SPS. Next, I start my midlet which opens a server socket as; try { StreamConnectionNotifier server = null; LocalDevice local = LocalDevice.getLocalDevice(); local.setDiscoverable(DiscoveryAgent.GIAC); server = (StreamConnectionNotifier)Connector.open( "btspp://localhost:11111111111111111111111111111111"); devList.append("Waiting ...",null); conn = server.acceptAndOpen(); devList.append("Open!",null); InputStream is = conn.openInputStream(); byte[] buff = new byte[128]; for (int i=0; i<3; i++) { is.read(buff); String s = new String(buff); devList.append(s.length()+", "+s,null); } is.close(); conn.close(); server.close(); } catch (Exception ex) { alert.setString(ex.toString()); display.setCurrent(alert); } The midlet runs fine with no errors, and sits blocking on the acceptAndOpen() method. I assume I now have 2 SPS's running the Symbian OS's one and my JSR-82 one, is this right? Now, I rescan the services on the 6600 from the PC, this still show only one SPS, is this mine or the original Symbian OS one? If I try and open this SPS via the PC it fails. How do I make the SPS for the midlet take priroity over the standard one that is always running? Help please? |
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|