Hi Christian!

I have some feedback about the ruby binding. The optional parameter to
connect() works, but not exactaly as you said. I'll explain with
code... is easier.

This works and uses hci0:

----------------------
#!/usr/bin/env ruby
require 'obexftp'

filename = '/home/mergulhao/tmp/avatar/avatar10.jpg'

obex = Obexftp::Client.new(Obexftp::BLUETOOTH)
puts obex.connectpush('00:02:EE:AC:E0:51', 9)
puts obex.put_file(filename)
puts obex.disconnect
----------------------

This works and uses hci0:

----------------------
#!/usr/bin/env ruby
require 'obexftp'

filename = '/home/mergulhao/tmp/avatar/avatar10.jpg'

obex = Obexftp::Client.new(Obexftp::BLUETOOTH)
puts obex.connectpush('00:02:EE:AC:E0:51', 9, '0')
puts obex.put_file(filename)
puts obex.disconnect
----------------------

This works and uses hci0:

----------------------
#!/usr/bin/env ruby
require 'obexftp'

filename = '/home/mergulhao/tmp/avatar/avatar10.jpg'

obex = Obexftp::Client.new(Obexftp::BLUETOOTH)
puts obex.connectpush('00:02:EE:AC:E0:51', 9, 'hci0')
puts obex.put_file(filename)
puts obex.disconnect
----------------------

This works and uses hci1:

----------------------
#!/usr/bin/env ruby
require 'obexftp'

filename = '/home/mergulhao/tmp/avatar/avatar10.jpg'

obex = Obexftp::Client.new(Obexftp::BLUETOOTH)
puts obex.connectpush('00:02:EE:AC:E0:51', 9, 'hci1')
puts obex.put_file(filename)
puts obex.disconnect
----------------------

This does not work, returning -1 in all prints:

----------------------
#!/usr/bin/env ruby
require 'obexftp'

filename = '/home/mergulhao/tmp/avatar/avatar10.jpg'

obex = Obexftp::Client.new(Obexftp::BLUETOOTH)
puts obex.connectpush('00:02:EE:AC:E0:51', 9, '1')
puts obex.put_file(filename)
puts obex.disconnect
----------------------

Is there a way to know what occurs to it return -1? I remember when I
learned the ussp-push source code there is some error codes that says
if it was an connection error, transfer error, negation from the cell
phone and so on.

-- 
Sylvestre Mergulhão - Free Software Development
-----------------------------------------------------------------------
http://mergulhao.info
http://just-remind.us

On Fri, Aug 8, 2008 at 6:42 PM, Christian Zuckschwerdt
<[EMAIL PROTECTED]> wrote:
> Sylvestre,
>
> Am 08.08.2008 um 23:32 schrieb Sylvestre Mergulhão:
>
>> Oh! I think I was crazy when I do not saw the optional parameter.
>> Sorry for the inconvenience. I'll test it later.
>
> Entirely not your fault, the documentation on the bindings is sparse.
> Please keep reporting your troubles (and perhaps things that do work)
> -- I'll roll that into the documentation some day ;)

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Openobex-users mailing list
Openobex-users@lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/openobex-users

Reply via email to