short range networks mark green school of creative media
TRANSCRIPT
Short Range NetworksShort Range Networks
Mark GreenMark Green
School of Creative MediaSchool of Creative Media
IntroductionIntroduction
WiFi allows mobile devices to connect to WiFi allows mobile devices to connect to the Internetthe Internet
It’s a shared medium and requires It’s a shared medium and requires reasonably expensive hardwarereasonably expensive hardware
Would like to have something that is much Would like to have something that is much cheaper and works over a much shorter cheaper and works over a much shorter rangerange
Replacement for wires, allow Replacement for wires, allow my thingsmy things to to work togetherwork together
IntroductionIntroduction
We now carry multiple intelligent devices, We now carry multiple intelligent devices, want to connect these devices to want to connect these devices to headphones, microphones, etcheadphones, microphones, etc
Don’t want to have wires between all of Don’t want to have wires between all of these thingsthese things
Want them to connect automaticallyWant them to connect automatically Want to have more intelligent ways of Want to have more intelligent ways of
identifying ourselvesidentifying ourselves
IntroductionIntroduction
Look at three technologies that provide Look at three technologies that provide some of these things:some of these things:
1.1. Smart cardsSmart cards2.2. RFIDRFID3.3. BluetoothBluetooth
All three are now widely available and in All three are now widely available and in use todayuse today
Could have some interesting artistic / Could have some interesting artistic / media applicationsmedia applications
Smart CardsSmart Cards
Look like a regular credit card or ID card, Look like a regular credit card or ID card, but contain a computer chipbut contain a computer chip
There are several versions of this There are several versions of this technology, depend upon the technology, depend upon the sophistication of the chipsophistication of the chip
By itself the smart card isn’t intelligent, it By itself the smart card isn’t intelligent, it doesn’t have any power to run its chipdoesn’t have any power to run its chip
Chip gets its power from the readerChip gets its power from the reader
Smart CardsSmart Cards
Reader broadcasts a radio signal, very Reader broadcasts a radio signal, very short range (think of the Octopus readers)short range (think of the Octopus readers)
Chip gets its power from this radio signalChip gets its power from this radio signal Radio signal also used to communicate Radio signal also used to communicate
with the chip, this is the network partwith the chip, this is the network part Some smart cards are mainly memorySome smart cards are mainly memory The reader can read and write the The reader can read and write the
contents of various memory locationscontents of various memory locations
Smart CardsSmart Cards
The smart card could contain ID The smart card could contain ID information in one of its memory locationsinformation in one of its memory locations
The reader could use this information to The reader could use this information to determine if a door should be unlockeddetermine if a door should be unlocked
Other locations could hold the amount of Other locations could hold the amount of money on the cardmoney on the card
When you make a purchase, the amount When you make a purchase, the amount of the purchase is deducted from the cardof the purchase is deducted from the card
Smart CardsSmart Cards
Could also be used to keep track of the Could also be used to keep track of the station where you got onto a train, etcstation where you got onto a train, etc
Have a limited amount of memory, usually Have a limited amount of memory, usually less than 1 KByteless than 1 KByte
Some smart cards also have some Some smart cards also have some processing abilityprocessing ability
This could be used for extra security, This could be used for extra security, make sure that only the appropriate make sure that only the appropriate readers can change itreaders can change it
Smart CardsSmart Cards
Processor could also be used to Processor could also be used to implement part of the application, do some implement part of the application, do some of the calculationsof the calculations
The smart cards themselves are very The smart cards themselves are very cheap, most of the technology is in the cheap, most of the technology is in the readerreader
Works well for storing limited amounts of Works well for storing limited amounts of informationinformation
RFIDRFID
Same basic idea as smart card, but Same basic idea as smart card, but smaller and cheapersmaller and cheaper
Restricted to memory only, no processorRestricted to memory only, no processor Some are read only, others are both read Some are read only, others are both read
and writeand write Very small amount of memory, at most a Very small amount of memory, at most a
few hundred bytesfew hundred bytes
RFIDRFID
Early RFID devices had batteries, can Early RFID devices had batteries, can have a longer rangehave a longer range
The current movement is towards cheaper The current movement is towards cheaper units with no batteriesunits with no batteries
Want to have units in the $1 (HK) price Want to have units in the $1 (HK) price range or lowerrange or lower
Aiming at an electronic replacement for Aiming at an electronic replacement for bar codesbar codes
RFIDRFID
Bar codes are very cheap, but have some Bar codes are very cheap, but have some problemsproblems
There must be contact to read them, There must be contact to read them, usually requires a personusually requires a person
The bar code must be visible and cannot The bar code must be visible and cannot be exposed to severe conditionsbe exposed to severe conditions
Want an ID mechanism that can be read Want an ID mechanism that can be read remotely, automatically and in many remotely, automatically and in many conditionsconditions
RFIDRFID
New ones can be embedded in paper New ones can be embedded in paper labels, or money (new US $20 bill)labels, or money (new US $20 bill)
Very thin, don’t take up much roomVery thin, don’t take up much room Main application is tracking packages and Main application is tracking packages and
productsproducts Move to have RFID tag embedded in Move to have RFID tag embedded in
every unit of clothing produced, be able to every unit of clothing produced, be able to track the product in the storetrack the product in the store
RFIDRFID
RFIDRFID
RFIDRFID
Can also be used to identify genuine Can also be used to identify genuine products from fakesproducts from fakes
There are some privacy concernsThere are some privacy concerns If the RFID tag is embedded in clothing, If the RFID tag is embedded in clothing,
can track the person wearing the clothescan track the person wearing the clothes Can be used to spy on people, or keep Can be used to spy on people, or keep
track of their locationstrack of their locations You wouldn’t be aware of thisYou wouldn’t be aware of this
RFIDRFID
Why should we be interested in this?Why should we be interested in this? Normally the readers are in a fixed Normally the readers are in a fixed
location, and the tags are on things that location, and the tags are on things that movemove
But, what if it was the other way around?But, what if it was the other way around? We attach the tags to places in the We attach the tags to places in the
environment, we can record where each environment, we can record where each tag is, or possibly store it in the tagtag is, or possibly store it in the tag
RFIDRFID
The reader is now portable, attached to a The reader is now portable, attached to a phone or PDAphone or PDA
As we move through the space, the reader As we move through the space, the reader will detect different tags, this will tell us will detect different tags, this will tell us where we arewhere we are
For example, a tag attached to a store For example, a tag attached to a store display could trigger the download of display could trigger the download of information to our phone or PDAinformation to our phone or PDA
RFIDRFID
A tag on a display at a museum could A tag on a display at a museum could identify the exhibit, and we could identify the exhibit, and we could download information on itdownload information on it
It could also be used as part of a gameIt could also be used as part of a game Need to find all the items or locations Need to find all the items or locations
before the other playersbefore the other players Once a tag is found, it could be removed Once a tag is found, it could be removed
from play to make the game more difficultfrom play to make the game more difficult
BluetoothBluetooth
Original aim was to replace wiresOriginal aim was to replace wires Devices are connected using wires, Devices are connected using wires,
usually at least one wire for each deviceusually at least one wire for each device At home this is okay, but for mobile At home this is okay, but for mobile
applications this can be a problemapplications this can be a problem What happens if you lose or drop one of What happens if you lose or drop one of
the wires? Trip over them!the wires? Trip over them! With several devices, need to keep all of With several devices, need to keep all of
the wires straightthe wires straight
BluetoothBluetooth
Produce a wireless technology that allows Produce a wireless technology that allows devices to be connecteddevices to be connected
Want to connect multiple devices, previous Want to connect multiple devices, previous approaches were restricted to one device approaches were restricted to one device at a timeat a time
Want something that is easy to use and Want something that is easy to use and cheapcheap
Want to turn the device on and have it Want to turn the device on and have it connectedconnected
BluetoothBluetooth
WiFi is a possibility, but doesn’t really WiFi is a possibility, but doesn’t really solve the problemsolve the problem
Need to manage IP addresses and it is Need to manage IP addresses and it is relatively expensiverelatively expensive
Want something in the $100 HK range or Want something in the $100 HK range or less, this isn’t possible with WiFiless, this isn’t possible with WiFi
Work on the Bluetooth standard started 5 Work on the Bluetooth standard started 5 or 6 years ago, now becoming popularor 6 years ago, now becoming popular
BluetoothBluetooth
Bluetooth is based on a few simple ideas:Bluetooth is based on a few simple ideas: Device and service discoveryDevice and service discovery Personal area networksPersonal area networks Dynamic network managementDynamic network management
These features make the Bluetooth These features make the Bluetooth standard fairly complexstandard fairly complex
One of the reasons why it took some time One of the reasons why it took some time to develop, need to have custom chipsto develop, need to have custom chips
Device DiscoveryDevice Discovery
Always looking for more devices to Always looking for more devices to connect toconnect to
Periodically look to see if there are new Periodically look to see if there are new devices, and what these devices can dodevices, and what these devices can do
Don’t need to tell computer/phone to Don’t need to tell computer/phone to connect, it will do it automaticallyconnect, it will do it automatically
Usually takes 5 to 10 seconds to find a Usually takes 5 to 10 seconds to find a new device, may be quicker if device isn’t new device, may be quicker if device isn’t busybusy
Service DiscoveryService Discovery
Once a new device is found, can Once a new device is found, can determine what that device can dodetermine what that device can do
Can determine if it is a piece of hardware, Can determine if it is a piece of hardware, like a printer or headphoneslike a printer or headphones
Can determine the services it can provide, Can determine the services it can provide, like connection to the Internet, modem, like connection to the Internet, modem, printing, etcprinting, etc
User doesn’t need to configure, can be User doesn’t need to configure, can be done automaticallydone automatically
Device and Service Discovery Device and Service Discovery
Service DiscoveryService Discovery
Service DiscoveryService Discovery
Each device provides some services, Each device provides some services, some may be very specializedsome may be very specialized
Example: headphones may only provide Example: headphones may only provide an audio servicean audio service
A USB Bluetooth dongle on a computer A USB Bluetooth dongle on a computer could provide a large number of services, could provide a large number of services, 7 or 87 or 8
Phones and PDAs typically have a small Phones and PDAs typically have a small number of servicesnumber of services
Service DiscoveryService Discovery
Devices tend to be either providers of Devices tend to be either providers of services or consumers of servicesservices or consumers of services
Devices advertise the services that they Devices advertise the services that they provide, so other devices can find themprovide, so other devices can find them
When a device wants a service it must When a device wants a service it must actively look for it, the discovery processactively look for it, the discovery process
Connection is made when the service is Connection is made when the service is foundfound
Personal Area NetworkPersonal Area Network
More than a device-to-device connectionMore than a device-to-device connection Devices can form their own network, up to Devices can form their own network, up to
7 devices on a network7 devices on a network A device can belong to more than one A device can belong to more than one
networknetwork One device is the master, controls the One device is the master, controls the
network, the others are slavesnetwork, the others are slaves Master device can change dynamicallyMaster device can change dynamically
Personal Area NetworkPersonal Area Network
Concept: computer/phone will form the Concept: computer/phone will form the center of a personal network, will move center of a personal network, will move with youwith you
All your devices will be connected, be able All your devices will be connected, be able to work togetherto work together
PDA can connect to Internet through PDA can connect to Internet through mobile phone, PDA can dial the phone mobile phone, PDA can dial the phone and connect to ISP, don’t need user to set and connect to ISP, don’t need user to set it upit up
Dynamic Network ManagementDynamic Network Management
Devices can come and go, don’t need to Devices can come and go, don’t need to connect and disconnect themconnect and disconnect them
Devices can reconnect automaticallyDevices can reconnect automatically Breaking a connection is not a serious Breaking a connection is not a serious
problem, can easily reconnect when the problem, can easily reconnect when the device comes within range againdevice comes within range again
Different from Internet where a disconnect Different from Internet where a disconnect is a serious problemis a serious problem
Dynamic Network ManagementDynamic Network Management
Most Bluetooth devices are fairly short Most Bluetooth devices are fairly short range, 10 meters at the maximumrange, 10 meters at the maximum
This works well for a single room, or when This works well for a single room, or when walking aroundwalking around
Some devices have a range of 100 Some devices have a range of 100 meters, this is more common for services meters, this is more common for services like printers or network access pointslike printers or network access points
Can be shared by several peopleCan be shared by several people
PrivacyPrivacy
If all of this information is flowing around If all of this information is flowing around can’t other people see itcan’t other people see it
Just bring a Bluetooth device close and Just bring a Bluetooth device close and listen inlisten in
This is hard to do without being detectedThis is hard to do without being detected Unlike most other wireless technologies, Unlike most other wireless technologies,
Bluetooth doesn’t use a fixed frequencyBluetooth doesn’t use a fixed frequency Switches frequencies rapidlySwitches frequencies rapidly
PrivacyPrivacy
Bluetooth uses the 2.4GHz band, same as Bluetooth uses the 2.4GHz band, same as WiFi and other wireless devicesWiFi and other wireless devices
Bluetooth divides this band into many Bluetooth divides this band into many channels (around 80, depends upon the channels (around 80, depends upon the region)region)
Since other devices use this band, could Since other devices use this band, could get interference, the interference could get interference, the interference could change as the user moveschange as the user moves
PrivacyPrivacy
To solve this problem Bluetooth devices To solve this problem Bluetooth devices change frequency many times per secondchange frequency many times per second
If one frequency is busy, the next one is If one frequency is busy, the next one is probably freeprobably free
This increases the reliability of This increases the reliability of communications, conflicts with other communications, conflicts with other devices only occur for very short periods devices only occur for very short periods of timeof time
Also increases securityAlso increases security
PrivacyPrivacy
Master determines the frequency pattern, Master determines the frequency pattern, informs the slavesinforms the slaves
To other devices this pattern appears to To other devices this pattern appears to be randombe random
This allows several Bluetooth networks to This allows several Bluetooth networks to operate in the same area, won’t interfereoperate in the same area, won’t interfere
Other devices can’t snoop without Other devices can’t snoop without informing the masterinforming the master
PrivacyPrivacy
Any new device must ask the master for Any new device must ask the master for the frequency pattern, otherwise won’t the frequency pattern, otherwise won’t receive the datareceive the data
This device will then join the network, but This device will then join the network, but we will know about itwe will know about it
We will know if its one of our devices, or We will know if its one of our devices, or someone trying to listen to our someone trying to listen to our conversationconversation
BluetoothBluetooth
Now becoming common on mobile phones Now becoming common on mobile phones and PDAsand PDAs
Wider range of devices that use itWider range of devices that use it USB Bluetooth adaptors are available for USB Bluetooth adaptors are available for
PCs, and their prices has been dropping PCs, and their prices has been dropping latelylately
I bought one several years ago and it was I bought one several years ago and it was close to $500, now they are less than close to $500, now they are less than $200$200
DevelopmentDevelopment
One of the current problems with One of the current problems with BluetoothBluetooth
It is relatively easy to develop Bluetooth It is relatively easy to develop Bluetooth applications for phones and PDAs, applications for phones and PDAs, developer resources are freely availabledeveloper resources are freely available
It is also fairly easy to do for Linux, several It is also fairly easy to do for Linux, several free Bluetooth stacks are available on the free Bluetooth stacks are available on the Internet (I’ve tried several)Internet (I’ve tried several)
DevelopmentDevelopment
The problem is with desktop Windows The problem is with desktop Windows systemssystems
At the present time Windows has very At the present time Windows has very limited support for Bluetooth developmentlimited support for Bluetooth development
Claim is that XP will support it, but support Claim is that XP will support it, but support is very limitedis very limited
Only a small number of Bluetooth adaptors Only a small number of Bluetooth adaptors are supportedare supported
DevelopmentDevelopment
Current Windows XP Bluetooth support is Current Windows XP Bluetooth support is client orientedclient oriented
It provides only a few services, so it is not It provides only a few services, so it is not particularly usefulparticularly useful
Developers can add services, but this can Developers can add services, but this can take a far amount of worktake a far amount of work
Commercial packages provide a wide Commercial packages provide a wide range of services, so Microsoft could do range of services, so Microsoft could do thisthis
DevelopmentDevelopment
To use Windows XP Bluetooth you need To use Windows XP Bluetooth you need to have service pack 2, this is still in to have service pack 2, this is still in developmentdevelopment
I tried this on one of my computersI tried this on one of my computers It would only support one of the two It would only support one of the two
adapters that I have, this seems to be adapters that I have, this seems to be typicaltypical
It seems to support the more expensive It seems to support the more expensive adaptersadapters
DevelopmentDevelopment
I tried to use the Windows XP Bluetooth I tried to use the Windows XP Bluetooth API, with some successAPI, with some success
It is quite primitive, it is divided into two It is quite primitive, it is divided into two parts:parts:
1.1. Discovery and service managementDiscovery and service management
2.2. Communications between devicesCommunications between devices The two parts don’t seem to work well The two parts don’t seem to work well
together, so development is difficulttogether, so development is difficult
DevelopmentDevelopment
The only real solution for Windows The only real solution for Windows desktop development now is to use a third desktop development now is to use a third party packageparty package
This is quite expensiveThis is quite expensive An alternative is to use LinuxAn alternative is to use Linux Linux Bluetooth support has improved Linux Bluetooth support has improved
greatly over the past few yearsgreatly over the past few years This is the best alternativeThis is the best alternative
DevelopmentDevelopment
Bluetooth is now part of standard Linux Bluetooth is now part of standard Linux distributions, a few years ago you had to distributions, a few years ago you had to add it yourselfadd it yourself
Comes with the standard applications for Comes with the standard applications for connecting with devices, very similar to connecting with devices, very similar to what adapters provide for Windowswhat adapters provide for Windows
It also comes with a reasonable library so It also comes with a reasonable library so you can develop your own servicesyou can develop your own services
DevelopmentDevelopment
Like all of Linux, the source code for the Like all of Linux, the source code for the Bluetooth package is available, so you Bluetooth package is available, so you have exampleshave examples
Still not a lot of documentation for Still not a lot of documentation for developersdevelopers
Bluetooth support based on a sockets Bluetooth support based on a sockets extensionextension
Sockets are the standard mechanism for Sockets are the standard mechanism for programming Internet applicationsprogramming Internet applications
DevelopmentDevelopment
A lot of the standard techniques used to A lot of the standard techniques used to develop network applications can be used develop network applications can be used to develop Bluetooth applicationsto develop Bluetooth applications
This save some learning time, and can This save some learning time, and can copy existing codecopy existing code
In my opinion at the present time Linux is In my opinion at the present time Linux is the best platform for the development of the best platform for the development of Bluetooth servicesBluetooth services
ServicesServices
What types of additional services would What types of additional services would we like to have?we like to have?
Most of the existing services are based on Most of the existing services are based on wire replacement, simple connectionswire replacement, simple connections
How can we take advantage of Bluetooth’s How can we take advantage of Bluetooth’s capabilities?capabilities?
Build ad hoc networks, set up quickly, last Build ad hoc networks, set up quickly, last for a short period of timefor a short period of time
ServicesServices
Two ways of looking at this:Two ways of looking at this: Static networks, join and leave as you move Static networks, join and leave as you move
through the spacethrough the space Dynamic networks, move with you, Dynamic networks, move with you,
membership can change over timemembership can change over time With short range Bluetooth have a range With short range Bluetooth have a range
of about 10m, know approximately where of about 10m, know approximately where the user isthe user is
ServicesServices
One application is local based information One application is local based information services, such as museum guidesservices, such as museum guides
When user comes close to an exhibit When user comes close to an exhibit connect to a local server, get information connect to a local server, get information about the exhibitabout the exhibit
In a store can get information on items on In a store can get information on items on sale, product information for items close to sale, product information for items close to youyou
ServicesServices
What about larger areas?What about larger areas? Can use long range Bluetooth, up to Can use long range Bluetooth, up to
100m, but restricted to 7 devices100m, but restricted to 7 devices Can cover a large area with multiple short Can cover a large area with multiple short
range devices, coverage can overlaprange devices, coverage can overlap Interaction with a concert or performance, Interaction with a concert or performance,
audience participation using mobile audience participation using mobile phones or PDAs, influence the phones or PDAs, influence the performanceperformance
ServicesServices
Dynamic networks, really can’t use a Dynamic networks, really can’t use a server, mobile devices need to connect to server, mobile devices need to connect to each other, coordinate themselveseach other, coordinate themselves
One possibility is games, short multiplayer One possibility is games, short multiplayer games, group of people traveling together games, group of people traveling together on bus or MTRon bus or MTR
Example: race games, people randomly Example: race games, people randomly connect and have a short raceconnect and have a short race