PROBLEMS TO START AT+BINREQ

⚠️
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.
10 posts / 0 new
Last post
marksabbath
Offline
Last seen:5 months 5 days ago
Joined:2020-09-10 15:27
PROBLEMS TO START AT+BINREQ

Hey everyone! We are having some issues here to build an APP using this device. We are currently using React Native and we actually are able to receive some responses from the device, like the ATI.

The problem becomes when we try to move to the binary mode (AT+BINREQ). We cannot find any example on how to start that mode and start sending data.

At the moment, to receive the correct message from the device, we're writing 'ATI' to the characteristic 914f8fb9-e8cd-411d-b7d1-14594de45425 and reading the version from the characteristic 3bb535aa-50b2-4fbe-aa09-6b06dc59a404.

This is working fine, but when we receive the OK after writing 'AT+BINREQ' we don't actually see any difference in the device.

The weird thing is that the device works just fine while using your demo app.

Is there any trick on how to start a binary commuincation with the device? Would it be enough to write 'AT+BINREQ' and right after receiving the "OK", start sending the data we want?

Device:
PM_Dialog
Offline
Last seen:13 hours 29 min ago
Staff
Joined:2018-02-08 11:03
Hi marksabbath,

Hi marksabbath,

Please take a look at the Codeless user guide and section 4. Binary Mode – link is provided below:

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

Is it a custom board, or it is any of out DKs?

You should hare same hardware setup as shown in Figure 9.

Thanks, PM_Dialog

marksabbath
Offline
Last seen:5 months 5 days ago
Joined:2020-09-10 15:27
Hey, thanks for your answer!

Hey, thanks for your answer!

We have third party hardware that is using the CodeLess.

As mentioned above, we are able to communicate via AT commands already by the characteristics 914f8fb9-e8cd-411d-b7d1-14594de45425 and 3bb535aa-50b2-4fbe-aa09-6b06dc59a404, where we have sent the command 'ATI' and received the device version name, which seems to be a proof that the communication works.

Still, when sending the AT+BINREQ, we receive only "OK" and nothing else happens. We send some commands to the CodeLess device and it does nothing.

Would it be required to send all those commands that are shown in the video referenced in that link you've sent in order to have the device properly set?

PM_Dialog
Offline
Last seen:13 hours 29 min ago
Staff
Joined:2018-02-08 11:03
Hi marksabbath,

Hi marksabbath,

>>>Still, when sending the AT+BINREQ, we receive only "OK" and nothing else happens. We send some commands to the CodeLess device and it does nothing.

Could you please describe the procedure you are following? Are you send data over UART? Please share more inputs on that. Additionally, what are the UART pins that you are using in your custom board?

Thanks, PM_Dialog

marksabbath
Offline
Last seen:5 months 5 days ago
Joined:2020-09-10 15:27
>Could you please describe

>Could you please describe the procedure you are following?
We connect to the BLE device via Bluetooth with an Android phone and our testing application in React or Flutter. We can say that it is properly connected since when we send the command 'ATI' through the characteristic 914f8fb9-e8cd-411d-b7d1-14594de45425, we read from the characteristic 3bb535aa-50b2-4fbe-aa09-6b06dc59a404 the value "CodeLess DA14531 v_6.380.10.4
OK"

>Are you send data over UART?
Do you mean sending commands via another characteristic? At the moment, we send the 'AT+BINREQ' to the characteristic 914f8fb9-e8cd-411d-b7d1-14594de45425 and right after receiving the "OK" response, we start sending binary data through that same characteristics. Should we send the binary data to another characteristic?

>Additionally, what are the UART pins that you are using in your custom board?

I have no idea. This is a project that an Engineer brought here, and he was able to send data using the demo app that you guys provided.

PM_Dialog
Offline
Last seen:13 hours 29 min ago
Staff
Joined:2018-02-08 11:03
Hi marksabbath,

Hi marksabbath,

Do you have a chance to use a BLE sniffer and share a log file, so that we can understand what is happening over the air?

Thanks, PM_Dialog

marksabbath
Offline
Last seen:5 months 5 days ago
Joined:2020-09-10 15:27
Sorry, unfortunately, we

Sorry, unfortunately, we couldn't find a sniffer (app) that really works. Do you have any suggestions?

Also, could you please describe what steps (AT commands) that we should send to the device in order to start a binary data flow?

At the moment, we're just connecting to the device and sending the AT+BINREQ. Would it have any sort of initialization process that we would need to do?

PM_Dialog
Offline
Last seen:13 hours 29 min ago
Staff
Joined:2018-02-08 11:03
Hi marksabbath,

Hi marksabbath,

You should have a BLE sniffer tool in order to take a capture over the air.

You should just send the AT+BINREQ command in order to set the device in binary mode. Are you able to execute that command successfully? Can you also to check if the AT command is executed successfully?

Thanks, PM_Dialog

marksabbath
Offline
Last seen:5 months 5 days ago
Joined:2020-09-10 15:27
Both commands are returning

这两个命令是返回“OK”。另外,正如我说的before, the ATI is returning the version of the device, like this: "CodeLess DA14531 v_6.380.10.4 ".

PM_Dialog
Offline
Last seen:13 hours 29 min ago
Staff
Joined:2018-02-08 11:03
Hi marksabbath,

Hi marksabbath,

用户指南中所描述的,只有在+ BINREQshould be sent in order to configure the CodeLess in binary mode. Do you have any of our DKs to replicate this? What are the UART pins that you are using?

I would recommend trying to use the SmartConsole application to configure it in binary mode.

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

Thanks, PM_Dialog