×

Discussion Board

Results 1 to 9 of 9
  1. #1
    Regular Contributor
    Join Date
    Jan 2009
    Posts
    71

    Simple Error with socket

    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()

  2. #2
    Regular Contributor
    Join Date
    Mar 2003
    Location
    UK
    Posts
    125

    Re: Simple Error with socket

    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.

  3. #3
    Regular Contributor
    Join Date
    Jan 2009
    Posts
    71

    Re: Simple Error with socket

    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 21:44.

  4. #4
    Regular Contributor
    Join Date
    Mar 2003
    Location
    UK
    Posts
    125

    Re: Simple Error with socket

    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.

  5. #5
    Regular Contributor
    Join Date
    Jan 2009
    Posts
    71

    Re: Simple Error with socket

    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

  6. #6
    Regular Contributor
    Join Date
    Mar 2003
    Location
    UK
    Posts
    125

    Re: Simple Error with socket

    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.

  7. #7
    Regular Contributor
    Join Date
    Jan 2009
    Posts
    71

    Re: Simple Error with socket

    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

  8. #8
    Regular Contributor
    Join Date
    Jan 2009
    Posts
    71

    Re: Simple Error with socket

    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

  9. #9
    Registered User
    Join Date
    Nov 2009
    Posts
    7

    Re: Simple Error with socket

    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.

Similar Threads

  1. Simple Socket Programms
    By benderg in forum Mobile Java Networking & Messaging & Security
    Replies: 10
    Last Post: 2008-06-10, 05:55
  2. simple socket connection...
    By browndrf in forum Mobile Java Networking & Messaging & Security
    Replies: 6
    Last Post: 2006-11-03, 00:45
  3. Simple Server/Client Socket program
    By mottaisami in forum Mobile Java Networking & Messaging & Security
    Replies: 2
    Last Post: 2006-09-08, 21:58
  4. problem in persistant socket connection
    By poms4symbian in forum Browsing and Mark-ups
    Replies: 0
    Last Post: 2006-01-03, 13:23
  5. Socket problem
    By defragger in forum Symbian
    Replies: 0
    Last Post: 2005-08-25, 08:16

Posting Permissions

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