On Sep 11, 3:59 am, Stefano Sanna <[email protected]> wrote:
> On Fri, Sep 11, 2009 at 6:57 AM, windstorm <[email protected]> wrote:
>
> I'll check and let you know.
Thanks!
>
> > 3 Did you ever notice and consider merge all the function provided
> > here:
>
> >http://groups.google.com/group/android-platform/browse_thread/thread/...
>
> > Or you have noticed this?
>
> I didn't read this post, thank you for hint. Since I was not aware of
> that discussion, I've written my (simple) API from scratch, trying to
> keep them very simple. Do you think it would be better to align the
> library to that proposals? Is that the direction that will be taken by
> Google?
I'm not using it yet, since it requires recompiling of own version of
the framework. What I want is just data communication through SPP
between my phone and my device, so the simpler API is, the better for
my project:)
I got 2 questions during my using:
1 I can pair with my device, but can not get connected. Error
information is
D/LocalBluetoothDevice( 889): 00:1E:4C:FA:54:9F is already paired
D/AndroidBluetoothTest( 889): Connecting...
D/LocalBluetoothDevice( 889): creating new BluetoothSocket for 00:1E:
4C:FA:54:9F on port 6
V/bluetooth_RfcommSocket.cpp( 889): initializeNativeDataNative
V/bluetooth_RfcommSocket.cpp( 889): createNative
V/bluetooth_RfcommSocket.cpp( 889): connectNative
E/bluetooth_RfcommSocket.cpp( 889): connect error: No route to host
(113)
The steps I did are exactly as the sample app, and the local
information is obtained normally:
localDevice = LocalBluetoothDevice.initLocalDevice(this);
remoteDevice = localDevice.getRemoteBluetoothDevice(address_kkli);
RemoteBluetoothDeviceEventHandler listener = new
RemoteBluetoothDeviceEventHandler();
listener.device = remoteDevice;
remoteDevice.setListener(listener);
remoteDevice.pair();
In pair:
RemoteBluetoothDevice device
device.openSocket(port);
Then it stuck here because of connect error. Do you have any hint? I
have tried to rectify the port number, so shouldn't be this problem.
2 How can you know the available channel on remote device? the
Socket.getPort only return the number I assigned to port parameter in
connectTo function. There is a getServiceChannel method in Interface
RemoteBluetoothDeviceListener, but seem like it would never be called
at lease before the connection, since I haven't set up the connection
yet, so I don't know what will happen next.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---