You Are Here:

Community: Developer Discussion Boards

#1 Old Simple Error with socket - 2009-04-25, 19:00

Join Date: Jan 2009
Posts: 71
programer_asal
Offline
Regular Contributor
Hello every body
I have some questions please
first of all am working with python 2.5
and when I tried to open a socket the following message appeare on the emulator
File"Z:\system\libs\socket.py",line42,in socket return socketobject(_realsocketcall(family,type,proto,family)
error88,function not implemented')

this is the code
import socket
def Connection():
server = socket.socket(socket.AF_BT, socket.SOCK_STREAM)
channel = socket.bt_rfcomm_get_available_server_channel(server)
server.bind(("", channel))
server.listen(1)
socket.bt_advertise_service(u"btchat", server, True, socket.RFCOMM)
socket.set_security(server, socket.AUTH | socket.AUTHOR)
print "Waiting for clients..."
conn, client_addr = server.accept()
print "Client connected!"
Connection()
Reply With Quote

#2 Old Re: Simple Error with socket - 2009-04-25, 19:45

Join Date: Mar 2003
Posts: 125
Location: UK
aya42
Offline
Regular Contributor
Quote:
Originally Posted by programer_asal View Post
server = socket.socket(socket.AF_BT, socket.SOCK_STREAM)
Use the 'btsocket' module rather than the 'socket' module for bluetooth support.
Reply With Quote

#3 Old Re: Simple Error with socket - 2009-04-25, 19:53

Join Date: Jan 2009
Posts: 71
programer_asal
Offline
Regular Contributor
aya42 I tried actually to do that as you told me before but it told that no module named btsocket
thanks
Last edited by programer_asal : 2009-04-25 at 22:44.
Reply With Quote

#4 Old Re: Simple Error with socket - 2009-04-26, 10:23

Join Date: Mar 2003
Posts: 125
Location: UK
aya42
Offline
Regular Contributor
Quote:
Originally Posted by programer_asal View Post
I tried actually to do that as you told me before but it told that no module named btsocket
You haven't specified which PyS60 version you're using, but you specified it was based on a Python v2.5 core, which suggests one of the 1.9.x releases.

May I suggest avoiding beta versions 1.9.x, and using v1.4.5 until v2.0 is released.
Reply With Quote

#5 Old Re: Simple Error with socket - 2009-04-26, 16:45

Join Date: Jan 2009
Posts: 71
programer_asal
Offline
Regular Contributor
You haven't specified which PyS60 version you're using, but you specified
Quote:
Originally Posted by aya42 View Post
it was based on a Python v2.5 core, which suggests one of the 1.9.x releases.

May I suggest avoiding beta versions 1.9.x, and using v1.4.5 until v2.0 is released.
Thanks aya42 for your time see I will tell you what I have download before running the script
1-the file s60_2nd_fp2_sdk_msb.zip
2-PythonForSeries60_1_2_for_2ndEd_FP2_SDK.zip
3-python-2.5.2.msi

which one of them I should change????
I have downloaded 1.4.5 and I have took the socket module only and copy it on the libs of my library is that OK???
thank you again
Reply With Quote

#6 Old Re: Simple Error with socket - 2009-04-27, 14:59

Join Date: Mar 2003
Posts: 125
Location: UK
aya42
Offline
Regular Contributor
Quote:
Originally Posted by programer_asal View Post
1-the file s60_2nd_fp2_sdk_msb.zip
2-PythonForSeries60_1_2_for_2ndEd_FP2_SDK.zip
3-python-2.5.2.msi
Ah. Sounds like you're using a really old version.

#3 on the list is redundant, and has no effect on the emulator.

If you're developing for S60 2nd Edition FP2, you'll need #1, and http://sourceforge.net/project/downl...zip&a=45221442 instead of #2.
Reply With Quote

#7 Old Re: Simple Error with socket - 2009-04-27, 17:43

Join Date: Jan 2009
Posts: 71
programer_asal
Offline
Regular Contributor
Quote:
Originally Posted by aya42 View Post
Ah. Sounds like you're using a really old version.

#3 on the list is redundant, and has no effect on the emulator.

If you're developing for S60 2nd Edition FP2, you'll need #1, and http://sourceforge.net/project/downl...zip&a=45221442 instead of #2.
SO that is the problem then!!! thank you aya42 I will copy these files and then I will try Again
Reply With Quote

#8 Old Re: Simple Error with socket - 2009-04-28, 13:33

Join Date: Jan 2009
Posts: 71
programer_asal
Offline
Regular Contributor
I did it actually after I copy the new version and after I change
server = socket.socket(socket.AF_BT, socket.SOCK_STREAM
to server = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
the socket is created thank you aya42
Reply With Quote

#9 Old Re: Simple Error with socket - 2009-11-18, 21:21

Join Date: Nov 2009
Posts: 1
williame.rocha
Offline
Registered User
Quote:
Originally Posted by programer_asal View Post
Hello every body
I have some questions please
first of all am working with python 2.5
and when I tried to open a socket the following message appeare on the emulator
File"Z:\system\libs\socket.py",line42,in socket return socketobject(_realsocketcall(family,type,proto,family)
error88,function not implemented')

this is the code
import socket
def Connection():
server = socket.socket(socket.AF_BT, socket.SOCK_STREAM)
channel = socket.bt_rfcomm_get_available_server_channel(server)
server.bind(("", channel))
server.listen(1)
socket.bt_advertise_service(u"btchat", server, True, socket.RFCOMM)
socket.set_security(server, socket.AUTH | socket.AUTHOR)
print "Waiting for clients..."
conn, client_addr = server.accept()
print "Client connected!"
Connection()

I have the same problem...

Has anyone found any solution?

I am using python 2.6, SDK 3rd.
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules

You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump
Similar Threads
Thread Thread Starter Forum Replies Last Post
Simple Socket Programms benderg Mobile Java Networking & Messaging & Security 10 2008-06-10 06:55
simple socket connection... browndrf Mobile Java Networking & Messaging & Security 6 2006-11-03 01:45
Simple Server/Client Socket program mottaisami Mobile Java Networking & Messaging & Security 2 2006-09-08 22:58
problem in persistant socket connection poms4symbian Browsing and Mark-ups 0 2006-01-03 14:23
Socket problem defragger Python 0 2005-08-25 09:16

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia