Using CodeLess AT-Command firmware

⚠️
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.
6 posts / 0 new
Last post
kotaromatsukubo
Offline
Last seen: 10 months 4 weeks ago
Joined: 2019-08-31 05:13
Using CodeLess AT-Command firmware

Hi,

I'd like to know the details of CodeLess AT Command firmware on DA14585.

1) I understand that CodeLess supports Sleep Mode. But how can I keep Advertising during Sleep Mode?  I want to keep DA14585 in low consumption mode because our product is really power sensitive. But I need to keep the device advertising every time.

2) How to change BLE PHY Mode in CodeLess?

3) I can't find a command to change the device name. How can I change it from MCU without changing source code?

4) The connection between DA14585 with CodeLess & Smartphone/Tablet is secure?

 

Thank you.

Device: 
kotaromatsukubo
Offline
Last seen: 10 months 4 weeks ago
Joined: 2019-08-31 05:13
Hello, I'd like to ask you

Hello, I'd like to ask you one more thing.

DA14585 has no Flash but OTP. In that case, how the device keep Bonding Data or something without Flash? After hardware reset, they will be gone?

Also, I want to change & keep some setting like UART Baud Rate, but there is no command to save the change. So if I do reset the device, all of the settings will be gone and back to the default. How can I solve this matter with CodeLess software?

Thank you.

PM_Dialog
Offline
Last seen: 6 months 3 weeks ago
Staff
Joined: 2018-02-08 11:03
Hi kotaromatsukubo,

Hi kotaromatsukubo,

  1. You should use the AT+SLEEP in order to put the system in sleep mode. Please keep in mind that when the device is sleeping, all the peripheral domains, including the UART, are powered down. To do so, if you need to send AT commands over UART, you should also use UART HW Flow control in order to be woken by a high to low condition on <cts_pin> as defined by the AT+FLOWCONTROL command.
  2. Could you please clarify it?
  3. All BLE configuration (BD address, device name etc.), should be changed in the CodeLess source code. Specifically, the macro should be change for the device name is the USER_DEVICE_NAME in the user_config.h file. After that, you should re-build the project. Please also check out our BLE Advertising Tutorial (HTML).
  4. I would recommend first check the AT+SEC from the user guide - UM-B-140: DA14531-DA14585 CodeLess. The specific commands the security/pairing mode. 4 different modes are supported :
    1. LE secure connections pairing
    2. Legacy pairing with MITM protection
    3. Unauthenticated No MIMT protection (Just works)
    4. No security
  5. If you are not planning to use an external SPI Flash or EEPROM, the you might store your data in the uninit section of the Retention-RAM -  please see SW Example: DA14585/586 Detect the Source of the Reset . In our SDK example, all the bonding information is stored either to SPI Flash or EEPROM, Please check ble_app_security example of SDK6.

Thanks, PM_Dialog

kotaromatsukubo
Offline
Last seen: 10 months 4 weeks ago
Joined: 2019-08-31 05:13
Hi,

Hi,

Thank you for your kind support and navigation. Could you elaborate more about a few things in order to understand CodeLess firmware well?

 

1. Yes, I will use AT+SLEEP to set the device in low power. Then, can the device keep advertising during sleep mode? I mean, I'd like to continue all active advertising operations when entering sleep mode.

2. As for my question of BLE PHY Mode, I just want to know how the device switches to BLE 2M PHY or LE Coded PHY in CodeLess. Because I could not find any of command related to that.

3. Regarding the device name, I have a little concern at my use case. I need to put a lot of end products in the same place. So I have to pick them out which one is the one I want to connect from Smartphone. To pick it up correctly, I want to change the device name from external MCU using AT-Command at runtime. For example, I would put some serial number or unique ID to the device name. I understood that I can change it in the CodeLess source code, but I need to change the source code one by one at in that case. So It would be better using AT-Command to change it. Also, it would be great if it can be saved to Retention-RAM in order to keep it even if the device turned off or reset.  Any solution for that?

4. I'm not planning to use an external Flash or EEPROM, so I was just worried about disappearing the bonding information and like that. According to your explanation, I can save some important data in the Retention-RAM even though the device is turned off or reset. Is my understanding correct?

 

Thank you.

PM_Dialog
Offline
Last seen: 6 months 3 weeks ago
Staff
Joined: 2018-02-08 11:03
Hi kotaromatsukubo,

Hi kotaromatsukubo,

  1. Yes it is possible. The device will sleep between advertising or connection intervals.
  2. Therese isn’t such a command. The BLE 2M PHY is not supported. Regarding the LE Coded PHY let me ask internally.
  3. Probably you might add a custom command : http://lpccs-docs.dialog-semiconductor.com/UM-140-DA145x-CodeLess/customcommands.html .
  4. You can store data in the uninitialized area of the Retention-RAM, so you can keep them after the system resets – not after the power down.  

Thanks, PM_Dialog

PM_Dialog
Offline
Last seen: 6 months 3 weeks ago
Staff
Joined: 2018-02-08 11:03
Hi kotaromatsukubo,

Hi kotaromatsukubo,

Thanks for your question. We’ll take that question offline from the forum and support you directly.

Thanks, PM_Dialog