LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   Send files from bluetooth (http://www.linuxquestions.org/questions/slackware-14/send-files-from-bluetooth-4175412311/)

silendo 06-19-2012 01:28 PM

Send files from bluetooth
 
hello friends, i have a problem with bluetooth on my notebook.I use the integrated card with "ath3k" module:
Code:

hci0:  Type: BR/EDR  Bus: USB
  BD Address: 74:DE:2B:CC:14:A2  ACL MTU: 1022:8  SCO MTU: 121:3
  UP RUNNING
  RX bytes:8812 acl:20 sco:0 events:151 errors:0
  TX bytes:760 acl:21 sco:0 commands:40 errors:0

I do these steps:
Code:

*) hcitool scan
00:25:CF:70:10:77  SLS

*) sdptool browse 00:25:CF:70:10:77
Service Name: OBEX File Transfer
Service RecHandle: 0x100e9
Service Class ID List:
  "OBEX File Transfer" (0x1106)
Protocol Descriptor List:
  "L2CAP" (0x0100)
  "RFCOMM" (0x0003)
    Channel: 9
  "OBEX" (0x0008)
Language Base Attr List:
  code_ISO639: 0x454e
  encoding:    0x6a
  base_offset: 0x100
Profile Descriptor List:
  "OBEX File Transfer" (0x1106)
    Version: 0x0100

*)obexftp -v -b 00:25:CF:70:10:77 -B 9 -p file.txt

If i send the file with obexftp, my phone ask me a pin code...
I try "1234" ,"0000" and other but it's don't work. You have a many idea?
this is the result:
Code:

Connecting...failed: connect
Tried to connect for 3001ms
Interupted/bad reception or the device moved out of range: Operation now in progress
Still trying to connect
Connecting...failed: connect
Tried to connect for 0ms
error on connect(): Device or resource busy
Still trying to connect
Connecting...failed: connect
Tried to connect for 0ms
error on connect(): Device or resource busy
Still trying to connect

Thank you friends

Didier Spaier 06-20-2012 06:11 AM

I tried it (not the same phone, mine is a LG-C100) and the connection was refused, and the phone says "association failed".

But I have no problem using blueman to transfer files, thus let me suggest to give it a go.

san 06-20-2012 06:18 AM

did you try any gui-way to connect (blueman-applet)?
usually you have to choose a pin on one device, and then you confirm it on the other one, blueman allows you to "trust" a device, so you'll only have to do this once.
unfortunately, the information for bluetooth, pin and cli that google provides seems outdated, at least it doesn't correspond to slackware's bluetooth-package.
generally, using bluetooth for file transfer is quite a pain, i try to avoid it whenever possible.

silendo 06-20-2012 02:22 PM

Hello friends, thank you for reply.
Didier: when i run "blueman-applet", i recive this error:
Code:

....
....
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.FileNotFound: Failed to connect to socket /var/run/dbus/system_bus_socket: File o directory non esistente
_________
save (/usr/lib/python2.6/site-packages/blueman/plugins/config/File.py:117)
Saving config
Exception AttributeError: "'NoneType' object has no attribute 'Bus'" in <bound method File.__del__ of <File object at 0x84c76bc (blueman+plugins+ConfigPlugin+ConfigPlugin at 0x8302bd0)>> ignored

...bluetoothd command:
Code:

bluetoothd -nd
bluetoothd[13098]: Bluetooth deamon 4.91
bluetoothd[13098]: src/main.c:parse_config() parsing main.conf
bluetoothd[13098]: src/main.c:parse_config() discovto=0
bluetoothd[13098]: src/main.c:parse_config() pairto=0
bluetoothd[13098]: src/main.c:parse_config() pageto=8192
bluetoothd[13098]: src/main.c:parse_config() name=%h-%d
bluetoothd[13098]: src/main.c:parse_config() class=0x000100
bluetoothd[13098]: src/main.c:parse_config() discov_interval=0
bluetoothd[13098]: src/main.c:parse_config() Key file does not have key 'DeviceID'
bluetoothd[13098]: Unable to get on D-Bus

