- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I am trying to develop a BLE application utilizing CYBT-343026-01 series modules and ez-serial firmware version EZ-Serial WICED Firmware V1.1.14 .
Gap_set_device_name command does not work according [1] page 93 . I cannot set the device name in the cypress Ble module. In [1] page 93 (figure 1) you describe that it takes two input arguments . First input argument is the Device Type (0:BLE , 1: BT) and the second one is the string name (0-64 bytes)
Figure 1: Gap_set_device_name command[1] page 93
According [1] page 28 section 3.1.3 Changing Device Name and Appearance , Example 3 , Gap_set_device_name command response returns error parameter 0x020C [1] (EZ-Serial System Error Codes table 7-4 - page 160). Also it takes one input argument (Device name ) and not two input arguments according [1] page 93.
Error Code | 0x020C |
Error Description | Command parameter outside of acceptable range. |
Error | EZS_ERR_PROTOCOL_INVALID_PARAMETER_VALUE |
Table1 : Error table
Figure 2: Example Gap_set_device_name command [1] page28 .
The binary command
D0 16 04 0F 15 45 5A 2D 53 65 72 69 61 6C 20 25 4D 34 3A 25 4D 35 3A 25 4D 36 5C Or $D0 $16 $04 $0F $15 $45 $5A $2D $53 $65 $72 $69 $61 $6C $20 $25 $4D $34 $3A $25 $4D $35 $3A $25 $4D $36 $5C |
from example 3.1.3 figure 3 returns error code 0x020C and not 0x0000 as you say in example 3 figure2
D0 02 04 0F 0C 02 8C |
Please see the attached logic analyser diagram for the returned error code ( device_name_bug_MFT21_NVM_0XD0_example_3_1_3.logicdata). It is from saleae logic analyser [2].
I have done another 2 examples with the same result.
Example 1
I am sending the name
uint8_t deviceName[6] = { 0x05,'M','F','T','2','1' }; |
Utilizing the ezapi command
#define ezs_cmd_gap_set_device_name(name) \ ezs_cmd_va(EZS_IDX_CMD_GAP_SET_DEVICE_NAME, 0, name) |
Figure 3 : device Name stored in volatile memory (0xC0)
I am receiving error code 0x020C.
Please the attached logic analyser diagram for the returned error code ( device_name_bug_MFT21_VM_0XC0.logicdata). It is from saleae logic analyser [2].
Example 2
I am sending the name
uint8_t deviceName [4] = { 0x03,'M','F','T' }; |
Utilizing the ezapi command
#define ezs_fcmd_gap_set_device_name(name) \ ezs_cmd_va(EZS_IDX_CMD_GAP_SET_DEVICE_NAME, 1, name) |
Figure 4 : device Name stored in Non volatile memory (0xD0)
I am receiving error code 0x020C.
Please see the attached logic analyser diagram for the returned error code ( device_name_bug_MFT21_NVM_0XD0.logicdata). It is from saleae logic analyser [2].
The version of the firmware which I am using is:
EZ-Serial Version : E = 01010E06
BLE Stack : S = 05020016
Protocol Version : P = 0103
Your example 3 in [1] page 28 section 3.1.3 Changing Device Name and Appearance does not work. Maybe there is error in the documentation because the description of the command is different from the implementation example 3 . The command works in TEXT mode but it does not work in BINARY mode. May you provide a fix or clarify better the input parameters for the Set Device Name command? Please provide me a Fix A.S.A.P. because I have to provide release version of my code for the BLE application next week.
Attached Device name bug.zip file contains all the figures and logic analyser diagrams.
[1] EZ-Serial_WICED_Firmware_Platform_User_Guide_for_CYW2070x-based_Modules-v1.1.14 . pdf
[2] https://www.saleae.com/downloads/
Thanks
Kostas
Solved! Go to Solution.
- Tags:
- bug ezserial
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Anjana
After the bug fix in ezapi.h and ezapi.cpp the Gap_set_device_name command in Binary Mode works fine utilising CYBT-343026-01 series modules and ez-serial firmware version EZ-Serial WICED Firmware V1.1.14 .
Gap_set_device_name command response returns error parameter 0x0000 and the device name is written properly (ram or flash) in the BLE module.
You need to update also the user guide document [1]. The example that you have for the set device name command is wrong ( Possible the example is from previous version).
Please also describe in the document that you cannot change the device name on the fly while advertising. BLE specification 4.1 does not say that you cannot do that. This is specification from the ez-serial firmware version EZ-Serial WICED Firmware V1.1.14. You need to stop advertising , change the device name and then start advertising. Another way is to store the device name in flash with the command ezs_fcmd_gap_set_device_name and subsequently reset the module. Any function which it is not defined in the BLE specification 4.1 standard , it should be described in the user guide [1].
In [1] page 28 section 3.1.3 Changing Device Name and Appearance , Example 3 , please update the Gap_set_device_name example in order to be according command description in [1] page 93. The command description in [1] page 93 refers two input arguments which it is the correct description for the version EZ-Serial WICED Firmware V1.1.14.
Please change the Gap_set_device_name binary command example that you describe in [1] page 28 section 3.1.2 . Please see below
D0 16 04 0F 15 45 5A 2D 53 65 72 69 61 6C 20 25 4D 34 3A 25 4D 35 3A 25 4D 36 5C Or $D0 $16 $04 $0F $15 $45 $5A $2D $53 $65 $72 $69 $61 $6C $20 $25 $4D $34 $3A $25 $4D $35 $3A $25 $4D $36 $5C |
from example 3.1.3 figure 3 returns error code 0x020C and not 0x0000 as you say in example 3 figure2
D0 02 04 0F 0C 02 8C |
Here is the Fix also for the EzApi
Set Device name FIX
- Ezapi.h modifications
//-------------- Fix ------------------------------// /* #define ezs_cmd_gap_set_device_name( name) \ ezs_cmd_va(EZS_IDX_CMD_GAP_SET_DEVICE_NAME, 0,name) #define ezs_fcmd_gap_set_device_name(type,name) \ ezs_cmd_va(EZS_IDX_CMD_GAP_SET_DEVICE_NAME, 1,name) */ #define ezs_cmd_gap_set_device_name( type,name) \ ezs_cmd_va(EZS_IDX_CMD_GAP_SET_DEVICE_NAME, 0,type,name) #define ezs_fcmd_gap_set_device_name(type,name) \ ezs_cmd_va(EZS_IDX_CMD_GAP_SET_DEVICE_NAME, 1,type,name) //-------------------------------------------------// |
- Ezapi.cpp modifications
//---------------------- FIX ----------------------------------------------------------// //0x04,0x0F, 0x81, 0x01,T_STR, /* 71 | S 9, SDN (gap_set_device_name) */ 0x04,0x0F, 0x82, 0x02,T_U8,T_STR, /* 71 | S 9, SDN (gap_set_device_name) */ // Fix : Add device type ( T_U8) according Ezserial User guide page 93 |
[1] EZ-Serial_WICED_Firmware_Platform_User_Guide_for_CYW2070x-based_Modules-v1.1.14 . pdf
Thanks
Kostas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You have missed one parameter of the API "T", which is the device type.
Please try the following command: C0 07 04 0F 00 05 4D 46 54 32 31 C2
I can get the right response: C0 02 04 0F 00 00 6E
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi koTs_4636851 ,
As XinghaoZ_26 mentioned, you have to use parameter T
The GDN/SDN add one parameter “T” in wiced platform comparing Previous PSoC version. So the example does not working in binary mode.
We need add “T” in binary sequence.
To set “SDN$,N=EZ-Serial %M4:%M5:%M6,T=0”, the response binary is : “D0 17 04 0F 00 15 45 5A 2D 53 65 72 69 61 6C 20 25 4D 34 3A 25 4D 35 3A 25 4D 36 5D”
To set “SDN$,N=EZ-Serial %M4:%M5:%M6,T=1”, the response binary is : “D0 17 04 0F 01 15 45 5A 2D 53 65 72 69 61 6C 20 25 4D 34 3A 25 4D 35 3A 25 4D 36 5E”
ezs_cmd_va() - it is from PSoC version. 343026 Ez Serial doesn't support that command. Its a documentation error.
Sorry for the inconvenience caused.
Regards,
Anjana
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Anjana
After the bug fix in ezapi.h and ezapi.cpp the Gap_set_device_name command in Binary Mode works fine utilising CYBT-343026-01 series modules and ez-serial firmware version EZ-Serial WICED Firmware V1.1.14 .
Gap_set_device_name command response returns error parameter 0x0000 and the device name is written properly (ram or flash) in the BLE module.
You need to update also the user guide document [1]. The example that you have for the set device name command is wrong ( Possible the example is from previous version).
Please also describe in the document that you cannot change the device name on the fly while advertising. BLE specification 4.1 does not say that you cannot do that. This is specification from the ez-serial firmware version EZ-Serial WICED Firmware V1.1.14. You need to stop advertising , change the device name and then start advertising. Another way is to store the device name in flash with the command ezs_fcmd_gap_set_device_name and subsequently reset the module. Any function which it is not defined in the BLE specification 4.1 standard , it should be described in the user guide [1].
In [1] page 28 section 3.1.3 Changing Device Name and Appearance , Example 3 , please update the Gap_set_device_name example in order to be according command description in [1] page 93. The command description in [1] page 93 refers two input arguments which it is the correct description for the version EZ-Serial WICED Firmware V1.1.14.
Please change the Gap_set_device_name binary command example that you describe in [1] page 28 section 3.1.2 . Please see below
D0 16 04 0F 15 45 5A 2D 53 65 72 69 61 6C 20 25 4D 34 3A 25 4D 35 3A 25 4D 36 5C Or $D0 $16 $04 $0F $15 $45 $5A $2D $53 $65 $72 $69 $61 $6C $20 $25 $4D $34 $3A $25 $4D $35 $3A $25 $4D $36 $5C |
from example 3.1.3 figure 3 returns error code 0x020C and not 0x0000 as you say in example 3 figure2
D0 02 04 0F 0C 02 8C |
Here is the Fix also for the EzApi
Set Device name FIX
- Ezapi.h modifications
//-------------- Fix ------------------------------// /* #define ezs_cmd_gap_set_device_name( name) \ ezs_cmd_va(EZS_IDX_CMD_GAP_SET_DEVICE_NAME, 0,name) #define ezs_fcmd_gap_set_device_name(type,name) \ ezs_cmd_va(EZS_IDX_CMD_GAP_SET_DEVICE_NAME, 1,name) */ #define ezs_cmd_gap_set_device_name( type,name) \ ezs_cmd_va(EZS_IDX_CMD_GAP_SET_DEVICE_NAME, 0,type,name) #define ezs_fcmd_gap_set_device_name(type,name) \ ezs_cmd_va(EZS_IDX_CMD_GAP_SET_DEVICE_NAME, 1,type,name) //-------------------------------------------------// |
- Ezapi.cpp modifications
//---------------------- FIX ----------------------------------------------------------// //0x04,0x0F, 0x81, 0x01,T_STR, /* 71 | S 9, SDN (gap_set_device_name) */ 0x04,0x0F, 0x82, 0x02,T_U8,T_STR, /* 71 | S 9, SDN (gap_set_device_name) */ // Fix : Add device type ( T_U8) according Ezserial User guide page 93 |
[1] EZ-Serial_WICED_Firmware_Platform_User_Guide_for_CYW2070x-based_Modules-v1.1.14 . pdf
Thanks
Kostas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi koTs_4636851 ,
Thanks for understanding.
I will escalate internally to update the Ez-Serial user guide.
Regards,
Anjana