Добавил:
kiopkiopkiop18@yandex.ru t.me/Prokururor I Вовсе не секретарь, но почту проверяю Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Ординатура / Офтальмология / Английские материалы / Assistive Technology for Visually Impaired and Blinde People_Hersh,Jonson_2008.pdf
Скачиваний:
0
Добавлен:
28.03.2026
Размер:
12.16 Mб
Скачать

372 11 Accessible Bus System: A Bluetooth Application

is currently no Java version of this API. Hence, BlueCove was developed to bridge this gap by developing a JSR-82 API on top of Microsoft Bluetooth API. This integration was done through Java Native Interface (JNI). This technology allows Java applications to use the Microsoft Bluetooth native C-based library.

As BlueCove is based on JSR-82 API, it offers a very open and friendly environment for programming. Being an open-source, non-commercial software, Blue Cove has its limitations in that it does not support many Bluetooth profiles. Currently, it supports only the Generic Access Profile (partially), Service Discovery Profile and Serial Port Profile. However, in this project, BlueCove is sufficient for the development of the prototype.

In addition, the Ericsson Bluetooth radio kit is used to develop the server application to poll for Bluetooth addresses in the vicinity (see Figure 11.11).

This is used in coordination with the JSR-82 application developed with BlueCove to search for the requested bus number as defined by the bus commuter.

11.4 Developmental Issues

The realisation of the Bluetooth notification system prototype is illustrated in Figure 11.5. There are three components:

Bus stop Bluetooth server attached to a USB, running the BlueCove Java Bluetooth stack.

Bluetooth mobile phone client capable of running Java (J2ME), Java Bluetooth API (JSR-82) and Multimedia API (JSR-135).

Bluetooth-bus as simulated by the Ericsson Bluetooth Radio Kit.

Figure 11.5. Implementation of system prototype

11.4 Developmental Issues

373

As shown in Figure 11.5, the Bluetooth server is started and ready to accept a client connection. The bus commuter uses their mobile phone to initiate a Bluetooth connection with the bus stop server as seen by the personal computer with the USB Bluetooth adaptor. Once a Bluetooth connection has been established, the bus commuter will key in the required bus number into their mobile phone using the preinstalled Java (J2ME) software. The number is then sent to the server.

Using the requested bus number, the server will initiate the Ericsson Bluetooth Radio kit to search for the requested bus number, based on its corresponding Bluetooth address.

Once the requested bus is within the range of the Ericsson kit, a match between the Bluetooth address and the bus number will be made, and if there is a match, a notification message will be sent to the Bluetooth client. This, in turn, activates the audio notification message of the Bluetooth client, which informs the bus commuter that their bus is approaching.

11.4.1 Bluetooth Server

In the project, as the Serial Port Profile is used, the server needs to define a service record to track the Serial Port Profile service. Thus, the particular service of the server is advertised to any client who wants to use the particular service.

After registering the service record in the service discovery database (SDDB), the server application initiates a blocking call on its incoming Bluetooth connection port. It waits for a client application to initiate contact with the server to access the service. In this case, the mobile phone (client) of the bus commuter will try to initiate contact with the server to access the advertised service to send the requested bus number to the server. The client application and the server application then establishes a Bluetooth connection.

Once the data transmission completes (server receive requested bus number), the client disconnects from the server. The server then goes back to the state where it waits for the next client connection. The flowchart, depicted in Figure 11.6, illustrates the server application.

Note that the client will disconnect from the server once the requested bus number has been transmitted. This will free the server for other user connections. A more elegant method would be to perform a master/slave switch and maintain the connection. This situation is similar to the LAN access point application; whereby the connecting devices join a piconet by forming a small piconet containing themselves as master and server as slave, after which a master/slave switch to allow the server to control the piconet. This method saves resources as it is a waste of resources for the server to constantly poll devices for connection (Bray and Sturman 2002). However, not all the mobile devices support the master/slave mechanism. Thus, a disconnection is implemented to allow other user connections.

11.4.1.1 Processing Client Connection

Once the Bluetooth connection is established between the server and the client, the requested bus number is sent from the client to the server via a stream connection

374 11 Accessible Bus System: A Bluetooth Application

Figure 11.6. Flowchart of the initialization of server

using the RFComm layer of the Serial Port Profile. The requested bus number, in this case “96”, is sent to the server. An acknowledgement message from the server is sent to the client. The client replies with a “Waiting” message and waits for the notification message that the requested bus number is approaching the bus stop.

In the meantime, the Ericsson Bluetooth radio kit application starts to poll for any available Bluetooth addresses in the vicinity of the server. The server contains a list of numbers of buses that will stop at the bus stop and their corresponding Bluetooth addresses. For every Bluetooth address detected by the Ericsson radio software, the server will check if it corresponds to the requested bus “96” in the server database. Once a match has been found, a notification message is sent to the client and the client plays an audio notification to alert the bus commuter that their bus is approaching. The flowchart, shown in Figure 11.7, illustrates the concept.

The screenshot in Figure 11.8 illustrates the server finding a matching Bluetooth address, 000AD9B862B0, which corresponds to the bus number “96”. This implies that the requested bus number is approaching the bus stop. A notification message

 

 

 

 

 

 

 

 

11.4 Developmental Issues

375

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Figure 11.7. Flowchart of server polling to find a matching Bluetooth address

376 11 Accessible Bus System: A Bluetooth Application

Figure 11.8. Screenshot of server application when the requested bus is found

is then sent to the client as shown upper dashed box of Figure 11.8. Finally, the server closes the Bluetooth connection with the client and waits for the next client to connect (lower dashed box).

11.4.1.2 Ericsson Bluetooth Module

Two Ericsson Bluetooth modules are used in this project to detect the number of the approaching bus. A single-point and multi-point Bluetooth module is to be mounted on the bus and the server respectively. The module on the bus will periodically enter the inquiry scan state to listen for an ID packet transmitted from the inquirer (Bus stop server). During the inquiry procedure, the bus mounted module will respond with a frequency hop synchronisation (FHS) packet to the inquirer. Based on the FHS packet received, the server will be able to determine the Bluetooth address (BD_ADDR) of the approaching bus module. The unique BD_ADDR is then translated to the bus number. In this method, no connection needs to be established to transmit the bus number information, thus reducing the overall response time of the system.

The proprietary Ericsson PC Reference Stack allows the control of the Bluetooth module at a different stack layer. In the initialization process, the application configures the HCI layer and registers with the stack connection manager (SCM) component.

Figure 11.9 show the address of the bus’s Bluetooth module detected by the server.

The HCI_ReqPeriodicInquiry function is used to set the module into periodic inquiry stage. The HCI_ReqPeriodicInquiry will return the address of the bus Bluetooth module detected in the vicinity.