【问题标题】:Send a file from phone to laptop using bluetooth with bluez - don't work使用带有 bluez 的蓝牙将文件从手机发送到笔记本电脑 - 不起作用
【发布时间】:2016-01-01 07:19:30
【问题描述】:

我想将文件从手机发送到笔记本电脑。两个都有蓝牙。

在笔记本电脑上我有archlinux。我已经安装了bluez-5.35-1 用于蓝牙管理。

安装后,我输入:

systemctl enable bluetooth.service 
systemctl start bluetooth.service

然后,我使用bluetoothctl 输入power on 启动蓝牙

现在,我可以通过手机发现笔记本电脑并将其配对。

我使用以下方式启动了 FTP 服务器:

systemctl --user start obex

在电话中,我尝试发送文件,但在很短的时间内收到了一条消息file not sent。

在journalctl -f我可以看到以下日志:

Oct 04 18:01:16 laptop obexd[8058]: CONNECT(0x0), (null)(0xffffffff)
Oct 04 18:01:16 laptop obexd[8058]: CONNECT(0x0), (null)(0x0)
Oct 04 18:01:16 laptop obexd[8058]: PUT(0x2), (null)(0xffffffff)
Oct 04 18:01:16 laptop obexd[8058]: PUT(0x2), FORBIDDEN(0x43)
Oct 04 18:01:16 laptop obexd[8058]: DISCONNECT(0x1), (null)(0xffffffff)
Oct 04 18:01:16 laptop obexd[8058]: DISCONNECT(0x1), SUCCESS(0x20)
Oct 04 18:01:16 laptop obexd[8058]: disconnected: Transport got disconnected

我假设这是一个权限问题,因为我可以在那里看到FORBIDDEN。 obexd 的配置文件在哪里,看看它会在哪里保存文件?我不明白为什么 bluez 的记录如此糟糕。

有人遇到过同样的蓝牙问题吗?

【问题讨论】:

    标签: bluetooth bluez


    【解决方案1】:

    使用 -a 或 --auto-accept 选项(“自动接受推送请求”)启动 obexd 允许将文件从手机推送到笔记本电脑。 此选项跳过对代理的授权请求。

    【讨论】:

      猜你喜欢
      • 2016-09-26
      • 2018-06-21
      • 1970-01-01
      • 1970-01-01
      • 2012-06-30
      • 1970-01-01
      • 1970-01-01
      • 2016-02-29
      • 2012-03-31
      相关资源
      最近更新 更多