Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Feb 2012

    Two bluetooth rfcomm ports???

    Hi all,
    Hope someone can point me the right way? I have a programme running on a n70 which requires two bluetooth serial ports to run at the same time. The first I have had running no problem, the second works ok untill I try to read it using the readline() function.

    Here is the code I'm using for the second connection;
                appuifw.note(u"Connecting to weigher")
                target1= (address1, services1.values()[0])
                conn1 = socket.socket(socket.AF_BT, socket.SOCK_STREAM)
                scale = conn1.makefile("rW",0)
                appuifw.note(u"Blue weigher connected")
                appuifw.note(u"Unable to find weigher")
            print >> scale,"W"
            while True:
                heavy = scale.readline()
                print >>scale,"W"
    As you might guess its connecting a load cell to the phone using a serial bluetooth module and pic. The pic responds to the print>>scale,"W" so I know its connected ok, I've also checked the output in hyperterminal so I know its sending somthing back but the programme stalls at heavy=scale.readline()
    The first connection is working when I try to use this, however disabling that connection makes no difference. Any ideas?
    Thanks Geoff

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Oslo, Norway

    Re: Two bluetooth rfcomm ports???

    Are you sure about 'readline'? It might (I do not know for sure) wait indefinitely if there is no trailing linebreak.

  3. #3
    Registered User
    Join Date
    Feb 2012

    Re: Two bluetooth rfcomm ports???

    Thanks for the quick relpy! I think you could be right, both ports are communicating with a pic, checking my pic code it looks like I may have put a new line in the first programme but not the second?
    Am going to check it out now.

  4. #4
    Registered User
    Join Date
    Feb 2012

    Re: Two bluetooth rfcomm ports???

    Thanks for the advice, your quite right, I added a new line character to my pic programme, works a treat now!

Similar Threads

  1. bluetooth +Serial ports+Symbian
    By narayanc1 in forum Mobile Java Networking & Messaging & Security
    Replies: 7
    Last Post: 2009-10-28, 12:45
  2. Bluetooth - RFCOMM
    By yasomca in forum Mobile Java Tools & SDKs
    Replies: 3
    Last Post: 2009-02-07, 04:35
  3. RFCOMM bluetooth
    By Rimmi99 in forum Bluetooth Technology
    Replies: 3
    Last Post: 2007-05-14, 14:52
  4. Problem: 10 Bluetooth Ports simultaneously
    By Alco Fresh in forum Symbian
    Replies: 1
    Last Post: 2006-07-03, 12:05
  5. PC-Suite does not sho COM ports from 3COM-Bluetooth 3CREB96B
    By rocketpork in forum Bluetooth Technology
    Replies: 1
    Last Post: 2003-06-18, 11:04

Posting Permissions

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