On Mon, Jun 8, 2015 at 2:37 PM, Aleksandar Kuktin <[email protected]> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
>>On Mon, 8 Jun 2015 13:23:34 +0000
>>naruto canada <[email protected]> wrote:
>
>> # modified from:
>> http://coderecipes.blogspot.com/2012/07/sending-file-with-obex-in-python.html
>> This code is at the highest level (Application Code):
>>
>> #!/usr/bin/env python
>> from PyOBEX.client import BrowserClient
>> import sys
>> import platform
>>
>> if len(sys.argv) < 2: # number of argv needed + 1
>>     sys.exit('Usage: %s bluetooth.mac.addr' % sys.argv[0])
>>
>> address = sys.argv[1]
>>
>> if platform.machine() == "ppc":
>>   channel=int("0x0a000000", 0)
>> else:
>>   channel=10 # OBEX File Transfer
>>
>> # send file
>> print 'sending file to %s...'%address
>> client = BrowserClient(address, channel)
>> client.connect()
>> client.put('test.txt', sys.argv[2])
>> client.disconnect()
>
> Thank God, PyOBEX is short so I can trace it, sort of (I don't speak
> Python).
>
> Does the failure that you fixed happen in the call to client.connect()?
> If so, then we can rule out PyOBEX because it treats the value of the
> channel opaquely and just passes it to the lower layer. Unfortunately,
> I don't know Python, I can't decipher its importing, so I don't know
> what that lower layer is. The outgoing call is in PyOBEX/client.py on
> line 121. If you can tell me where that call ends up I could keep
> tracing it - or you can do it yourself, but I'd still like to see where
> it ends up.

I have python trace log (does not help me much), and also btmon logs
for good and bad pairing when using bluetoothctl.
I am guessing, none of the intervening library does anything to
convert the port (or channel) number. My question should be "should
any conversion be done at lower level or not?" Maybe this is the
correct behavior (or not)? This is the point I am not sure about.
Because, one would assume (probably wrongly), that above Python,
everything platform related (or differences in platforms) should have
been taken cared of...

>
> - --
> Svi moji e-mailovi su kriptografski potpisani. Proverite ih.
> All of my e-mails are cryptographically signed. Verify them.
> - --
> You don't need an AI for a robot uprising.
> Humans will do just fine.
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.15 (GNU/Linux)
>
> iQIcBAEBAgAGBQJVdaiYAAoJEKa4cgqNx31/WmcP/0mGc9UUakp336EYRoj0LUjG
> /gGxBSKS+J/f5p65qD3+wVAr/ZX29iwZbd8b7RxEFobtDBXJP9bfCckZLlsD67O2
> /+saRsXJ1A8megG80zmo0wAFo1dqc2CyDjj7AIJ/QkNP30wlxo6PfBkw82xyX2pY
> ML3DKJ1ZiwAkaw5v2Ah0jOSqruSALhVUPCOCUnRzBKe5E+jwvn78xs/MyW4Du0OR
> TVvnfksH7c6rNX6SJdiGxdPMQmfODYxwAOU+BuSWk+ZxP0QESvJxiMdu4EMph2kg
> ZCf13YU9X8/awZx009Ya/7EMRxgn2/z4uIulfnfyY6edkCd6XgMll7SHjNM62He0
> 9vSnV0gC8Xh+LDGHuHg/4RA/zsECcexioM1mmqXHhYNVzxA2KP7AGuokz9Pa0UQq
> BxgBuhgMCkCv5Tj0vfnyW4CkcXLQ0eGrDnHhidoZyt3FvOmajkmQNZt3oo1jzG/s
> KRCsmCe0YiDACy3zgl94pE8GKaO6wrFlPpUh3MtgYYBY1M/p1m9iu6HgQHu2QXmP
> xRCFDaNPNkv0VjfJoOhWGGoJrzKUKoUOBHX8+f2w119SEtcQ+JxJkxkEBs9JL7rr
> +dzB/IHDneypEsW7FkZt54QE2M+5qPpT8opE8Z9ejaU6gZgjKSURlj6YqtBLdrl/
> TrhbSSxkpOt9m5Jcw+9x
> =/9gw
> -----END PGP SIGNATURE-----
> --
> http://lists.linuxfromscratch.org/listinfo/blfs-dev
> FAQ: http://www.linuxfromscratch.org/blfs/faq.html
> Unsubscribe: See the above information page

Attachment: logs.tar.gz
Description: GNU Zip compressed data

-- 
http://lists.linuxfromscratch.org/listinfo/blfs-dev
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to