Skip to main content
grzegorz
Associate III
February 9, 2017
Solved

ERR_COMMAND_DISALLOWED after getBlueNRGVersion()

  • February 9, 2017
  • 1 reply
  • 887 views
Posted on February 09, 2017 at 19:42

When I run aci_hal_write_config_data() as a first command after BlueNRG-MS reset, I get ERR_CMD_SUCCESS. But when I call getBlueNRGVersion() first, then I get ERR_COMMAND_DISALLOWED from aci_hal_write_config_data(). What is the reason? How checking BlueNRG-MS version can affect any other command?

#command #version #aci #bluenrg-ms
This topic has been closed for replies.
Best answer by Antonio Vilei
Posted on February 10, 2017 at 10:28

Dear Niemirowski Grzegorz,

changing configuration data may affect the subsequent behavior of the chip and so aci_hal_write_config_data() can be called only if it is the first command after reset.

If you need to call getBlueNRGVersion() first, just reset the chip after you got the version, and then you'll be able to call aci_hal_write_config_data() without any issues.

Hope that helps.

1 reply

Antonio Vilei
Antonio VileiBest answer
ST Employee
February 10, 2017
Posted on February 10, 2017 at 10:28

Dear Niemirowski Grzegorz,

changing configuration data may affect the subsequent behavior of the chip and so aci_hal_write_config_data() can be called only if it is the first command after reset.

If you need to call getBlueNRGVersion() first, just reset the chip after you got the version, and then you'll be able to call aci_hal_write_config_data() without any issues.

Hope that helps.

Antonio Vilei
ST Employee
February 10, 2017
Posted on February 10, 2017 at 10:36

Checking the version does not affect other commands, but, as a sanity check, the BlueNRG/BlueNRG-MS firmware does not allow calling aci_hal_write_config_data() after you have issued any other commands. So you cannot call neither commands that affect subsequent behavior nor commands that don't (like the version check).

grzegorz
grzegorzAuthor
Associate III
February 10, 2017
Posted on February 10, 2017 at 11:50

Everything is now clear. Thanks!