i have a bluetooth server advertising on my computer , which is set to listen for text commands from phone.
(well, i tried sending data from comp. (server) to phone(client), and it works)

my aim is to send data to the server. the program shows "sending done", without any error, but nothing is received on the computer.

this is my client code (note the blue part):

Code:
import btsocket as socket
import appuifw
import e32

class BT:
    def connect(self):
        self.sock=socket.socket(socket.AF_BT,socket.SOCK_STREAM)
        addr,services=socket.bt_discover()
        print "Discovered: %s, %s"%(addr,services)
        if len(services)>0:
            import appuifw
            choices=services.keys()
            choices.sort()
            choice=appuifw.popup_menu([unicode(services[x])+": "+x
                                       for x in choices],u'Choose port:')
            port=services[choices[choice]]
        else:
            port=services[services.keys()[0]]
        address=(addr,port)
        print "Connecting to "+str(address)+"...",
        self.sock.connect(address)
        print "OK." 

    def close(self):
        self.sock.close()
    def send(self):
        test= appuifw.query(u"Type words", "text", u"")
        self.sock.send(test+'\n')
        print "sending done"
# Allow time for data to be sent to work around a bug in the socket
# module.
        e32.ao_sleep(1)

bt=BT()
bt.connect()
bt.send()
bt.close()