Can you give me some advice on the "HC-06 drops connetion" problem?

I am a student studying Arduino.

As part of this project, we are working on connecting a laptop with Bluetooth.

We used HC-06 and Arduino Uno Edition

When uploading a photo as an attachment, it seemed to be connected, but it was cut off immediately.

At first, I thought it was a Bluetooth module problem or a laptop problem, but I tried other things but it didn't change.

In case you've connected with your smartphone, you'll be connected again.

Please give me some advice.

https://ifh.cc/v-zYDD3

sketch

#include "SoftwareSerial.h"
#define HC06_RXD 2
#define HC06_TXD 3
SoftwareSerial bluetooth(HC06_RXD, HC06_TXD);

void setup() {
Serial.begin(9600);
bluetooth.begin(9600);
}

void loop() {
if (bluetooth.available()) {
Serial.write(bluetooth.read());
}
if (Serial.available()) {
bluetooth.write(Serial.read());
}
}

.png

Add Bluetooth to Your Arduino Project - Arduino+HC-06

Connection is made between Bluetooth and Laptop. It is no guarantee of transmission between Arduino and Laptop, which also needs a proper connection between Arduino and Bluetooth. Check wiring Rx>Tx and Tx>Rx.

rtek1000:
Add Bluetooth to Your Arduino Project - Arduino+HC-06

Thank you for the link.
But doing so does not solve it.

Nick_Pyner:
Connection is made between Bluetooth and Laptop. It is no guarantee of transmission between Arduino and Laptop, which also needs a proper connection between Arduino and Bluetooth. Check wiring Rx>Tx and Tx>Rx.

I've tried changing the pins, but it's stuck in the middle of uploading. It's still pairing.

You are probably suffering from dribbling technobabble. Pairing has nothing to do with Arduino. Pairing is something you do once. It is essentially just a matter of getting onto the laptop's dancecard so that future connections are painlessly made.

If you really have an uploading problem, that has nothing to do with Bluetooth, unless you have it wired to to pins 0,1 by mistake, which I imagine is unlikely.

You have not said if anything works. It might be a good idea to use simple text, like "Hello, Bastard", or even just "x", rather than carry the weight of a photo file.