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 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.