UNO to NANO (Software Serial) & BT module (nor HC06) Serial Write/Read

Concept:

Two desktops, two BT module (nor HC06) and a nano/uno connected to them.

Master: Uno and BT module (nor HC06)

Slave: Nano and BT module (nor HC06)

(Slave and master are each connected to a computer separately.)

And when sending serial characters (0x01) from Uno to Nano, receive these serial characters from Nano and hold the LED pin 13 high.

Problem:

  1. The transmission can be cross-checked on the Arduino serial monitor connected to both computers. However, it is sent in ASCII characters (for example, '0x55' sent from the master looks like this on the slave side serial monitor = 'U')

  2. And the LED just doesn't turn on.

code below master/slave.
any helps, thanks.

////master UNO////

#include <SoftwareSerial.h>

int bt_Tx = 7; //우노의 Tx핀 Bluetooth의Rx와 연결
int bt_Rx = 8; //우노의 Rx핀 Bluetooth의Tx와 연결

SoftwareSerial bt(bt_Rx, bt_Tx);
char a = '1';

void setup()
{
  Serial.begin(9600);
  bt.begin(9600);  // Bluetooth의 Baudrate
}
void loop()
{
  if (bt.available()) {
    Serial.write(bt.read()); // PC에서 보낸 내용은 Bluetooth로 간다
  }
  if (Serial.available()) {
    bt.write(Serial.read());  // Bluetooth에서 보낸 내용은 PC로 간다
  }

  bt.write('0x01');

  {
    delay(5000);
  }

}
////slave nano ////

#include <SoftwareSerial.h>


int bt_Tx=7;  //우노의 Tx핀 Bluetooth의Rx와 연결
int bt_Rx=8;  //우노의 Rx핀 Bluetooth의Tx와 연결
int bt_led=13;


SoftwareSerial bt(bt_Rx, bt_Tx, bt_led);
char a = '1';

void setup()
{
  Serial.begin(9600);
  bt.begin(9600);  // Bluetooth의 Baudrate
}
void loop()
{
  if (bt.available()) {
    Serial.write(bt.read()); // PC에서 보낸 내용은 Bluetooth로 간다
  }
  if (Serial.available()) {
   bt.write(Serial.read());  // Bluetooth에서 보낸 내용은 PC로 간다
  }

  

  
{
  
int btread = Serial.read();

    
 if (btread == '0x01')

  digitalWrite(bt_led, HIGH);
  

  else{
  // maybe perform some other action
 // what did we get instead? 
 
  digitalWrite(bt_led, LOW);
  }
 
 }
 
}

Are the 2 BT modules paired?
Usually an HC-06 has a simpler, slave only firmware. Can't be set up as master

In fact, they are not HC06.
paired the SPP module with AT command in the link below. Is there a problem here?

Microsoft Word - manual_parani_bcdx10-v2 0 6 2_kr.docx (chipsen.com)

I don't know. You said they were HC-06...

sorry, they not HC06
that's my fault.

so what are they?

Microsoft Word - ds_parani_bcd110_kr-v1.0.0 (chipsen.com)

Microsoft Word - ds_parani-bcd110_v1.0.0 (lemosint.com)
English Version

:hushed:

thanks

No worries, I can't help with your specific issue but I can contribute that.
Hope you get it fixed soon.

... I really appreciate it.

the doc states

The BCD110 supports UART, USB, I2C, PCM, PIO interfaces for the communication with the OEM products

can you post a schema of how both modules are wired and powered ?

BTmodule use 3.3v.
below scheme: how to connect 5v MCU .
they need 120K, 62K
and no need to 'flow control'
then, FC_CTRL go to CTS line.
then mode (no 'flow control')
so, they just connect cross RX, TX and GND

pin out.

pin out.

how to connect wire.
POWER: pvcc & +3v3
and they need 4.7uf capacitor.
i only use number of PIN 2, 3, 16, 7, 8

I meant a schema of YOUR actual wiring, not the specification.

Do you want to say -
1. 0x01 refers to a series of charcaters and it contains 0 x 0 1?
or
2. 0x01 is a numerical number in hexadecimal base (leading 0x means hex base)?

For Option-1 of above, excute the following code at Master side:
bt.print("0x01");

At the Slave side, read the string and show on Serial Monitor to see exactly 0x01.

For option-2 of above, execute the following code at Master side:
bt.write(0x01);

Remember that 0x01 is a non-printable character. At the Slave side you collect it and send it to Serial Monitor to see nothing.

in my case, want to say 2
( hexadecimal base, Asynchronous Serial Communication)

and, but they '0x55' seemed 'U' at the slave side.

and, I wonder what their hexadecimal characters going master to slave would look like in 'Logic Analyzer'.

i'd like to turn on the LED slave side through 'serial read'

Tell me clearly, what message you want to send from Master to Slave to turn on L (built-in LED) connected at DPin-13.

Again: you are sending 0x55 to Slave and not '0x55'. 0x55 is the ASCII code of charcater U, which you can see in the following Table of Fig-1. I have no idea about the meaning of '0x55'.


Figure-1:

ascii table

It means 0x55 in the table above.
and 'U' means just a 'symbol'

Even if it's not hexadecimal character, it will OK text send to serial monitor and turn on the slave's LED.

There are some conventions:
1. In English writing and C Programming, a pair of double quotes (the opening double quote and the closing double quote) is used to enclose a string (group of charcaters sitting together). For example:
(1) Use "double masks" in these days of COVID-19.
(2) Serial.print("Forum");

2. In English writing and C Programming, a pair of single quotes (the opening single quote and the closing quote quote) is used to enclose a single character. For example:
(1) Use capital 'E' and capital 'L' while writing the compound word "English Language".
(2) Serial.print('E');

3. In C Programming use leading 0x to express a hexadecimal number. For example:
0x55 for 85 decmal.

I don't know if I Understand. Should I send 85 instead of 0x55? In fact, now here no matter what text i send, LED does not turn on.