This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

how to use hcitool send and receive file

I found some issue use hcitool utility:

1. shell@android:/ # hciconfig hci0 up
[   30.810302] (stc): st_register(2)
[   30.813812] (stc):  chnl_id list empty :2
[   30.818267] (stk) : st_kim_start
[   30.916412] (stk) :ldisc_install = 1
[   30.971069] (stc): st_tty_open
[   30.974517] (stk) :line discipline installed
[   30.979583] (stk) :TIInit_7.6.15.bts
[   31.319396] request_suspend_state: wakeup (3->0) at 31315490726 (2000-01-01 00:00:27.848205568 UTC)
[   31.507232] (stc): add_channel_to_table: id 2
[   31.511993] (stc): st_register(3)
[   31.515563] (stc): add_channel_to_table: id 3
[   31.520782] (stc): st_register(4)
[   31.524536] (stc): add_channel_to_table: id 4
shell@android:/ #
shell@android:/ # hcitool dev
Devices:
        hci0    1C:45:93:3B:D1:12
shell@android:/ #
shell@android:/ # hcitool scan
Scanning ...
[   47.787597] acc_open
[   47.790039] acc_release
        E4:EC:10:DA:DA:4C       C3-00
shell@android:/ #
shell@android:/ # hcitool cc E4:EC:10:DA:DA:4C
shell@android:/ #
shell@android:/ # hcitool con

Connections:
shell@android:/ #

but I found when I set hcitool cc command, I found the connect success only several seconds, and then break. Cold you explain what is the reason?

2. how can I use hcitool  command to send and recevie file?

  • Hi Samir,

    Regarding your first question, it may be that the peer device is resetting the connection due to multiple reasons. Have you enabled hcidump to see the possible disconnection message?

    With regards to the hcitool, it is only used to send hci commands. If you want to send data, you could use l2cap, rfcomm, and other profile tools.

    Regards,

    Miguel