bluetooth - some problems
Davide Varvello
d.varvello at quinary.com
Wed Feb 1 14:01:59 UTC 2006
Hi All,
After a while here I'm with my experiments with squeak, bluetooth and
my mac.
I've some problems to connect to a device and establish an OBEX
connection (an ftp connection).
As you can see from the attached class there are 2 methods: firstStep
and secondStep. In the firstStep I'm trying to connect to the ftp
service of the device and then in the secondStep I'm going to send an
image.
If you call these two methods in a row, you'll probably see some
prints in the transcript like these ones:
firstStep:
bluetoothDevice isConnected - 0
obexSession hasOpenTransportConnection - 0
transfer isBusy - 1
transfer isConnected - 0
secondStep:
bluetoothDevice isConnected - 0
obexSession hasOpenTransportConnection - 0
transfer isBusy - 1
transfer isConnected - 0
As you can see transfer is always busy, and I can't understand why.
Instead the same objective-c code (this is also in attachment) shows
other kinds of prints, and it really permits the connection to the
device.
If you see the methods are: selectAndOpenFTPDevice and
actionSelectImage, the first is like my firstStep method, the second
is a method that shows a dialog to choose an image to send. When
selectAndOpenFTPDevice is executed, the console shows:
2006-02-01 14:42:55.499 bluespam[777]
selectAndOpenFTPDevice----------------------
2006-02-01 14:42:55.499 bluespam[777] mTransferServices isBusy
and when actionSelectImage is executed the console shows:
2006-02-01 14:43:01.690 bluespam[777] actionSelectImage before
sending-------------------
2006-02-01 14:43:01.690 bluespam[777] mBluetoothDevice isConnected
2006-02-01 14:43:01.691 bluespam[777] mOBEXSession
hasOpenTransportConnection
2006-02-01 14:43:01.691 bluespam[777] mTransferServices isConnected
than you can go on and succesfully sending the image
That's different from my prints on the transcript, and it seems to me
the my squeak spike blocks somehow the connection, but I don't know why.
Can you help me, please?
TIA
Davide
-------------- next part --------------
A non-text attachment was scrubbed...
Name: BTSpike.st
Type: application/octet-stream
Size: 2156 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20060201/fc57e91b/BTSpike.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SpamController.m
Type: application/octet-stream
Size: 4957 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20060201/fc57e91b/SpamController.obj
-------------- next part --------------
p.s. a more elaborated example of the objc code is here: http://
lists.apple.com/archives/bluetooth-dev/2005/Jul/msg00005.html
More information about the Squeak-dev
mailing list
|