Hi! Can anyone help me on how to send a value from my PC running on openSUSE Linux to my mobile phone via bluetooth.. i have developed a server program in C that should send a value to my mobile phone.
My problem is, it seems that the program in python is indefintely waiting for the signal from the server...so it means that my phone seems not to receive the signal...
This is the part of the program in Python for the mobile:
sock = socket.socket(socket.AF_BT, socket.SOCK_STREAM, socket.BTPROTO_RFCOMM)
target= (rma, port)
sock.connect(target)
appuifw.note(u"Connection Initialized!", 'info')
sock.send('1')
sock.send(oldpass)
sock.send(newpass)
line=sock.recv(32)
if line == 'ROBERT':
appuifw.note(u"Working!", 'info')
else:
appuifw.note(u"Not Working!", 'info')
sock.close()
THis is the code for the server:
if((fd = socket(PF_BLUETOOTH, SOCK_STREAM, BTPROTO_RFCOMM)) < 0) {
perror("socket");
exit(1);
}
send(fd, "ROBERT",5,1);
I can send a value from the mobile phone to the server but i cant send a value from the server to the phone...

Reply With Quote