I think that problem of the "blueman-applet" depend by bluetoothd error.
Have you a idea for bluetoothd and blueman-applet works?
Thank you friends

Didier Spaier 06-20-2012 03:39 PM

My guess is the dbus daemon didn't start, because you didn't make /etc/rc.d/rc.messagebus executable. Try this as root:
Code:

chmod +x /etc/rc.d/rc.messagebus
/etc/rc.d/rc.messagebus start

Once /etc/rc.d/rc.messagebus is executable, the daemon will be started automatically after booting.

silendo 06-21-2012 05:25 AM

thank you didier, i tryed it and blueman-applet work...but when i scan bluetooth device, i have "Operation not permitted"...if i use "sudo blueman-applet" result is equal.

IMAGE_1

When i change device name, result is:

IMAGE_2

rc.messages and bluetoothd work correctly.
I recive this notify from bluetoothd -nd:

Code:

bluetoothd[12432]: Bluetooth deamon 4.91
bluetoothd[12432]: src/main.c:parse_config() parsing main.conf
bluetoothd[12432]: src/main.c:parse_config() discovto=0
bluetoothd[12432]: src/main.c:parse_config() pairto=0
bluetoothd[12432]: src/main.c:parse_config() pageto=8192
bluetoothd[12432]: src/main.c:parse_config() name=%h-%d
bluetoothd[12432]: src/main.c:parse_config() class=0x000100
bluetoothd[12432]: src/main.c:parse_config() discov_interval=0
bluetoothd[12432]: src/main.c:parse_config() Key file does not have key 'DeviceID'
bluetoothd[12432]: Starting SDP server
bluetoothd[12432]: binding L2CAP socket: Permission denied
bluetoothd[12432]: Server initialization failed
bluetoothd[12432]: src/plugin.c:plugin_init() Loading builtin plugins
bluetoothd[12432]: src/plugin.c:add_plugin() Loading audio plugin
bluetoothd[12432]: src/plugin.c:add_plugin() Loading input plugin
bluetoothd[12432]: src/plugin.c:add_plugin() Loading serial plugin
bluetoothd[12432]: src/plugin.c:add_plugin() Loading network plugin
bluetoothd[12432]: src/plugin.c:add_plugin() Loading service plugin
bluetoothd[12432]: src/plugin.c:add_plugin() Loading hciops plugin
bluetoothd[12432]: src/plugin.c:add_plugin() Loading mgmtops plugin
bluetoothd[12432]: src/plugin.c:add_plugin() Loading formfactor plugin
bluetoothd[12432]: src/plugin.c:add_plugin() Loading storage plugin
bluetoothd[12432]: src/plugin.c:plugin_init() Loading plugins /usr/lib/bluetooth/plugins
bluetoothd[12432]: plugins/service.c:register_interface() path /org/bluez/12432/any
bluetoothd[12432]: plugins/service.c:register_interface() Registered interface org.bluez.Service on path /org/bluez/12432/any
bluetoothd[12432]: network/manager.c:read_config() /etc/bluetooth/network.conf: Key file does not have key 'DisableSecurity'
bluetoothd[12432]: network/manager.c:read_config() Config options: Security=true
bluetoothd[12432]: input/manager.c:input_manager_init() input.conf: Key file does not have key 'IdleTimeout'
bluetoothd[12432]: audio/manager.c:audio_manager_init() audio.conf: Key file does not have key 'AutoConnect'
bluetoothd[12432]: audio/unix.c:unix_init() Unix socket created: 6
bluetoothd[12432]: plugins/hciops.c:hciops_init()
bluetoothd[12432]: plugins/hciops.c:hciops_setup()
bluetoothd[12432]: Failed to open RFKILL control device
bluetoothd[12432]: src/main.c:main() Entering main loop
bluetoothd[12432]: plugins/hciops.c:init_known_adapters()
bluetoothd[12432]: plugins/hciops.c:init_device() hci0
bluetoothd[12432]: Listening for HCI events on hci0
bluetoothd[12432]: plugins/hciops.c:init_conn_list() hci0
bluetoothd[12432]: HCI dev 0 up
bluetoothd[12432]: plugins/hciops.c:device_devup_setup() hci0
bluetoothd[12432]: plugins/hciops.c:read_local_version_complete() Got version for hci0
bluetoothd[12432]: src/adapter.c:btd_adapter_ref() 0xb77fc0a8: ref=1
bluetoothd[12432]: plugins/hciops.c:hciops_read_bdaddr() hci0
bluetoothd[12432]: plugins/hciops.c:hciops_read_local_version() hci0
bluetoothd[12432]: plugins/hciops.c:hciops_read_local_features() hci0
bluetoothd[12432]: src/sdpd-database.c:sdp_init_services_list()
bluetoothd[12432]: plugins/hciops.c:hciops_add_uuid() hci0
bluetoothd[12432]: plugins/hciops.c:update_service_classes() hci0 value 0
bluetoothd[12432]: plugins/hciops.c:hciops_add_uuid() hci0
bluetoothd[12432]: plugins/hciops.c:update_service_classes() hci0 value 0
bluetoothd[12432]: plugins/service.c:register_interface() path /org/bluez/12432/hci0
bluetoothd[12432]: plugins/service.c:register_interface() Registered interface org.bluez.Service on path /org/bluez/12432/hci0
bluetoothd[12432]: network/manager.c:network_server_probe() path /org/bluez/12432/hci0
bluetoothd[12432]: src/adapter.c:btd_adapter_ref() 0xb77fc0a8: ref=2
bluetoothd[12432]: l2cap_bind: Permission denied (13)
bluetoothd[12432]: src/adapter.c:btd_adapter_unref() 0xb77fc0a8: ref=1
bluetoothd[12432]: network-server: Invalid argument (22)
bluetoothd[12432]: serial/manager.c:proxy_probe() path /org/bluez/12432/hci0
bluetoothd[12432]: src/adapter.c:btd_adapter_ref() 0xb77fc0a8: ref=2
bluetoothd[12432]: serial/proxy.c:proxy_register() Registered interface org.bluez.SerialProxyManager on path /org/bluez/12432/hci0
bluetoothd[12432]: Failed to listen on control channel
bluetoothd[12432]: input-server: Operation not permitted (1)
bluetoothd[12432]: audio/manager.c:headset_server_probe() path /org/bluez/12432/hci0
bluetoothd[12432]: src/adapter.c:btd_adapter_ref() 0xb77fc0a8: ref=3
bluetoothd[12432]: audio/manager.c:audio_adapter_ref() 0xb77fc278: ref=1
bluetoothd[12432]: audio/manager.c:headset_server_init() audio.conf: Key file does not have key 'Master'
bluetoothd[12432]: src/sdpd-service.c:add_record_to_server() Adding record with handle 0x10000
bluetoothd[12432]: plugins/hciops.c:hciops_add_uuid() hci0
bluetoothd[12432]: plugins/hciops.c:update_service_classes() hci0 value 0
bluetoothd[12432]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00000003-0000-1000-8000-00805f9
bluetoothd[12432]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00000100-0000-1000-8000-00805f9
bluetoothd[12432]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00001002-0000-1000-8000-00805f9
bluetoothd[12432]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00001108-0000-1000-8000-00805f9
bluetoothd[12432]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00001112-0000-1000-8000-00805f9
bluetoothd[12432]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00001203-0000-1000-8000-00805f9
bluetoothd[12432]: audio/headset.c:headset_config_init() audio.conf: Key file does not have key 'SCORouting'
bluetoothd[12432]: src/sdpd-service.c:add_record_to_server() Adding record with handle 0x10001
bluetoothd[12432]: plugins/hciops.c:hciops_add_uuid() hci0
bluetoothd[12432]: plugins/hciops.c:update_service_classes() hci0 value 64
bluetoothd[12432]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00000003-0000-1000-8000-00805f9
bluetoothd[12432]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00000100-0000-1000-8000-00805f9
bluetoothd[12432]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00001002-0000-1000-8000-00805f9
bluetoothd[12432]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 0000111e-0000-1000-8000-00805f9
bluetoothd[12432]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 0000111f-0000-1000-8000-00805f9
bluetoothd[12432]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00001203-0000-1000-8000-00805f9
bluetoothd[12432]: audio/manager.c:state_changed() /org/bluez/12432/hci0 powered on
bluetoothd[12432]: audio/telephony.c:telephony_init()
bluetoothd[12432]: audio/headset.c:telephony_ready_ind() Telephony plugin initialized
bluetoothd[12432]: audio/headset.c:print_ag_features() HFP AG features: "Ability to reject a call" "Enhanced call status" "Extended Error Result Codes"
bluetoothd[12432]: audio/manager.c:a2dp_server_probe() path /org/bluez/12432/hci0
bluetoothd[12432]: audio/manager.c:audio_adapter_ref() 0xb77fc278: ref=2
bluetoothd[12432]: audio/a2dp.c:a2dp_register() audio.conf: Key file does not have key 'Enable'
bluetoothd[12432]: audio/a2dp.c:a2dp_register() audio.conf: Key file does not have key 'Disable'
bluetoothd[12432]: audio/a2dp.c:a2dp_register() audio.conf: Key file does not have group 'A2DP'
bluetoothd[12432]: audio/a2dp.c:a2dp_register() audio.conf: Key file does not have group 'A2DP'
bluetoothd[12432]: audio/a2dp.c:a2dp_register() audio.conf: Key file does not have group 'A2DP'
bluetoothd[12432]: audio/a2dp.c:a2dp_register() audio.conf: Key file does not have group 'A2DP'
bluetoothd[12432]: audio/avdtp.c:avdtp_init() audio.conf: Key file does not have key 'Master'
bluetoothd[12432]: l2cap_bind: Permission denied (13)
bluetoothd[12432]: audio/manager.c:audio_adapter_unref() 0xb77fc278: ref=1
bluetoothd[12432]: audio-a2dp: Operation not permitted (1)
bluetoothd[12432]: audio/manager.c:avrcp_server_probe() path /org/bluez/12432/hci0
bluetoothd[12432]: audio/manager.c:audio_adapter_ref() 0xb77fc278: ref=2
bluetoothd[12432]: audio/control.c:avrcp_register() audio.conf: Key file does not have key 'Master'
bluetoothd[12432]: src/sdpd-service.c:add_record_to_server() Adding record with handle 0x10002
bluetoothd[12432]: plugins/hciops.c:hciops_add_uuid() hci0
bluetoothd[12432]: plugins/hciops.c:update_service_classes() hci0 value 64
bluetoothd[12432]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00000017-0000-1000-8000-00805f9
bluetoothd[12432]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00000100-0000-1000-8000-00805f9
bluetoothd[12432]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00001002-0000-1000-8000-00805f9
bluetoothd[12432]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 0000110c-0000-1000-8000-00805f9
bluetoothd[12432]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 0000110e-0000-1000-8000-00805f9
bluetoothd[12432]: src/sdpd-service.c:add_record_to_server() Adding record with handle 0x10003
bluetoothd[12432]: plugins/hciops.c:hciops_add_uuid() hci0
bluetoothd[12432]: plugins/hciops.c:update_service_classes() hci0 value 64
bluetoothd[12432]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00000017-0000-1000-8000-00805f9
bluetoothd[12432]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00000100-0000-1000-8000-00805f9
bluetoothd[12432]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00001002-0000-1000-8000-00805f9
bluetoothd[12432]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 0000110e-0000-1000-8000-00805f9
bluetoothd[12432]: l2cap_bind: Permission denied (13)
bluetoothd[12432]: src/sdpd-service.c:remove_record_from_server() Removing record with handle 0x10003
bluetoothd[12432]: plugins/hciops.c:hciops_remove_uuid() hci0
bluetoothd[12432]: plugins/hciops.c:update_service_classes() hci0 value 64
bluetoothd[12432]: src/sdpd-service.c:remove_record_from_server() Removing record with handle 0x10002
bluetoothd[12432]: plugins/hciops.c:hciops_remove_uuid() hci0
bluetoothd[12432]: plugins/hciops.c:update_service_classes() hci0 value 64
bluetoothd[12432]: audio-control: Operation not permitted (1)
bluetoothd[12432]: plugins/formfactor.c:formfactor_probe() Setting 0x000100 for major/minor device class
bluetoothd[12432]: plugins/hciops.c:hciops_set_dev_class() hci0 major 1 minor 0
bluetoothd[12432]: plugins/hciops.c:hciops_unblock_device() hci0 dba 00:00:00:00:00:00
bluetoothd[12432]: Clearing blocked list failed: Permission denied (13)
bluetoothd[12432]: plugins/hciops.c:hciops_load_keys() hci0 keys 0 debug_keys 0
bluetoothd[12432]: plugins/hciops.c:hciops_get_conn_list() hci0
bluetoothd[12432]: src/manager.c:btd_manager_register_adapter() Adapter /org/bluez/12432/hci0 registered
bluetoothd[12432]: src/adapter.c:btd_adapter_ref() 0xb77fc0a8: ref=4
bluetoothd[12432]: plugins/hciops.c:hciops_set_name() hci0, name sls-0
bluetoothd[12432]: plugins/hciops.c:hciops_set_dev_class() hci0 major 1 minor 0
bluetoothd[12432]: audio/manager.c:state_changed() /org/bluez/12432/hci0 powered on
bluetoothd[12432]: plugins/hciops.c:hciops_disable_cod_cache() hci0 cache_enable 1
bluetoothd[12432]: plugins/hciops.c:hciops_disable_cod_cache() hci0 current_cod 0x000000 wanted_cod 0x400100
bluetoothd[12432]: plugins/hciops.c:write_class() hci0 class 0x400100
bluetoothd[12432]: Adapter /org/bluez/12432/hci0 has been enabled
bluetoothd[12432]: plugins/hciops.c:hciops_set_discoverable() hci0 discoverable 0
bluetoothd[12432]: plugins/hciops.c:hciops_set_pairable() hci0 pairable 1
bluetoothd[12432]: plugins/hciops.c:hciops_stop_inquiry() hci0
bluetoothd[12432]: src/adapter.c:btd_adapter_unref() 0xb77fc0a8: ref=3
bluetoothd[12432]: plugins/hciops.c:read_tx_power_complete() hci0 status 0
bluetoothd[12432]: plugins/hciops.c:update_ext_inquiry_response() hci0
bluetoothd[12432]: src/adapter.c:register_agent() Agent registered for hci0 at :1.24:/org/blueman/agent/adapter/hci0
bluetoothd[12432]: plugins/hciops.c:hciops_set_discoverable() hci0 discoverable 1
bluetoothd[12432]: plugins/hciops.c:hciops_set_name() hci0, name GLADIO
bluetoothd[12432]: plugins/hciops.c:hciops_start_inquiry() hci0 length 8 periodic 1
bluetoothd[12432]: plugins/hciops.c:hciops_start_inquiry() hci0 length 8 periodic 1
bluetoothd[12432]: plugins/hciops.c:hciops_set_discoverable() hci0 discoverable 1
bluetoothd[12432]: plugins/hciops.c:hciops_start_inquiry() hci0 length 8 periodic 1
bluetoothd[12432]: plugins/hciops.c:hciops_start_inquiry() hci0 length 8 periodic 1
bluetoothd[12432]: plugins/hciops.c:hciops_start_inquiry() hci0 length 8 periodic 1
bluetoothd[12432]: plugins/hciops.c:hciops_start_inquiry() hci0 length 8 periodic 1
bluetoothd[12432]: plugins/hciops.c:hciops_set_discoverable() hci0 discoverable 1
bluetoothd[12432]: src/agent.c:agent_exited() Agent exited without calling Unregister
^Cbluetoothd[12432]: src/adapter.c:adapter_remove() Removing adapter /org/bluez/12432/hci0
bluetoothd[12432]: audio/manager.c:headset_server_remove() path /org/bluez/12432/hci0
bluetoothd[12432]: src/sdpd-service.c:remove_record_from_server() Removing record with handle 0x10000
bluetoothd[12432]: src/sdpd-service.c:remove_record_from_server() Removing record with handle 0x10001
bluetoothd[12432]: audio/manager.c:audio_adapter_unref() 0xb77fc278: ref=1
bluetoothd[12432]: serial/manager.c:proxy_remove() path /org/bluez/12432/hci0
bluetoothd[12432]: src/adapter.c:btd_adapter_unref() 0xb77fc0a8: ref=2
bluetoothd[12432]: plugins/service.c:unregister_interface() path /org/bluez/12432/hci0
bluetoothd[12432]: src/adapter.c:btd_adapter_unref() 0xb77fc0a8: ref=1
bluetoothd[12432]: src/plugin.c:plugin_cleanup() Cleanup plugins
bluetoothd[12432]: plugins/service.c:unregister_interface() path /org/bluez/12432/any
bluetoothd[12432]: plugins/hciops.c:hciops_exit()
bluetoothd[12432]: plugins/hciops.c:hciops_cleanup()
bluetoothd[12432]: Stopping hci0 event socket
bluetoothd[12432]: Stopping SDP server
bluetoothd[12432]: Exit

