Integrate UART with BLE

⚠️
Hi there.. thanks for coming to the forums. Exciting news! we’re now in the process of moving to our new forum platform that will offer better functionality and is contained within the main Dialog website. All posts and accounts have been migrated. We’re now accepting traffic on the new forum only - please POST any new threads at https://www.dialog-semiconductor.com/support . We’ll be fixing bugs / optimising the searching and tagging over the coming days.
4 posts / 0 new
Last post
_asmaitha
Offline
Last seen: 3 months 1 week ago
Joined: 2020-11-24 05:03
Integrate UART with BLE

Hi,

My requirerment are as follows:

1 . Integrate an existing BLE code with UART functionality, so that i can tranfer and receive data coming from an external MCU (HOST)over UART. 

2. Once that is established, I would like to tranmit around 3000 bytes of data whenever the data is read at the MCU(HOST) end,.

So far i have been able to send and receive only a single byte of data via over UART without adding any of the BLE code.

Could you please suggest an efficient way to do it?

I have looked at the DSPS code but wasn't able to figure out how to handle incoming bulk data without disrupting the BLE flow. 

PM_Dialog
Offline
Last seen: 2 months 2 weeks ago
Staff
Joined: 2018-02-08 11:03
Hi _asmaitha,

Hi _asmaitha,

Thanks for your question online. I think the DSPS and the CodeLess are the best examples for your application.

https://www.dialog-semiconductor.com/products/dialog-serial-port-service-dsps

https://www.dialog-semiconductor.com/products/smartbond-codeless-commands

Can you please clarify what is the problem with the DSPS? Please keep in mind that the DSPS is using extended sleep mode, so you will need to have HW Flow control. Which pins are you using for the UART (UTX, URX, RTS, CTS) ?

In case of the codeless, you could use the Binary Mode :

http://lpccs-docs.dialog-semiconductor.com/UM-140-DA145x-CodeLess/binarymode.html

Thanks, PM_Dialog

dliebermankt8e
Offline
Last seen: 1 year 3 months ago
Joined: 2020-12-26 00:42
I am attempting to interface

I am attempting to interface a C# Xamarin Android App with the DA14531 Codeless AT firmware in UART mode.  I am able to run the SmartConsole app and connect to the DA14531.  However, I am unable to open a Bluetooth socket to the DA14531.  I am getting the following error: "socket connect returns Java.IO.IOException: 'read failed, socket might closed or timeout, read ret: -1'".  I am making the following call:

_socket = device.CreateRfcommSocketToServiceRecord(UUID.FromString("00001101-0000-1000-8000-00805f9b34fb"));
await _socket.ConnectAsync();

I am able to open a socket to other bluetooth devices successfully with the above code. You have suggested in other posts that the DSPS application would be helpful.  However, that code is confusing and the UUIDs shown in that app do not seem to work.  Do you have any other examples of connecting to the DA14531 in UART mode?  What is the correct UUID to access the DA14531 Codeless serial connection?

Thank you in advance for your assistance.

PM_Dialog
Offline
Last seen: 2 months 2 weeks ago
Staff
Joined: 2018-02-08 11:03
Hi dliebermankt8e,

Hi dliebermankt8e,

Thanks for your comment.

>>Do you have any other examples of connecting to the DA14531 in UART mode?

I would recommend using the either the AT CodeLess or the DSPS examples

>>What is the correct UUID to access the DA14531 Codeless serial connection?

Could you please clarify this statement?

Additionally, can you please explain what you are trying to implement? Is it a custom mobile application?

If yes, the SmartConsole source code is available: Dialog SmartConsole Source code -Android

If you have any follow-up question, it would be great if you could raise a new forum ticket.

Thanks, PM_Dialog