| Reply | « Previous Thread | Next Thread » |
|
Hello. I have a question. How can i send and receive some bytes ? I wanna create chat via bluetooth. Now i write this code.
Code:
import appuifw
import e32
import sys
from btsocket import *
lock=e32.Ao_lock()
info = appuifw.InfoPopup()
class App():
def __init__(self):
appuifw.app.exit_key_handler=self.Exit
self.pseudo = 0
appuifw.app.menu=[(u"Listen", self.listen),
(u"Connect", self.Connect),
(u"Name", self.Name),
(u"Exit", self.Exit)]
def listen(self):
print "Listen"
if (self.pseudo == 0):
info.show(u"Here is the tip.", (0, 0), 5000, 0, appuifw.EHRightVCenter)
else:
print "ok"
print self.pseudo
def Connect(self):
print "OK"
disc = bt_discover()
def Name(self):
self.pseudo = appuifw.query(u"Enter you name", "text")
print "OK"
def Exit(self):
print "OK"
sys.exit(0)
appuifw.app.title=u"BT chat"
main_menu = App()
lock.wait()
Kamil Sampolski |
|
Quote:
Bt Chat In Pys60 Hope it helps u.. Best Regards, SajiSoft "The purpose of software engineering is to control complexity, not to create it." --§ajid Ali Anjum-- http://sajisoft.wordpress.com/ |
|
Thank you
i have only one problem "server = socket.socket(socket.AF_BT, socket.SOCK_STREAM)" It's old socket.. How i can it write with btsocket ?Kamil Sampolski Edit: ------------- conn = socket.socket(socket.AF_BT, socket.SOCK_STREAM) "module object has no atribute 'AF_BT'" Who can help me ? ![]()
Last edited by Sierran : 2009-04-27 at 16:26.
|
|
Quote:
first I get the last version whivh is PythonForS60_1_4_5_SDK_2ndEdFP2(2) from http://sourceforge.net/project/downl...zip&a=45221442 second I changed conn = socket.socket(socket.AF_BT, socket.SOCK_STREAM) to this server = socket.socket(socket.AF_INET, socket.SOCK_STREAM) I wish that this help you,just to let you know I am novice and I told you what I knew it today |
| programer_asal |
| View Public Profile |
| Find all posts by programer_asal |
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|
| Rate This Thread | |
| Thread | Thread Starter | Forum | Replies | Last Post |
|---|---|---|---|---|
| Develop Chat Application Using Bluetooth | curlyjoe | Bluetooth Technology | 12 | 2008-04-18 13:28 |
| Bluetooth Chat | anandpraveen | Symbian Networking & Messaging | 4 | 2007-06-27 07:13 |
| Simple Bluetooth Connection | laan | Mobile Java Tools & SDKs | 4 | 2006-08-14 09:40 |
| Simple question about bluetooth | rambler82 | General Symbian C++ | 5 | 2006-07-21 11:28 |
| Simple sample of bluetooth program for MIDP 2.0? | zhihui | Bluetooth Technology | 0 | 2005-06-27 08:02 |