Bluetooth Hacking?

From OpenPCD

Jump to: navigation, search



sQRtalk is a QR code tag controlled web application to maintain a list of upcoming speakers per talk, supports a fixed panel of speakers and questions called from the audience. For all speakers and audience members a progress bar of remaining speech time is maintained. Helpers in the audience are able to scan QR code badges of audience members. Most of the displayed information is enriched with extended user information when supplied in their CMS profile.

The web application can be accessed by multiple parties at the same time - every time a moderator switches to the next panel speaker or audience member for a certain talk page at all connected users without the need for reloading. All connected users can access as a result the profile information of the current speaker including his remaining speech time and see the updated list of upcoming speakers.

Users are identified by a unique talk/event-independent ID. All users can select the currently attended event from a list of available talks. The current talk and thus the user-talk relationship is stored in the users browsers session. By logging in as moderator or helper users are able to change their current role. The user QR code is in the form


for example

It is important to understand that the URL doesn't change the current screen - URLs are only used only as a signalling layer. The current look of the page is determined by the database state, the user session and the currently logged in user. The current talk stored in the user session as well. That allows to print all sorts of QR codes with URLs embedded - not only for selecting users, but also for switching roles and talks.

Acces Roles

Default User

Scanning a user/speaker QR tag results in redirection to the CMS URL containing the full world readable user profile.


Scanning a user/speaker QR tag results in adding that user to the queue of upcoming speakers. Helpers have the right to delete users from the queue by pressing the delete icon X next to the names.


The Moderator is allowed to delete speakers from the queue. By clicking on the user name every speker in the queue can be made the current speaker. For that person the full profile is displayed for all users having the current talk open in their web browser. Additionally the moderator can extend the current users speech time in 5 minute steps by clicking on the remainig speech time progress bar.

Source Code

You can contribute at by spawning your own git repository. Alternatively a static snapshot of the source code can be fetched here.

 git clone

Directory Layout of Source Tree

The web root directory lives inside www - make sure that the PHP code can access the directory above that level. Inside the directory data you can find the file research.csv which contains a list of research questions to maintain the CMS URL from the shortened numeric QR code URL. In the directory www/qr you can find the dynamic QR code image generation that is use for displaying QR codes.

After creating a database, you need to initialize it from helpers/default.sql. Please makes sure to update the CMS API token and database access information in www/config.php to finish the installatio process. After that you need to run helpers/precache.php to update the user information cache. Please make sure in your web server configuration to point the PHP session cookie management cache to the directory sessions and the PHP temp directory to temp. You also might want to have a look at templates/talk.html to change the talk page layout.

In the directory www/xajax the XAJAX framework can be found which is used for dynamic updates of the talk application. Please check their excellent examples and API documentation.

 ├── license.txt
 ├── [data]
 │   └── research.csv
 ├── [helpers]
 │   ├── default.sql
 │   └── precache.php
 ├── [sessions]
 ├── [temp]
 ├── [templates]
 │   └── talk.html
 └── [www]
     ├── [css]
     ├── [img]
     ├── [js]
     ├── [qr]
     ├── [xajax]
     ├── calendar.php
     ├── config.php
     ├── db.php
     ├── index.php
     ├── talk.php
     ├── user.php
     └── robots.txt



  • tested with Fedora Linux v13-v16
  • MySQLdatabase >=v14.14
  • Apache Web Server >=v2.2.17
  • PHP >=v5.3.6


Installation and Database Setup

Installation is very simple - just untar the demo file system into a file folder accessible by your Apache webserver:

cd /home/wwwrun
wget -O sqrtalk.tar.gz
tar -xvzf sqrtalk.tar.gz

You can find a dump of a demo database in the directory /helpers called default.sql. Please use the command mysql to restore the backup. mysql -u sqrtalk -p sqrtalkdb < helpers/default.sql The default settings for the database connection can be changed in the file config.php.

 define('DB_PASSWORD','your_password'); define('DB_HOST','localhost');


The .htaccess file for Apache contains some basic settings -essentially all paths are treated as virtual directories - the functionality is implemented in PHP for most of the paths:

 # ignore these files and directories
 RewriteRule ^(js|img|css|xajax|robots.txt) - [L,NS]
 # Handle these two directories in separatem modules
 RewriteRule ^(qr|doc)/.* $1/index.php [L,NS]
 # Bugfix for redirecting wrongly printed Anonymous page 
 RewriteRule ^t999 /ig/T601 [R,L,NS]
 # Treat all remaining paths  as virtual - rewrite into main module '''/index.php'''.
 RewriteRule .* index.php [L,QSA,NS]

The virtual server configuration is straightforward. In this particular example SSL enryption is initialize and the document directory, temporary upload directories and cookie based session management is initialized. An important feature for speeding up access to the application is to enable on-the-fly compression for JSON calls and other text based files as can be seen in the highlighted section:

<VirtualHost *:80>
    Redirect permanent /
# SSL Virtual Host
<IfDefine SSL>
    SSLEngine on
    SSLOptions +StdEnvVars
    SSLProtocol -all +SSLv2 +SSLv3
    SSLCipherSuite SSLv2:HIGH:MEDIUM
    SSLCertificateFile    /etc/httpd/ssl.crt/sqrtalk_com.crt
    SSLCertificateKeyFile /etc/httpd/ssl.key/sqrtalk_com.key
    SSLCACertificatePath  /etc/httpd/ssl.crt
    SSLCACertificateFile  /etc/httpd/ssl.crt/
    SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown
    DocumentRoot "/home/wwwrun/"
    php_admin_value open_basedir "/home/wwwrun/"
    php_admin_value upload_tmp_dir "/home/wwwrun/"
    php_admin_value max_execution_time 600
    php_admin_value display_errors "1"
    php_admin_value "SQRTALK"
    php_admin_value session.auto_start "0"
    php_admin_value session.save_path "/home/wwwrun/"
    php_admin_value session.use_cookies "1"
    php_admin_value session.use_only_cookies "1"
    php_admin_value session.cookie_lifetime "86400"
    php_admin_value session.cookie_secure "1"
    php_admin_value session.hash_function "1"
    # Insert filter
    AddOutputFilterByType DEFLATE text/html text/plain text/xml text/javascript text/css text/csv application/json application/json 
    # Own Log-File
    CustomLog /home/wwwrun/logs/access.sqrtalk-com.log combined

Runtime Configuration

The settings for the speaker are maintained in the centralized file /config.php. Please don't forget to insert the API token BERLINSYMPOSIUM_API_TOKEN) for the website for enabling real time user profile updates from the Drupal CMS.


Please update the passwords for helpers and moderators here:

  • normal users have read-only access, no password needed
  • moderators are able to add speakers to panels via QR code scanning. By clicking on the user name set speakers active and deleting speakers from the queue.
  • helpers are able to add speakers to the queue of waiting speakers and deleting speakers from the queue.


The default speech time in seconds per speaker.


The moderator can increment the current speakers speech time in 1 second increments. The default setting is 5 minutes. After each click the speech time is rounded to the next increment. After three clicks the speech time wraps back to SPEAKER_TIME_MAX.


The application will fetch on demand an updated list of talks in iCAL format from this URL - the default URL is

Default Configuration

    define('SQRTALK_BANNER',' || - talk fair & square');
    $user_passwords = array (
        'helper' => 'SofaTrafo',
        'moderator' => 'AutoHund',