2

I wrote a Python script which can transfer a file from one Pi to another Pi specifically by using the MAC address of the other device.

The problem is: I am able to send the file to one device, but with the same code I cannot send the file to a different device.

I get the following error:

Traceback (most recent call last): File "<pyshell#12>", line 1, in <module>
obex.sendfile(device, channel, "/bluetooth/RSSI.csv") File "/usr/local/lib/python2.7/dist-packages/lightblue/_obex.py", line 257, in sendfile
raise OBEXError("server denied the Put request") OBEXError: server denied the Put request

Here my csv file is stored in folder named Bluetooth. Program is:

from lightblue import *
finddevices()
services = findservices("54:27:58:DA:31:10")
services
D = [ (x,y,z) for x,y,z in services if "obex" in z.lower() and "push" in z.lower()]
D
(device, channel, description) = D[0]
obex.sendfile(device, channel, "/bluetooth/RSSI.csv")

For one MAC address it worked properly but for other it doesn't work and gives this error. Does anyone know why? If anyone has found a solution then it would be really helpful for me.

closed as unclear what you're asking by Dmitry Grigoryev, Jacobm001 Mar 3 '17 at 0:17

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    It's not clear that those one device and different device are. If they're both raspberries, why don't you simply configure the second device identically to the first one? – Dmitry Grigoryev Mar 2 '17 at 8:48