Thank you friends :)

silendo 06-25-2012 10:36 AM

Hello friends,
why i have the permission problem when i launch the bluetooth scan?
I try blueman-applet with "sudo" but i have same result.
Help me please.
Thank you friends

san 06-25-2012 01:29 PM

do you have the right firmware files?
there seems to be an ath3k firmware in -current, see here, but the file is missing in 13.37.

edit:
by the way 1: in my case, the only way to obtain a similarily verbose output of bluetoothd -nd, although without the permission denied-stuff, is having rfkilled it first. could you check rfkill list, maybe it's hard-blocked for some reason.
by the way 2: why don't you use "bluetoothd --udev"?

silendo 06-26-2012 05:32 AM

Hello san, i have tryed with "bluetooth --udev" but doesn't work...The scan option is disabled while if i use "bluetooth -nd" the scan option is enabled but i have "Option not permitted".
In the last day i have modify /etc/dbus-1/system.d/bluetooth.conf...it's correct?

Code:


<!-- This configuration file specifies the required security policies
    for Bluetooth core daemon to work. -->

<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
 "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>

  <!-- ../system.conf have denied everything, so we just punch some holes -->

  <policy user="arturo">
    <allow own="org.bluez"/>
    <allow send_destination="org.bluez"/>
    <allow send_interface="org.bluez.Agent"/>
  </policy>

  <policy group="plugdev">
    <allow send_destination="org.bluez"/>
    <allow send_interface="org.bluez.Agent"/>
    <allow send_interface="org.bluez.Adapter"/>
    <allow send_destination="org.bluez"
          send_interface="org.freedesktop.DBus.Introspectable"/>
  </policy>

  <!-- allow users of lp group (printing subsystem) to
      communicate with bluetoothd -->
  <policy group="lp">
    <allow send_destination="org.bluez"/>
  </policy>

  <policy context="default">
    <deny send_destination="org.bluez"/>
  </policy>

</busconfig>

thank you san.


All times are GMT -5. The time now is 11:45 PM.