Pair Easy Blueooth Module
SAN
Posts: 29
Hello.
I have 2 Easy Blueooth Module (#30085). I am able to connect it with my PC bluetooth and its working.
Can any one help me to connect the pair of Easy Blueooth with each other.
I mean, how I can create the communication between 2 Easy Blueooth Module.
Please help.
I have 2 Easy Blueooth Module (#30085). I am able to connect it with my PC bluetooth and its working.
Can any one help me to connect the pair of Easy Blueooth with each other.
I mean, how I can create the communication between 2 Easy Blueooth Module.
Please help.
Comments
There's a brief description of "Transparent Master" and "Transparent Slave". One module has to act as a Bluetooth Master and the other has to act as a Bluetooth Slave. What you've done before is to establish the Easy Bluetooth as a Slave with the PC as Master. Now you have to set up one of the Easy Bluetooth modules as a Master following the instructions in the User Manual.
How I can select the Transparent modes. Is it the same way I'm sending data usnig SERIN command ?
Can you give me a sample code ?
Plz help.
Here's a soft reset command using the SEROUT statement
SEROUT < transmit pin>,84,[noparse][[/noparse]$02,$52,$26,$00,$00,$78,$03]
This works at 9600 Baud and sends the start code ($02), packet type ($52), reset operation code ($26), two byte data count (zero - $00,$00), checksum ($78), and end code ($03). This packet format is described in the User Manual.
Go through the sample code given in the Easy Bluetooth documentation. You may want to use the PC Easy Bluetooth program to configure the module when attached to a PC, then attach it to the Stamp already configured.
Post Edited (Mike Green) : 11/4/2009 8:34:17 PM GMT
I can't give you "the sequence" of opcodes. I don't have an Easy Bluetooth module and I'm just reading the manual and trying to explain it. Page 67 of RBT-001 indicates that the SPP (serial port profile) port number for the Easy Bluetooth module is normally 1, so you'd need to do an SPP_ESTABLISH_LINK (page 48) using the local port number (1), the Bluetooth address of the slave, and the slave's port number (1). See the diagram on page 51 for the steps needed to set up a transparent link. The slave would need to do the sort of steps shown on page 52. I think it's possible to set up default connections using RoboTech's utility program so the two Easy Bluetooth modules would automatically attempt to set up a transparent connection between them, but I can't tell you which commands to use.
If you can't figure it out, you might contact Parallax Tech Support directly. They may be able to point you to some other examples.
I tried with the SERIN command but the Basic Stamp is not receiving anything means the module is not sending any data.
Is there any specific command to Enable or enter into Command Mode ?
The CFM Packet type syntax I gave is -
SERIN TX,Baud, [noparse][[/noparse]var1,var2,......,varn]
Is it right ? or first I need to send the Start($02),Packet Type($43),opcode, data lenght, checksum - using SEROUT command
then I can receive the values ?
Thank you Mike for your help.
To connect 2 easy bluetooth module(RBT-001) u need to remember somethin
1. When a module is ON and you turn it OFF, you have to wait at least 5 seconds before turning it ON again, otherwise it could not start correctly
2. If you establish a connection to a remote RBT-001 and then turn off the module that originated the connection, the remote module will automatically drop the connection after 20 seconds: you can not re-connect the module within this 20 seconds otherwise you will not be able to establish the connection. This is true also if you turn off the remote module: the module that originated the connection will remain connected until the 20 seconds time-out expires, so you can not give commands to the module during these 20 seconds.
The bs2 code is below
'
' {$STAMP BS2}
' {$PBASIC 2.5}
RX PIN 2
TX PIN 0
Baud CON 84
Program_Start:
DEBUG CLS
PAUSE 1000
DEBUG CR,"Establishing SPP connection..."
' To establish SPP Connection:
' substitute $FF,$FF,$FF,$FF,$FF,$FF with the Remote Bluetooth Module Address
' of the remote Easy Bluetooth module writing the address in "Little Endian" Byte order,
' i.e. from the least significant Byte to the most significant Byte
' for instance 00:17:A0:00:1D[noparse]:D[/noparse]2 must be written as $D2,$1D,$00,$A0,$17,$00
SEROUT TX, Baud, [noparse][[/noparse]$02,$52,$0A,$08,$00,$64,$01,$FF,$FF,$FF,$FF,$FF,$FF,$01,$03]
PAUSE 5000
DEBUG CR,"Entering Transparent mode...",CR
'Entering Transparent mode
SEROUT TX, Baud, [noparse][[/noparse]$02,$52,$11,$01,$00,$64,$01,$03]
PAUSE 3000
'Simple example code after full link establishment
SEROUT TX, Baud, [noparse][[/noparse]CR, LF, "Easy Bluetooth test - starting counter...", CR, LF]
counter VAR Byte
DO
SEROUT TX, Baud, [noparse][[/noparse]DEC counter,CR]
counter = counter + 1
PAUSE 500
DEBUG ? counter
LOOP
'
This code is working porperly