Hey,
I'm writing a small script in Python that is communicating with a mobile phone over Bluetooth sockets. I'm just writing AT codes to the phone but the problem I'm having is if the string is too long it chops half off and naturally that doesn't work. My goal is to be able to control MPD from anywhere in my house using my phone and that works if my playlist only contains a couple of songs. Any more than that and it doesn't work, that's not much good then.
I'm no Python expert and I haven't done any network-style stuff with it before so I was wondering if there is a way I can get it to push more data through or if it's a Bluetooth limitation in which case I need to do some research on that end of things?
Any help would be appreciated!
Thanks
edit: here is the code i'm using to write to the socket if it makes any difference:
Code:
def puts(sock, data):
try:
sock.send("%s\r" % data)
except:
logger.critical("data didn't quite make it, debugging: (d: %s)" % data)
print "critical error, dumping tracback for someone else to fix"
print '='*60
traceback.print_exc(file=sys.stdout)
print '='*60
sys.exit(0)
return