Seems I read somewhere that the master and slave Bluetooth modules don't have to be on the same baud rate? That computer A could talk to the master BT at 9600 bps, the master and slave talk on their own protocol, and then the slave could talk to the Arduino on the other end at a different rate??? I searched for info on this but can't find anything now... Maybe it's all wrong
if two modules talk to each other and they need to understand each other they need to speak the same language. Same baudrate and same protocol.
If you have 3 nodes in a network { A, B, C } that means that you have 3 possible pairs {A,B} , {B, C}, {C, A} ..
Any pair need to talk at the same speed, but different pairs don't need to. In fact often one wants to maximize the baudrate per pair .
in you case
PC ---(1) ----- MASTER ----(2)---- SLAVE
(1) hardware serial - The PC and the master could talk at 115200 baud, while
(2) the BT connection - could be done at 9600 e.g. because that is the max baudrate at a given distance.
Hmmm, I follow in part, but to be sure:
My exact setup is
Arduino ---a---> BTmaster ---b---> BTslave ---c---> commericial MIDI microprocessor
So are all of these true statements?
- communication a could be 56kbps while communication c is 31250bps
- Changing the baud rate of BTmaster thru AT commands is changing communication a not b.
- Changing the baud rate of BTslave thru AT commands is changing communication c not b.
Thanks
1 = true
2 depends on the AT command
3 see 2
Be aware that the throughput will be limited by the "weakest link"
Arduino --com a--> RN42 module --com b---> slave module --com c--> MIDI commercial product
hmmm, I've read thru that data sheets a few times, and always thought there was just one baud rate to set.
So, if my Master BT module is the RN-42
On page 11 it says, "Example: SU,57 sets the baudrate to 57600 baud."
Is this changing 'com a' or 'com b'?
I thought it would be changing 'com a', and then on my Arduino I would match it with 'Serial.begin(57600);'