×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Mar 2009
    Posts
    4

    storing Bluetooth target in session variable

    Hello,

    I would like to know if there is a way to preserve BlueTooth connection details in a mod_python session variable (under MWS).
    My plan is to use javascript for calling periodically via AJAX a python script for collecting GPS data. However, every time this is done the select BT source menu shows up. I would like to have this shown only first time and then to feed connection details from a session variable rather than from user input - bt_discover().

    I have tried
    address, services = socket.bt_discover()
    session['target'] = (address, services.values()[0])

    but at second reload of page the session['target'] does not exist. Session is working with other variables - I have tested it with simple strings. For example str(target) is also preserved , but becomes unusable for socket connection.

    Another solution for this purpose would be to use a python timer instead of javascript calls. However I did not find any reference on how to include a timer under mod_python.

    Any hint would be greatly appreciated - python was not my first choice for programming, but I see many advantages in using it.

    all the best,

  2. #2
    Registered User
    Join Date
    Mar 2009
    Posts
    4

    Re: storing Bluetooth target in session variable

    Hello,

    Never mind. I have solved this issue: a str(target) before putting it in session variable was the answer.

    All the best,

Similar Threads

  1. [newbie here] Link error
    By xitpu in forum Symbian
    Replies: 3
    Last Post: 2007-01-24, 16:53
  2. could not find thread.mbg and thread.rsg
    By deercrane in forum Symbian
    Replies: 3
    Last Post: 2006-04-18, 09:44
  3. Debug on target with Bluetooth
    By bernie31 in forum Symbian
    Replies: 2
    Last Post: 2005-12-29, 03:42
  4. Nokia 8910 not working with USB Bluetooth Cards
    By olivieradler in forum General Development Questions
    Replies: 0
    Last Post: 2005-10-05, 10:49
  5. Debug on Series 60 target using Bluetooth
    By rudescotsman in forum Symbian
    Replies: 7
    Last Post: 2004-03-15, 17:20

Posting Permissions

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