Serial Terminal over Bluetooth

Hello,

I’ve purchased a Arduino WiFi Rev2 to use it to build a sensor platform to monitor performance of a boat that I own while I’m away (battery voltage, Battery Temp, cooler temp, etc). I’ve been able to setup the device to work with wireless and and MQTT broker that I’m hosting so that I can get the data back to my devices for monitoring. That all works great. But where I’m falling down is trying to implement some type of Serial terminal with the onboard Bluetooth. I didn’t at first realize that the Rev2 only supported BLE and not full Bluetooth. Mostly I’m looking to be able to monitor the device while on the boat for configuration and set. I’ve Googled most of the afternoon for ever combination I can think of but not found anything yet. Does anyone know of a way and if so can you send me in the direction.

Thanks

I thought BLE does support serial... Do you have a BT serial app installed on some BL capable device like a tablet, PC, or phone?

Mostly I’m looking to be able to monitor the device while on the boat for configuration and set.

What does this mean? What exactly would you like to do?

If you configure the BLE code on the Arduino WiFi Rev2 to use the nrf Uart Service and the Tx an Rx characteristics that go with it, you can get most BLE terminal apps to communicate.

If you are using custom service and characteristics you will need to use something like nrfConnect or LightBlue to monitor the Arduino BLE output.

Alternatively, you can add an HC05 to the Arduino and use classic bluetooth.

Thanks. I’ll research that library in the morning.

So I'm still stuck it seems. After researching for quite some time I installed the HardwareBLESerial library and am testing out the SerialPassthrough sketch. This appears to be working as I can see the Arduino being advertised in several BLE tools (BlueFruitConnect, nRF Toolbox, LightBlue). I can also see a UART service being advertised. But I can't seem to connect to that service with any of the tools on IOS. I'm starting to wonder if this is an IOS issue. Of is there a different library I should try?

But I can't seem to connect to that service with any of the tools on IOS. I'm starting to wonder if this is an IOS issue

I have only used the HardwareBLESerial library and the SerialPassthrough sketch with Android and don't have an iphone.

The apple store shows several ble bluetooth serial terminals. I would try adafruits bluefruit connect, which has an android and ios version.

https://apps.apple.com/us/app/bluefruit-connect/id830125974

The android version of Bluefruit Connect works with HardwareBLESerial serial passthrough sketch running on a Nano 33 BLE.

Ok, I have Bluefruit Connect and when I open the app I can see the Arduino listed as Uart Capable. When I collect Connect I get a error message from the app saying "Error Discovering peripheral services" but the USB serial terminal does seem to indicate a connection attempt as the device connected print statement fires. So it's either the IOS device or there is something about the WIFI REV 2 that doesn't really work with HardwareBLESerial. I'm about to just break down and add a HC-05 or HC-10 to my project.

I'm not certain this will help, but I have seen it make a difference in uart service app I wrote for a Nano 33 BLE.

Modify the HardwareBLESerial.h library file line 102 as follows

//BLECharacteristic transmitCharacteristic = BLECharacteristic("6E400003-B5A3-F393-E0A9-E50E24DCCA9E", BLENotify, BLE_ATTRIBUTE_MAX_VALUE_LENGTH);

BLECharacteristic transmitCharacteristic = BLECharacteristic("6E400003-B5A3-F393-E0A9-E50E24DCCA9E", BLENotify|BLERead, BLE_ATTRIBUTE_MAX_VALUE_LENGTH);

I'm about to just break down and add a HC-05 or HC-10 to my project.

You can't use and HC05 with an iphone.

Thanks, I gave that a try and the outcome is the same. Thanks for the tip on the HC-05. Looks like if I want a different module it will be the HC-10. I'm honestly really disappointed in this particular Arduino. It seems maybe my initial idea of a standard UNO or mega and a couple of shields would have been a better idea.

Perhaps you want to take a look at an ESP32. You can use the Arduino IDE with it and it has wifi, bluetooth, and BLE. Using wifi and bluetooth at the same time can be done, and there are many tutorials available.

Thanks. I’ll take a look at it.

@cattledog I dug up a old Samsung S5 that according to the data sheet support Bluetooth 4.0 and BLE. I loaded Bluefruit connect and got the same error I got on both the IOS and Android devices so it must be in the way that the Wifi Rev2 implements that Bluetooth NINIA module. I've read several articles that suggest that this implementation is not the best. So I think at this point I'm going to try and find another BLE solution, probably the MH-10 and move on. The wireless part does seem to work correctly.

Yikes :frowning_face:

I would by my HM 10 from DSD Tech as their products are warranted and supported. They also supply HM10 apps for both ios and android. I would not by the cheapest one you can find on ebay or alibaba.

http://www.dsdtech-global.com/search/label/hm%2010

If you want to get deeper into the swamp with the UNO Rev2 BLE, you can try to write you own server code for a custom service and characteristics instead of using the library with the nordic uart implementation.

There are examples for you to follow in the ArduinoBLE.h library.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.