ubiPCMM06:2nd International Workshop on Personalized Context Modeling and Management for UbiComp Applications Understanding and recognizing usage situations using context data available in mobile phones Pekka Ala-Siuru Tapani Rantakokko VTT Technical Research Center of Finland, Mobile VTT Technical Research Center of Finland, Mobile Interaction Interaction P.O.Box 1100, P.O.Box 1100, FI-90571 Oulu, Finland FI-90571 Oulu, Finland +358 20 722 2461 +358 20 722 2222 firstname.lastname@vtt.fi firstname.lastname@vtt.fi ABSTRACT One of the interesting and perhaps most wanted contextual feature In this paper we introduce a hybrid method for personalizing is to get personal devices to change the user profile automatically different interface features in a mobile phone. We give a according to relevant context and different kind of methods have description how to use combined data from GSM base stations been used [10]. In this paper we will describe our hybrid and Bluetooth sources to determine user location and change the approach to use radio beacon (GSM and Bluetooth) data to build user profile automatically according to the location context. We context information and derive from that data cases for give detailed information about our data logging experiments and personalization. We will try get answers how Case-Based the learning algorithms which were developed and tested. reasoning (CBR) is suitable for the task. This has already studied Categories and Subject Descriptors [7] and modeled in experimental service applications. The challenging questions still exist: is CBR suitable for learning from H.5.2 [User Interfaces]: Interaction styles. H.1.2 [User / sensory data and can we get enough data for reasoning and Machine Systems]: Human factors. I.2.6 [Learning]: Knowledge understanding the user situation? From earlier research we know acquisition. that CBR is suitable for applications which have changing situations. In order to derive context information one must search General Terms for behavioural patterns from the scanned data. Algorithms, Management, Measurement, Experimentation, Our approach is related to the PlaceLab initiative [6, 9]. The Human Factors. main difference is that we are not using WLAN data and no fixed Bluetooth beacons (if PCs and Laptops in work place are not Keywords counted). Furthermore we are not using GPS data as in [1]. The Context-awareness, Personalization, Mobile Computing, group detection part is also related to that of Järkvik et al [5]. One Location-Based Services, Case-Based Reasoning, Bluetooth, of the largest projects where BT data is used has been carried out GSM Cell Id. in the MIT project concerning social relationships in the campus area [4]. 1. INTRODUCTION One of the challenging areas of mobile computing device and 2. LOGGING CONTEXT DATA software personalization is to use sensory data to obtain context Data logging was made by logging software which was running in information for personalization. This has been one of the main a Bluetooth (BT) enabled mobile phone. The software for research issues in the pervasive computing community. Several collecting information from smartphone usage and usage research groups have been working to get the relevant sensory situations was developed in the Adamos project1. The software information to be used to build services for the users. Already in starts automatically when the phone is turned on, runs in the 1999 [10] Schmidt et al introduced experimental use of low background without disturbing normal use of the device, and logs sensory data in a mobile phone to be used to define different kind various data types into a file using consistent file format. The of contexts. software is simply installed to the test user’s phone, and after the test period the log file is copied from the phone to a computer for offline analysis. Consistent format for different data types allow automatic statistical analysis and easy comparison of data Permission to make digital or hard copies of all or part of this work for gathered from different users or usage situations. personal or classroom use is granted without fee provided that copies are Currently our logger collects various usage data such as keypad not made or distributed for profit or commercial advantage and that lock status, user activity, call status, foreground application, copies bear this notice and the full citation on the first page. To copy otherwise, or republish, to post on servers or to redistribute to lists, battery strength and charger status. Also usage situation data is requires prior specific permission and/or a fee. 1 ADAMOS : Adaptive Mobile Services – http://www.msh- UbiPCMM06 September 18, 2006, California, USA alpes.prd.fr/ADAMOS/ ubiPCMM06:2nd International Workshop on Personalized Context Modeling and Management for UbiComp Applications logged, for example Bluetooth neighborhood as well as network range or not, time of logging, and the running application in the area code and cell id, which provide rough location information. logging phone. Collected data has been used for usability and user experience 2.2 Bluetooth logging (scanning) studies, automatic learning of users’ home and work locations, To get information about BT data we walked thru different places. and as inputs for context-based actions. In the latter case, a well- One route (figure 1) went from home to workplace and from there defined context framework [8] provided means for personalizing to university (distance ~ 500m), by car to downtown (distance 5 various phone operations by combining context input sets to Kms) and back home. In the university we walked from library to actions via simple XML scripts. The scripts can be generated with cafeteria, bookstore and places where people were gathering a simple user interface by the user or operator, or even together. automatically by learning algorithms. The goal of our experimentation was, by determining user’s location automatically, to change the user’s phone profile to Scanning radio beacons in the appropriate setting (e.g. in the work profile there could be environment: GSM Cell ID, (CID) and different kind of applications available than in home or other Bluetooth (BT) device data place). In earlier experiments we used only the GSM cell ids (CID) for Workplace location determination, but generally the CIDs give too rough walk coordinates. For instance in town areas where there are several University: main base stations the cell data usually overlaps each other. Thus the id Home library, halls, can change from one to another in same location several times in rest., other lib. minutes. We used also logged time data together with the CID information. That gave a little bit more precision to the location Downtown: determination. shops, restaurants.. Because of the use of Bluetooth for close area data communication in mobile phones we decided to log the BT address information and use it together with the CIDs for even better location accuracy. Figure 1. Data logging path (partially predefined). The scanning software was on all the time and the logged data 2.1 Bluetooth was downloaded to PC afterwards. To help the analyzing phase Bluetooth (BT) can be used to build a Personal Area Network we used notebook markings (place, time and some situations) all (PAN). It is defined as an open standard for short-range the time (figure 2). The BT enabled devices which were found transmission of digital voice and data between mobile devices active were PCs, Laptops, PDAs and mobile phones. We didn’t (laptops, PDAs, phones) and desktop devices. Bluetooth devices use any fixed BT or WLAN beacons. are generally divided to two categories: Class 2 devices operate in the short distance (10-30 meters) and class 1 devices up to 100 meters. The main bandwidth for class 2 BT devices is 2.1 Mbit/s analyze with speed of 2.4 GHz. This bandwidth is generally known as the logged data Industry/Science/Medical (ISM) free band. A BT device is identified by its MAC (Media Access Control) compose case (context) rules address and a possible user name as seen in the example given in the Table 1. From the data we can see that two BT devices has come into the range of the logger and one (D400) is not anymore available. use notebook change phone info profile Table 1. A clip of a mobile phone data log. Connections: BTDevice: 0010c64ed053:D800 InRange 2005/09/14 Figure 2. The overall flow of using context information to 14:11:42 phone://TerminalEvents/ change the mobile phone profile. Connections: BTDevice: 0010c63a5cc8:Unknown InRange 2005/09/14 14:11:46 phone://TerminalEvents/ Connections:BTDevice:0010c63a5caf:D400 NotAvailable 2.3 GSM Cell ID (CID) observations In general the GSM CID can give location information, but as we mentioned earlier it needs some supporting data to be useful. Further we can observe the Bluetooth device type, its MAC address and name (laptop PC D800), data whether the device is in ubiPCMM06:2nd International Workshop on Personalized Context Modeling and Management for UbiComp Applications Table 2. A clip of the logged data showing different CIDs 18 16 2005/09/14 14:30:55 phone://TerminalEvents/ Location:Network:CellID 14 12526 12 2005/09/14 14:32:21 phone://TerminalEvents/ Location:Network:CellID C ID 12 5 19 10 12679 C ID 12 5 2 6 8 2005/09/14 14:35:38 phone://TerminalEvents/ Location:Network:CellID C ID 12 6 7 9 12526 6 C ID 12 6 6 2 2005/09/14 14:35:54 phone://TerminalEvents/ Location:Network:CellID 4 12679 2 0 BT1 BT2 BT3 BT4 The data in table 2 shows that in the same physical location the CID have changed back and forth between two cells in five minutes. These CIDs shown in this example were picked up from Figure 3. Most occurring BT MAC addresses in workplace earlier experiments to indicate work situation. and their CIDs. BT1 and 2 are laptops in the same room. But actually this CID data can give misinformation if used alone. The max parameters were explicitly counted from the logged data In the experiment environment the university area is close to our and in this situation (figure 1) the parameters FreetimeBTMax workplace and the CIDs can change although no mobility is was 4 and WorkBTmax was 16. The logged data showed also observed. At least the other CID seen in the table 2 example such amounts of BT devices which could indicate WORK appeared also in the university area. situation but the CID didn’t support that. In the case rule example nBTmax is the count of BT devices (work/leisure). The parameter To avoid this overlapping cell data, logged time data (time of day, CurrentProfile was changed accordingly. weekend/weekday) was also used and gave better results. Based When checking the reoccurrence of same BT devices it must be on these observations we decided to examine the BT data together realized that the only significant BT -parameter is the BT MAC with CID information. address. One must match the addresses from the log data one by one, because they don’t show always in the same order. The following table gives one example of the BT device 3. EXPERIMENTATION FINDINGS occurrences in a workplace. From the logged data we concentrated to examine four basic parameters. The amount of BT devices in range during given Table 4. Example log of the BT occurrences in work time slice, the difference of the seen BT device amount with different CIDs, the intensity of BT device occurrences in the scan 2005/09/14 14:11:42phone://TerminalEvents/ (log) and the occurrence of one BT device with same BT devices Connections:BTDevice:0010c63a5cc8:UnknownInRange (to define BT groups). 2005/09/14 14:11:46 phone://TerminalEvents/ We analyzed the most CID occurrences known to appear in the Connections:BTDevice:0010c63a5caf:D400 NotAvailable work location and used them with the average amount of observed 2005/09/14 14:11:50 phone://TerminalEvents/ BT devices in the work location (Figure 3). Based on that study Connections:BTDevice:0010c64d9f85:oulkv1k149 NotAvailable we derived these case rules: … Table 3. Workplace case definition rules for profile changing 2005/09/14 14:23:07 phone://TerminalEvents/ Connections:BTDevice:0010c63a5cc8:Unknown NotAvailable IF CurrentBTCount => WorkBTmax 2005/09/14 14:30:55 phone://TerminalEvents/ ANDF (CID = 12519 ORF CID = 12526 ORF CellID = 12679 ) Location:Network:CellID 12526 THEN CurrentContext= WORK ; CHANGE CurrentProfile 2005/09/14 14:32:21 phone://TerminalEvents/ Location:Network:CellID 12679 IF CurrentBTCount <= FreetimeBTmax 2005/09/14 14:35:38 phone://TerminalEvents/ ANDF ( CellID <> 12519 ORF CellID <> 12526 ORF CellID Location:Network:CellID 12526 <> 12679 ) 2005/09/14 14:35:54 phone://TerminalEvents/ THEN CurrentContext= OTHER; CHANGE CurrentProfile Location:Network:CellID 12679 ubiPCMM06:2nd International Workshop on Personalized Context Modeling and Management for UbiComp Applications When studying the scanned BT devices and their variation and intensity with time and place we noticed that: 12 1 typically in our observations there was variation of 10 scanned BT devices between work and other places 2 the amount of BT devices in the work time/place was in 8 one test double than elsewhere 3 the smallest amount of BT devices was at home (1-2) 6 B T InRange 4 in restaurant and shop environments there was some 4 increase (4-5) of BT devices as well as in the university area 2 3.1 Further experiment results 0 To further investigate the use of BT data we decided to make a 0 0 0 0 0 0 0 0 longer scan (48 hours) and in different situations and places. Still .0 .0 .0 .0 .0 .0 .0 .0 20 22 24 02 04 06 08 10 the basic idea was to find out the usefulness of the BT data in defining different contexts. We had a partially predefined route as in the earlier experiment. During the test period we found 163 BT Figure 5. BT in range @ home location. 4 CIDs observed, 2 “InRange” occurrences (partially same devices). The earlier available all the time. Notice the increase of BT devices in defined work CIDs could be mapped easily to the Bluetooth range when coming to work (8 am). devices in the workplace. The same finding applied also to home location: the earlier experienced pair: (Same CIDs & Same BTs = Based partially to the case described in figure 4 we derived a case Same Place). In this experiment we noticed also that 10-15 BTs definition for a basic group (work, home, other). Assume that if a were scanned only once or twice in a short time slice and basic group of BT devices occurs several times together in given according to notebook markings they were passers by or devices time slice and there are only couple of other devices seen in a shop or restaurant. sporadically we could define this as a basic group case. For this basic group we can define also guest groups from all those sporadically seen BT MACs. 12 10 Table 4. Group case definition 8 CASE BasicGroupA 6 B T InRange is BTMACa, BTMACb, BTMACc...BTMACx with CID1...CIDn 4 with GUESTa, GUESTb .. GUESTx 2 use ProfileGroupA 0 0 0 0 0 0 .0 .3 .0 .3 .0 18 18 19 19 20 To define this kind of case we need several occurrences and to Figure 4. BT in range during a public place situation (school; finally decide if the group is a real case we must define: parents meeting) 4 CIDs observed, 2 available all the time (same CIDs as in home location, 500m). 1. The correct time slice or count of occurrence for learning – this deals with the situations in (normal for Figure 4 gives BT device occurrence data during parents meeting updating a case database) in the evening. The peak in the occurrence (11 devices scanned in • defining a group same time) happened when nearly all teachers and parents were in • defining guests the school’s main hall in 10-20 meters proximity to each other. • defining a new group (- /+ The use of this kind of information is quite demanding and hard to members) say if the situation will ever happen again. However, it gives • deleting a group some hints and reasoning advice. If we define this situation as a situation case with the known parameters (BTs + CIDs observed in given time) we can possibly afterwards use it as a basic case for 4. CONCLUSIONS AND FUTURE WORK learning same kind of situations. We have described in this paper how to collect primary context The location change from home to work can be easily seen in data for a mobile phone and specially described our experiments figure 5, where the BT device amount changes strongly when one in combining GSM CID data with Bluetooth data collected from arrives to work place. So we can make some situation and mobile and other BT enabled devices (e.g. PCs and Laptops). location type conclusions based on the sudden change of scanned BT device amount together with the known CID data. ubiPCMM06:2nd International Workshop on Personalized Context Modeling and Management for UbiComp Applications We defined some cases based on the logged CID and BT data. For 6. REFERENCES changing the user profile in the mobile (smart) phone we defined [1] Borriello Gaetano, Chalmers Matthew, LaMarca Anthony case rules which have been tested and implemented first only as and Nixon Paddy, Delivering REAL-WORLD Ubiquitous rules. This will be further studied. The use of BT data increased Location Systems, Communications of the ACM, March the accuracy of work location definition. Generally we found that 2005, Vol 48, No.3. 36-41. ACM Press 2005. CBR method seems to be useful: we found data which can be [2] Consolvo Sunny, Smith Ian E., Matthews Tara, LaMarca used to build cases. Anthony, Tabert Jason, Powledge Pauline, Location 1. CID with BT MAC address can be used to define Disclosure to Social Relations: Why, When, & What People profile cases Want to Share, CHI 2005 Conference Proceedings, pp. 81- 90, ACM 2005 2. with help of learning case data CID and BT data can be [3] Danezis George, Lewis Stephen and Anderson Ross. How used to build group cases Much is Location Privacy Worth?. Fourth Workshop on the We were also thinking about the social and privacy issues when Economics of Information Security (WEIS 2005). Harvard using the scanning software. We didn’t mention anybody that we University, 2 - 3 June 2005. were scanning because according to our knowledge Bluetooth, [4] Eagle Nathan, Pentland Alex (Sandy), Reality mining: WLAN, etc. access points are legal to scan in EU. Furthermore sensing complex social systems, Personal and Ubiquitous users of Bluetooth enabled devices can explicitly define if they Computing, Nov 2005, Pages 1 – 14 release the data or not (BT enable/disable) and Bluetooth name [5] Järkvik et al . Group Detection Using Bluetooth, Poster can be left as unknown (table 4). Also according to [2, 3] social presentation at UbiComp 2005. denial is not fear, because people tend to disclose location and [6] Kang Jong Hee, Welbourne William, Stuart Benjamin, other context data if they think it will be useful for them. Borriello Gaetano, Extracting Places from Traces of Locations, ACM SIGMOBILE Mobile Computing and The data logging method that we used (walking and scanning) Communications Review, Vol. 9, Nr. 3, 2005, pp. 58-68. reminds the WarDriving2 method: [7] Kofod-Petersen Anders, Aamodt Agnar, Case-Based • Using WarDriven (-Walked) data from Web could give Situation Assessment in a Mobile Context-Aware System, more location information Proceedings of the Ubicomp 2003 Workshop on Artificial • Oulu not yet WarDriven Intelligence in Mobile System 2003, October 12, Seattle, USA. [8] Korpipää Panu. Blackboard-based software framework and WarDrive = Driving in public areas with WLAN & BT -devices tool for mobile device context awareness. Doctoral thesis. scanning the public network with GPS device and mapping the VTT Electronics, Espoo, 2005. 225p. VTT areas with explicit coordinate data. Publications : 579. WarWalking = same but by walking one can get more accurate [9] Schilit, B. N., LaMarca, A., Borriello, G., Griswold, W. G., data from for instance fixed BT beacons. McDonald, D., Lazowska, E., Balachandran, A., Hong, J., and Iverson, V. 2003. Challenge: ubiquitous location-aware 5. ACKNOWLEDGMENTS computing and the "place lab" initiative. In Proceedings of This work has been a part of the Finnish-French project the 1st ACM international Workshop on Wireless Mobile ADAMOS (Adaptive Mobile Services). The work was supported Applications and Services on WLAN Hotspots (San Diego, by the Academy of Finland and French Science funding CA, USA, September 19 - 19, 2003). WMASH '03. ACM institutions. The partners were University of Oulu, VTT Press, New York, NY, 29-35. DOI= Technical Research Centre of Finland, CEA Leti, University of J. http://doi.acm.org/10.1145/941326.941331 Fourier, CNRS, MSH Alpes, ST Microelectronics and France [10] Schmidt Albrecht, Aidoo Kofi Asante, Takaluoma Antti, Telecom R&D. Thanks to all the active partners giving advice Tuomela Urpo, Van Laerhoven Kristof, Van de Velde and commenting on this work. Walter, Advanced Interaction in Context, Lecture Notes in Computer Science, Volume 1707, Jan 1999, Page 89. 2 http://wigle.net/)