Академический Документы
Профессиональный Документы
Культура Документы
MlNDS1OPMS
NX1 Bluetooth
Developer Kit
LEGO, the LEGO logo, MlNDS1OPMS and the MlNDS1OPMS logo are trademarks of the LEGO Group
2006 1he LEGO Group
Other product and company names listed are trademarks or trade names of their respective companies.
version. I.00
LEGO
O
MINDS1ORMS
O
NX1
BIuetooth
O
DeveIoper Kit
LEGO
MlNDS1OPMS
NX1 Bluetooth
Developer Kit
2006 1he LEGO Group 2
version. I.00
1ABLE OF CON1EN1S
TABLE OF CONTENTS......................................................................................................2
HARDWARE SPECIFICATION FOR THE NXT BRICK......................................................3
BLUETOOTH
MINDSTORMS
MlNDS1OPMS
NX1 Bluetooth
Developer Kit
2006 1he LEGO Group 3
version. I.00
HARDWARE SPECIFICA1ION FOR 1HE NX1 BRICK
The LEGO
MINDSTORMS
NXT brick uses various advanced electronics to yield its broad functionality. For details
on the hardware functionality of the LEGO
MINDSTORMS
32-bit ARM
processor, AT91SAM7S256
- 256 KB FLASH
- 64 KB RAM
- 48 MHz
Co-processor: Atmel
MlNDS1OPMS
NX1 Bluetooth
Developer Kit
2006 1he LEGO Group 4
version. I.00
BLUE1OO1H
O
FUNC1IONALI1Y WI1HIN 1HE NX1
1he NX1 brick supports wireless communication using Bluetooth
MlNDS1OPMS
NX1 Communication Protocol commands and that support the Serial Port Profile (SPP). lt's possible to
send programs and sound files between NX1 bricks and to use wireless communication to send and
receive information between bricks during program execution. 1o reduce the power consumption used
by Bluetooth, the technology has been implemented as a Bluetooth
As shown in the figure above, the MAS1EP NX1 can be connected to three other Bluetooth devices at
the same time. 1he MAS1EP NX1 can only communicate with one of the SLAvE devices during a given
moment, meaning that if the MAS1EP NX1 is communicating with NX1 SLAvE I and NX1 SLAvE 3 starts
sending data to the MAS1EP NX1, the MAS1EP NX1 will not evaluate the received data until it switches
to NX1 SLAvE 3.
An NX1 is not able to function as both a MAS1EP and SLAvE device at the same time because this
could cause lost data between NX1 devices. 1his functionality (i.e., serving as a master and slave
device at the same time) has been disabled in the standard LEGO MlNDS1OPMS NX1 firmware.
LEGO
MlNDS1OPMS
NX1 Bluetooth
Developer Kit
2006 1he LEGO Group 5
version. I.00
Connections to other Bluetooth devices occur through channels. 1he NX1 has four connection
channels used for Bluetooth communication. Channel 0 is always used by SLAvE NX1 devices in
communicating with the MAS1EP NX1 (i.e., rowards the MAS1EP NX1) while channels I, 2 and 3 are used
for outgoing communication jrom the MAS1EP device to the SLAvE devices.
ln figure I above, NX1 MAS1EP will use communication channels I, 2 and 3 when communicating
respectively with NX1 SLAvEI, NX1 SLAvE 2 and NX1 SLAvE 3. When one of the NX1 SLAvEs
communicates with the NX1 MAS1EP, it will use communication channel 0.
LEGO
MlNDS1OPMS
NX1 Bluetooth
Developer Kit
2006 1he LEGO Group 6
version. I.00
IN1ERFACING WI1H 1HE BLUECORE
1M
CHIP
Bluetooth
functionality within the NX1 is implemented using a standalone chip, a CSP BlueCore
1M
4
with an external 8 Mbit FLASH memory. 1he Bluetooth chip from CSP contains all the necessary
hardware to run a self-contained Bluetooth node. A I6-bit integrated processor runs the Bluetooth stack
implemented by CSP, called Bluelab. 1he NX1 runs version 3.2 of Bluelab. 1he firmware within the
BlueCore
1M
integrates a user programmable vM-task allowing us to control and run small amounts of
application code. A command interpreter is integrated within the vM that is able to decode and
respond to commands received through the UAP1 interface from the APM7 processor.
1he vM has a full implementation of both the Bluetooth SPP-A and SPP-B profiles. 1he SPP-A profile is
used when the local BlueCore
1M
is the connection initiator while the SPP-B profile is used when another
Bluetooth device initiates the connection. 1he BlueCore
1M
uses what is referred to as stream-mode to
exchange data at a rate of <= 220 K baud after a connection is established. When BlueCore
1M
is not in
stream-mode, it is in command-mode which is used to control the vM application within BlueCore
1M
and by extension, the Bluetooth functionality within the NX1. Which communication type the UAP1
includes is controlled by two interface signals (APM7_CMD & BC4_CMD).
For a detailed description of the communication protocol used between the APM7 processor and the
BlueCore
1M
chip, see Appendix 3.
1he figure below shows the interface between the APM7 processor and the BlueCore
1M
chip. (lts
functionality is explained below the figure.) For a detailed description of the pin layout, see the
hardware schematics for the NX1 brick.
Figure 2: Hardware interface between the ARM7 and BlueCore
TM
chip
1he SPl interface allows the possibility of updating the BlueCore
1M
chip. lt is not in use during normal
operation of the NX1 brick. 1he SPl interface is shared with the display within the NX1 brick.
1he Peset pin is used at startup to re-initialize the chip correctly and to disable Bluetooth.
BC4-CMD. lndication from the BlueCore
1M
to the APM7 as to which data type the BlueCore
1M
expects to
send to the APM7.
APM7-CMD. lndication from the APM7 to the BlueCore
1M
as to which data type the APM7 expects to
send to the BlueCore
1M
.
UAP1 communication is used for both data and command communication between the BlueCore
1M
and
the APM7 processor.
LEGO
MlNDS1OPMS
NX1 Bluetooth
Developer Kit
2006 1he LEGO Group 7
version. I.00
UAR1 interface between the ARM7 and the BIueCore
1M
chip
1he UAP1 within the BlueCore
1M
chip is initialized for communication with the APM7 using the following
set-up (both for stream-mode and command-mode).
Communication speed. 460.8 K bit/s
Data bits. 8 bits
Parity. No parity bits
Stop bit. One stop bit
Flow control. Hardware handshake signals (P1S & C1S)
1o establish Bluetooth communication between two Bluetooth devices, several steps need to be carried
out. Within the NX1 brick, all Bluetooth
MlNDS1OPMS
lnterface document.
All of the commands needed to control the BlueCore
1M
chip in setting up Bluetooth
communication
between devices are handled by the communication module of the standard LEGO
MlNDS1OPMS
NX1 firmware.
During any third-party firmware development for the APM7 processor, it's important to use the interface
provided in the LEGO
MlNDS1OPMS
MlNDS1OPMS
NX1 Bluetooth
Developer Kit
2006 1he LEGO Group 8
version. I.00
BLUE1OO1H
O
DEVICES COMMUNICA1ING WI1H 1HE NX1
1he LEGO
MlNDS1OPMS
NX1 brick can communicate with external Bluetooth devices that use the
serial port profile (SPP) and can be programmed to use the LEGO
MlNDS1OPMS
NX1 Communication
Protocol. A detailed description of the protocol's commands and their respective functions can be
found in the LEGO
MlNDS1OPMS
MlNDS1OPMS
device such as a
mobile phone or PDA. A detailed description of direct commands and their respective functions is
found in the LEGO
MlNDS1OPMS
MlNDS1OPMS
NX1 software. 1hese tasks are performed using the message commands,
MessagePead and MessageWrite, described in the LEGO
MlNDS1OPMS
MlNDS1OPMS
NX1 Bluetooth
Developer Kit
2006 1he LEGO Group 9
version. I.00
Reading BIuetooth
O
data from externaI BIuetooth devices
1his section describes the data that will be sent from an NX1 to another Bluetooth
MlNDS1OPMS
NX1 Bluetooth
Developer Kit
2006 1he LEGO Group I0
version. I.00
APPENDIX
1. LEGO
MINDSTORMS
MINDSTORMS
MINDSTORMS
Interface specification