I'm writting application and need to send text file from mobile phone to my PC. Using PyBluez,PyOBEX, Python 2.7.15 and Windows10 64bits, LG K10LTE. Tried to run code from this post: Convert and save string to binary file in Python But got error:
a, b = client.get("here.txt")
File "C:\Python27\lib\site-packages\PyOBEX\client.py", line 312, in get
for response in self._get(name, header_list):
File "C:\Python27\lib\site-packages\PyOBEX\client.py", line 342, in _get
max_length = self.remote_info.max_packet_length
AttributeError: BrowserClient instance has no attribute 'remote_info'
When I tried this little change:
from bluetooth import *
from PyOBEX.client import Client
client = Client(host, port)
client.connect()
b = client.get("here.txt")
print b
b returned:
<PyOBEX.responses.UnknownResponse instance at 0x000000000351FE08>
Could someone help me and explain why those codes doesn't work and how to solve it? Or tell me any other way how to receive text file from mobile via bluetooth?