How to use DSPS project with 2 wire UART

⚠️
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//www.xmece.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
9 posts / 0 new
Last post
Dvir12L123
Offline
Last seen:1 month 2 weeks ago
Joined:2020-04-18 12:13
How to use DSPS project with 2 wire UART

Hi Dialog,

I have been using the dsps_device project for my project that requires a communication between a module with UART communication and an android application (with BLE communication ofcurse).

The dsps_device project works perfectly but there is a one major problam, my module requires a 2 wire UART communication while the dsps_device project is built for 4 wire UART communication.

1) Is there any project like the dsps_device that requires only 2 wire for the UART?

2) If not, how difficult is it going to be to change the project so it will fit my requirements?

Thanks in advance,

Dvir

Device:
PM_Dialog
Offline
Last seen:6 hours 25 min ago
Staff
Joined:2018-02-08 11:03
Hi Dvir,

Hi Dvir,

Instead of using the DSPS, you can use the CodeLess reference application design.

//www.xmece.com/products/smartbond-codeless-commands

You could use the “Binary Mode” – please find more details in the user manual:

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

Binary mode is used for the purpose of data pumps wherein the Bluetooth CodeLess device transfers data without examining it contents, which is the prefered method for end to end raw data transfer. By default, the HW Flow control is disabled, so the RTS/CTS are not required.

You can do a quick test to check this : you can send the AT+FLOWCONTROL in the “CodeLess Host” application and you will see that the value (0 , 0 , 0) is returned which means that the flow control is disabled.

Thanks, PM_Dialog

Dvir12L123
Offline
Last seen:1 month 2 weeks ago
Joined:2020-04-18 12:13
嗨PM_Dialog,

嗨PM_Dialog,

Thank you for the fast response!

I tried to use the codeless_531_datapump wich has the binary mode but when I use the DSPS app and try to connect to the device an error pops up and says "The remote device doesn"t support the DSPS profile".

On the other hand when I download the sw_codeless_531_2.bin file to the DK with smartsnippets and try to connect with the DSPS app it works just fine.

All I did with the program was to change the default baudrate and undefine some AT commands that I didnt need for the project.

How can I fix it?

Thanks in advance,

Dvir

Dvir12L123
Offline
Last seen:1 month 2 weeks ago
Joined:2020-04-18 12:13
P.S. in the terminal I get

P.S. in the terminal I get +AWAKE

+CONNECTED

+AWAKE

+DISCONNECTED

PM_Dialog
Offline
Last seen:6 hours 25 min ago
Staff
Joined:2018-02-08 11:03
Hi Dvir,

Hi Dvir,

The DSPS mobile application is working with DSPS firmware. In case of CodeLess, please try to use the SmartConsole application.

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

Additionally, keep in mind that in case of the HW flow control is disabled, the device should operate in Active node.

Could you please indicate what is the issue? Did you follow the tutorial? And what are the modification ttah you have done?

Thanks, PM_Dialog

Dvir12L123
Offline
Last seen:1 month 2 weeks ago
Joined:2020-04-18 12:13
嗨PM_Dialog,

嗨PM_Dialog,

Sorry for explaining my self so poorly so I will try my best to explain my self clearly.

  • I did follow the tutorial
  • From my understanding the binaries for the codeless_531_datapump are located under ..\DA14585_DA14531_CODELESS\v_6.380.9.10\projects\target_apps\codeless\SUOTA\SUOTA_531\two\sw_codeless_531_2.bin

What I did:

1) Download the binaries found in ..\DA14585_DA14531_CODELESS\v_6.380.9.10\projects\target_apps\codeless\SUOTA\SUOTA_531\two\sw_codeless_531_2.bin to the DK using the smartsnippets tool.

2)连接到DK的IOS应用程序

3) The terminal shows that the DK entered binary mode

4) Send AT+BINREQACK to the terminal

5) Data can be sent and recieved via the dsps applicaion and it works perfectly

Now to modify the program:

6) Open thecodeless_585project with keil uvision and choosecodeless_531_datapump

7) Go touser_periph_setup.h和改变的baudrate_config4to5so it will be 115200 and not 57600

#define BAUDRATE_CONFIG 5

#define BAUDRATE_115K2 (BAUDRATE_CONFIG==5)

#define BAUDRATE_57K6 (BAUDRATE_CONFIG==4)

8) Then go to user_at_commands.h and undefined some of the AT commands:

#if defined(__DA14531__)
#define USE_AT_BDADDR
#define USE_AT_IO
#define USE_AT_GAPSTATUS
#define USE_AT_ADVDATA
#define USE_AT_ADVRESP
#define USE_AT_ADVSTOP
#define USE_AT_ADVSTART
#undefUSE_AT_CENTRAL
#define USE_AT_GAPSCAN
#define USE_AT_GAPCONNECT
#define USE_AT_SLEEP
#undefUSE_AT_PIN
#define USE_AT_FLOWCONTROL
#undefUSE_AT_CONPAR
#undefUSE_AT_BND
#define USE_AT_SEC

9) Compile the program and download the binary to the DK (just like I did with the binary I talked about earlier)

10) Connect to DSPS application with IOS device

And here is the problam:

11) Try to connect to the Codeless device and then a message pops up and says "The remote device doesn't support the DSPS profile."

About the SmartConsole application, For some reason I can not change the command mode to binary mode and this is why I am using the DSPS application wich works fine with the codeless_531_datapump pre-compiled binary.

Thank you for your time,

Dvir

PM_Dialog
Offline
Last seen:6 hours 25 min ago
Staff
Joined:2018-02-08 11:03
Hi Dvir,

Hi Dvir,

Unfortunately, I am not able to replicate it. Can you please make sure that you haven’t done any other modifications? If you don’t modify the project and use it as provide, are you able to reproduce it?

Regarding the SmartCosole application, please take a look at section 8.3.2. Binary Mode.

Thanks, PM_Dialog

Dvir12L123
Offline
Last seen:1 month 2 weeks ago
Joined:2020-04-18 12:13
Hi PM_Dialog

Hi PM_Dialog

I probably did change something that caused a problam.

I reinstalled the codeless project and modified it like I did before and it works perfectly with the DSPS app now.

Sorry for the trouble and thank you very much for everything!

Best regards,

Dvir

PM_Dialog
Offline
Last seen:6 hours 25 min ago
Staff
Joined:2018-02-08 11:03
Hi Dvir,

Hi Dvir,

Glad that you figured your issue out. If you have any other question, please create a new forum thicket.

Thanks, PM_Dialog