bluetooth connect between rpi and phone

Theres this app I found and id like to use it with my pi and python. Basically i want to be able to make python stuff happen when a specific button is pressed in the app. Ive got a bluetooth dongle but dont know what version it uses since ive had it for years and its pretty much ancient.

EDIT: Oops forgot to post app...  :oops: 
https://play.google.com/store/apps/deta ... Controller
This signature intentionally left blank.
Posts: 562
Joined: Sun Sep 27, 2015 3:26 pm
by  Douglas6 » Wed Apr 06, 2016 6:35 pm
You'll need to add the SP profile to the Pi. Edit this file:
CODE:  SELECT ALL
sudo nano /etc/systemd/system/dbus-org.bluez.service
Add the compatibility flag, ' -C', at the end of the 'ExecStart=' line. Add a new line after that to add the SP profile. The two lines should look like this:
CODE:  SELECT ALL
ExecStart=/usr/lib/bluetooth/bluetoothd -C
ExecStartPost=/usr/bin/sdptool add SP
Save the file and reboot. Pair and trust your Pi and phone with bluetoothctl.

Now, in a terminal on the Pi, enter the following:
CODE:  SELECT ALL
sudo rfcomm watch hci0
Now you can connect from the app and send text or macros. You can read it on the Pi with minicom, or in Python with PySerial or whatever serial comm software you prefer.
User avatar
Posts: 3323
Joined: Sat Mar 16, 2013 5:34 am
Location: Chicago, IL
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值