2

So I recently got started using a pi zero (running the most recent raspbian) as something to drive an image display application. I'll be sending it files over bluetooth via a file transfer protocol (obex/obexpushd).

The problem I am running into repeatedly is secure pairing. The device won't know the MAC address/Name of what will connect to it in advance, but I still want to secure that connection and prevent random things from connecting. It won't have user input when it is in place, so any GUI based pairing agent won't cut it. On another debian wheezy system I had it set up using secure simple pairing and a fixed pin number using an edited bluez-simple-agent. I could change the pin on the fly and it accepted/handled any connection attempts with the correct pin.

The problem (after much searching) is that bluez-simple-agent simply won't work for a variety of reasons (deprecated due to transition to bluez5, dbus problems is using it, etc etc) on the pi zero.

So my main question here would be is there a headless bluetooth pairing agent for raspbian that can set a pin (or something like a bluetooth password)? Something where I could start it and then push it to the background to handle incoming connections while my main application runs separately.

Thanks for any help, let me know if more details are needed.

1
  • Ill be trying a manual install of bluez4.99 packages from wheezy .deb packages on a fresh raspbian. If that works I will post it here. Jan 21, 2016 at 16:04

1 Answer 1

1

So answer my own question here. What I tried in the comment worked. So:

Installed the following packages from raspbian wheezy on the pi zero running a brand new install of raspbian jessie (you have to add raspbian wheezy to the sources list since these are specifically from debian/raspbian wheezy):

*the =XXXX specifies a version to use when installing using apt-get install

  • bluez=4.99-2
  • bluetooth=4.99-2
  • bluez-tools=0.1.38+git662e-3
  • bluez-utils=4.99-2
  • obexpushd

Then I used my modified bluez-simple-agent python file (see jwaters42 post from 4-09-2014 --- http://www.linuxquestions.org/questions/showthread.php?p=4445941)

Now it works as intended, allowing headless pairing and receiving of files via bluetooth.

EDIT - Added a screenshot of their post in case the link ever breaks: headless bluetooth pairing

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.