Bluetooth Connection Modifications: Linux
The basic process of making a Bluetooth connection rely upon a MAC
address.
Basic usability questions:
- How will a user know the relevant MAC address?
- Will moving from one lab workstation to another,
will a CSC 161 student have to edit the program?
- A sticker on each Fluke has a serial number. How could a
programmer use the serial number to get a MAC address?
Two Approaches To Simplify Robot Connections on Linux
-
RFCOMM
- Linux allows the placement of a file entry
in
/etc/bluetooth/rfcomm.conf
- This entry allows the identification of a default MAC address
to be specified for a workstation.
- With a couple system-administration procedures, a program
can connect to the specified robot command with the MyroC
command
rConnect("/dev/rfcomm0");
- Behind the scenes, Linux simplifies the workstation's
connection process to
socket_num = open ("/dev/rfcomm0", O_RDWR | O_NOCTTY); //open to read and write, as a non-controlling terminal
- Within the Science 3815 lab, each workstation is paired with
its own robot, this process is followed for this pairing, and
the same MyroC program will work without change when a student
moves from workstation to workstation.
-
Fluke serial number
- A Linux utility allows a program to discover all robots that
are turned on.
- When a Fluke serial number is known,
MyroC's
rConnect can follow this discovery process
to locate the given Fluke and its serial number.
- Although the search process takes some time, a programmer
could edit a program with the Fluke serial number to make a
connection.
created 29 January 2021
revised 29 January 2021
|
|
|
previous next
|