Hi guys,
I have installed lightBlue for PyS60 on my nokia 6600, and tried the following test program.

Server.py

Code:
import bluetooth

server_sock = bluetooth.BluetoothSocket(bluetooth.RFCOMM)
port = 1

server_sock.bind(("", port))
server_sock.listen(1)

client_sock, address = server_sock.accept()
print "Accepted from ", address

r = client_sock.recv(1024)
print "got ", r

n = client_sock.send("Hello")
print "sent ", n

client_sock.close()
server_sock.close()
Client.py

Code:
import lightblue
import appuifw

devices_list = lightblue.selectdevice()
device = devices_list[0]

s = lightblue.socket()
s.connect((device, 1))

command = appuifw.query(u"Enter a string", "text")
s.send(command)
print "sent"

reply = s.recv(1024)
print reply
appuifw.note(reply, "info")

s.close()
I'm running Server.py on Ubuntu 8.04 (I have replaced bluez with a bug free ver.), and it is executing properly.
But client.py executes upto line "print "sent"" and gives the following error

Traceback (most recent call last):

File "E:\System\Apps\Python\default.py", line 81, in menu_action

f()

File "E:\System\Apps\Python\default.py", line 65, in query_and_exec

execfile(script_list[index][1].encode('utf-8'), script_namespace.namespace)

File "E:\System\Apps\Python\my\a_remote.py", line 14, in ?

reply = s.recv(1024)

File "<string>", line 2, in recv

File "E:\system\libs\socket.py", line 354, in recv

data=self._sock.recv(n, f, cb)

error: (32, 'Broken pipe')

Version 1.4.1 final


If I comment appuifw lines (command variable hard coded), the client.py executes properly. But I want to take the user input rather than hard coding the command variable.
I can't figure this out, and I'm new to PyS60 development. Please help me!
Thank you.