Bluetooth serial

Hello,

Can someone guide me in this? I want to be able to wirelessly connect to ino's serial so as to easily monitor behavior overtime by leaving a powered phone/tablet running a terminal app by my ino system. The idea is a converter from ino's usb cable back to serial and from serial to Bluetooth. There are ready Android Bluetooth terminal apps which should complete the thing.

Thanks for your help

just connect a HC-05 type module to the Rx and TX pin of the UNO. the rest of the setup is on your terminal to read in the serial data.

hope that helps....

Rx & tx on ino are connected to the serial 2 usb thing. ino tx can do multipoint but its rx would have a "short" of 2 transmitters

Which of the "inos" are we talking about? Classic Bluetooth or BLE?

If I get the idea, you want to see on the phone what you write on the PC that is USB connected to the ino. Is this correct?

I was going to pass up this as illiterate technobabble but I have just realised that an "ino" might be a Uno, particularly as I don't think OP mentions the type of Arduino being used. In this event, and if your surmise is correct, communication may be done by PC to Uno via USB cable and UNO to phone via Bluetooth on software serial. I believe any vacant pins on a UNO can be used for software serial.
In short, PC cannot send data if the hardware serial port is shared with another device, but it can observe two-way traffic on that port.

I would suggest you simplify the project by moving to a ESP32 microcontroller which has onboard Bluetooth Classic and BLE (note that the ESP32S3, ESP32C6 etc only support BLE)
it is supported by the Arduino IDE

@guy_c

Try the following setup (Fig-1); where, software UART port (SUART) has been used to communicate with BT:


Figure-1:

Thanks.

Than ill have to add to all my Serial.print, serial.ParseInt etc and another sserial...

I am looking for a solution where the code stays as is and the hw

Most of my mega ios are used, 7609 code lines.. this is no simple 'move' given that the feature I'm looking for fir can be implemented by attaching a laptop to an ino when needed

if you are using Megas which have four hardware serial ports is there a requirement for Software Serial?

First of all, to make things easier and avoid using just "ino" as reference, what Arduino board and release we're talking about?

Then, if you currently use "Serial.print()" for the debug info you plan to be able to get on the remote phone, just connect an HC-05 to the specific UART's TX and RX pins and you're done: everything coming out from the serial will be sent over BT.

The only thing you must do is to correctly configure the HC-05 to act as a Slave (your phone is Master) and set its name and PIN.

Important: Disconnect RX/TX pins from HC-05 when uploading code to avoid conflicts

Thank you. The code need to read too. Not only to write

Sorry i did not nention which card, tginking the solution, if any,would apply to any board.

I use plain old Mega boards

I want to be able to talk to my sw via usb and via Bluetooth (not simultaneously!) w/o any changes on the sw or the hw. I am ok with adding a piece of powered logic at the usb end of the arduino loading cable

Connecting an HC-05 to your current serial pins you can do both (because you use both TX and RX).

If you're using the first UART (e.g. the one connected to pins 0 and 1), you can do that without any changes. When using USB/Serial don't connect the HC-05, if you use Bluetooth connect the HC-05 and not the USB.

In view of your apparent intention to connect Bluetooth to your existing project, this is a nonsense statement. IF your Arduino is a Mega AND you have a hardware serial port available, you may simply connect Bluetooth to it AND THEN provide it with the necessary software.

Yes, i am using both for loading, debugging snd as the usb which connect to serial on pins 0 and 1

Can you please draw a simple connection schematic of your suggestion?

So you just need to remove the wires from the BT to free the pins 0 and 1 and being able to upload code and debug using USB. As soon as you're done, disconnect the USB and reconnect the BT module.

Nothing special, just connect pins 0 and 1 to BT RX and TX. Obviously as a cross connection, Arduino pin 0(RX) to HC-05 TX pin and Arduino pin 1(TX) to BT RX.

You can google around to find dozens of schematics, comments and suggestions when connecting HC-05 to physical UART pins 0/1.

For example, this (ignore the servo):

What do you mean by disconnect usb? The usb is soldered to pins 0 & 1, in particular, usb tx is wired -via 1k- to the 2560 rxd0 so the idea is that bt tx will reliably drive its data despite the 1k to a steady 'space' level?

Disconnect the USB cable. It's required to avoid conflicts with BT derial communications.