I modified a package called PyOBEX to make it async, now I need your
help to test it.
If you're willing too then you need to install python-bluetooth package
(check your distro instructions) and grab this package
http://groups.google.com/group/openproximity/web/async_PyOBEX.zip
Then do
unzip async_PyOBEX.zip
cd PyOBEX/src
python test.py <BT Address> <BT channel> <file name on device> <complete
path to file on disk>
You can get the bluetooth address by running: hcitool scan, then the bt
channel by running:
sdptool browse <BT Address>
The channel you need to use is the one which says "obex object push" 0x1105
If you can help then please test it with as many cellphones as possible
and test 4 situations: Non available, Reject, timeout and accept. Start
in range then go out of range might fail, need to test that.
Please mail me your results. BTW this should work even on ARM as there's
no native code other than Python socket library and Python bluetooth
binding which are all ready available on most distros.
Cheers,
Manuel
> on Ignored i get :
>
> connecting rfcomm
> connect_ex
> err_callback () {'error':<PyOBEX2.common.ErrnoError instance at
> 0x889beec>}
> error CONNECTING_RFCOMM Errno error 107: ENOTCONN () {}
> ----> It's OK
>
Good same as I do.
> on Non available i get :
>
> connecting rfcomm
> connect_ex
> err_callback () {'error':<PyOBEX2.common.ErrnoError instance at
> 0x8784eac>}
> error CONNECTING_RFCOMM Errno error 112: EHOSTDOWN () {}
> ----> It's OK
>
Good, what about success?
> On My HTC :
>
> connecting rfcomm
> connect_ex
> callback () {}
> connected rfcomm () {}
> sending 7
> data_ready 3
> BluetoothAsyncSocket.recv 3 0 3
> pending 0
> BluetoothAsyncSocket.recv 0 0 0
> pending 0
> 195 3 3
> callback () {'response':<PyOBEX.responses.UnknownResponse instance at
> 0x8ead4ec>}
> connected obex<PyOBEX2.asyncoop.Client object at 0x8ea8aec>
> <PyOBEX.responses.UnknownResponse instance at 0x8ead4ec>
>
ok not good, I will add more debugging information. Which HTC are you
testing? Which OS is it running?
Manuel
And sending me the output.
Manuel
>> ok not good, I will add more debugging information. Which HTC are you
>> testing? Which OS is it running?
>>
> the HTC is htc 3g touch with Windows Mobile OS
>
>
Ok good please test the new code, I'm worried about the not known
response, are you asked for any pairing on this cellphone when you do
obex push?
Manuel
> on Accepted:
> callback (<PyOBEX.responses.Success instance at 0x845cf2c>,) {}
>
perfect
> on Non Avalaible :
>
> error CONNECTING_RFCOMM Errno error 112: EHOSTDOWN () {}
>
great
> p.s IMPORTANT : with this cell on the last openproximity2 devel
> versione i get always : "Failed to retrieve services"
>
Weird, I test with that cellphone as well.
> With Nokia 2323-c2:
>
> on Rejected :
> error CONNECTING_RFCOMM Errno error 111: ECONNREFUSED () {}
>
> on accepted:
> callback (<PyOBEX.responses.Success instance at 0x9ebdf2c>,) {}
>
> on Ignored:
> error CONNECTING_RFCOMM Errno error 107: ENOTCONN () {}
>
> on Non Avalaible :
> error CONNECTING_RFCOMM Errno error 112: EHOSTDOWN () {}
>
exactly the same values I get.
> On My HTC 3g Touch i get the same of the prevuoius test version :
>
> decode_connection C3 00 03
>
Ok this is not good, 0xC3 header in obex means not accepted. Can you use
obexftp with this guy? Can you send me the hcidump -X -V output for this?
>> A cellphone setting I guess then. Good to know.>> Good, what about success?
>>
> Yes maybe, but with this version the massages stop after the SECOND
> try
>
Weird. I have seen some weird things with a broken BT chip I bought a
few weeks ago. It tells you it's trying to connect but the cellphone
never gets the request.
Manuel
Cheers,
Manuel
> On Reject:
> connecting rfcomm
> connect_ex
> err_callback () {'error':<PyOBEX2.common.ErrnoError instance at
> 0x1d56c0>}
> error CONNECTING_RFCOMM Errno error 111: ECONNREFUSED () {}
>
> On Accepted:
> callback (<PyOBEX.responses.Success instance at 0x1d56c0>,) {}
> uploaded completed
>
Good.
> On No device:
> error CONNECTING_RFCOMM Errno error 112: EHOSTDOWN () {}
>
Good.
> When I ignore the incoming bluetooth message in this phone the time
> that the message appears in the phone is short and error is returned
>
That's up to the cellphone.
> With Motorola W337
>
> On Timeout:
> connect_ex
> err_callback () {'error':<PyOBEX2.common.ErrnoError instance at
> 0x1d56c0>}
> error CONNECTING_RFCOMM Errno error 107: ENOTCONN () {}
>
Good.
> On Reject:
> connecting rfcomm
> connect_ex
> err_callback () {'error':<PyOBEX2.common.ErrnoError instance at
> 0x1d56c0>}
> error CONNECTING_RFCOMM Errno error 13: EACCES () {}
>
Good. Just a different errno, but still different from timeout.
> On Accepted:
> I need to put PIN, I've tried with 1234 and 0000 and all are wrong.
>
It's up to your pin manager. Don't know what you set up. This is not
part of the python obex implementation.
> On No device:
> connecting rfcomm
> error CONNECTING_RFCOMM Errno error 112: EHOSTDOWN () {}
>
Yes this should always be the same.
Manuel
I created an online form, would you mind to put the information on it?
Manuel