- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I am using the "CYBT-343026-01 WICED EZ-Serial FW Image V1.1.14" program on a “CYBT-343026-EVAL” board.
I am using as a reference the document “EZ-Serial WICED Firmware Platform User Guide for CYW2070x-based Modules.pdf”.
I have some questions about this set.
1.
I try to change the device name by the command “gap_set_device_name (SDN, ID=4/15)”.
I verify that the name is modified by the command “gap_get_device_name (GDN, ID=4/16)”:
so I am sure that the stored name is actually changed.
But when I try to connect my device, the name seen in the air is always the default name “EZ-Serial …”
Where is my mistake?
2.
During connection/unconnection I receive some events, 16/4 16/2 16/3, but these events are
not documented in the reference pdf.
What is the meaning of these events?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks GiGu
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
Many Thanks
Kostas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
1. Are you using a phone to connect the device? For some phone, it will remain the old name because the device has the same BD address. The name will update after you connect it.
2. Could you be more specific about the events? Please share the entire log.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
1. I'm using four different smartphones and one notebook. All see the default name “EZ-Serial …”.
2. Here are the binary log of the events:
connect:
(80)(05)(07)(02)(00)(00)(00)(00)(00)(27) evt_smp_pairing_requested: conn_handle=00, mode=00, bonding=00, keysize=00, pairprop=00
(80)(05)(07)(05)(00)(f8)(7e)(01)(00)(a1) evt_smp_passkey_display_requested: conn_handle=00, passkey=00017EF8
(80)(03)(07)(03)(00)(00)(00)(26) evt_smp_pairing_result: conn_handle=00, result=0000
(80)(02)(07)(04)(00)(00)(26) evt_smp_encryption_status: conn_handle=00, status=00
(80)(0a)(10)(04)(01)(00)(07)(20)(01)(10)(04)(01)(35)(02)(ac) unrecognized event type 80 16/4 len 10 // undocumented
(80)(09)(0e)(04)(01)(6a)(c4)(04)(b5)(a2)(58)(02)(00)(18) evt_bt_connected: conn_handle=01, address=58:A2:B5:04:C4:6A, type=02, bond=00
unconnect:
(80)(01)(10)(02)(01)(2d) unrecognized event type 80 16/2 len 1 // undocumented
(80)(01)(10)(03)(01)(2e) unrecognized event type 80 16/3 len 1 // undocumented
(80)(03)(0e)(07)(01)(00)(00)(32) evt_bt_disconnected: conn_handle=01, reason=0000
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
1. Did you check if the name will be correct after the connect?
2. About the undocumented event, I will check internally first.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Did you check if the name will be correct after the connect?
I did more test about this.
I turn on a virgin Android phone, it never sees my board in the past, and the Bluetooth name
it get is the default name, not the custom name.
I installed LightBlue on one iPhone.
- a- LightBlue does not see the app “WICED EZ-Serial” running on my board.
- b- If I download to the board the app “Hello sensor”, LightBlue sees it with the default name.
After a successful pairing, the name magically becomes correct. But if I shut down
LightBlue e start it again, the default name reappears.
The bad name is a problem.
Anyway, I’m considering to use “Hello sensor”, simpler but more customizable than “WICED EZ-Serial”,
as starting point.
I need only to do a pairing, transfer few data to and from a smartphone and shut down the connection.
Is “Hello sensor” the correct start point?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Per my test, you need to stop the advertising with /AX, and restart with /A. Then the name will be correct on the phone.
Please check it on your side?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ok, If I send /AX and then /A, after the start of EZ-Serial program, some problems about the name seems solved.
I need some explanation about /A and /AX.
If I send /A, after 1’30” I receive the event
@E,000E,ASC,S=00,R=00
so the module stops advertising, I think for a timeout. In this case I would get “R=02”.
“R=00” means “state changed by User command”, but I am sure I never send any command.
Anyway, I have a question about this timeout: is it possible to set or disable it?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In the /A command, you need to set the advertising duration time. If you don't configure it, the device will use the default value. I think it is 1'30". So you receive the event @E,000E,ASC,S=00,R=00.
If you want the device stay in advertising state, you can set the duration to 0 which means infinite.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks!
My goal now is to use the full version of the “/A” command to specify many parameters, but I find
some problems.
I first try to use gap_get_adv_parameters (GAP, ID=4/24) in binary mode to get the default parameters.
The command detail is
[c0][00][04][18][75],
the answer is
(c0)(0e)(04)(18)(00)(00)(02)(03)(07)(30)(00)(1e)(00)(00)(08)(3c)(00)(00)(21)
I am not able to interpret this answer correctly, because it is not aligned with the chapter
- 7.2.3.19 of the documentation: neither length nor content seem to correspond.
I found other misalignments between documentation and command/answer, for example in commands
4/15 and 4/16, but in those cases I found a workaround. In this case my fantasy is not enough.
Which is the correct way to interpret the answer
(c0)(0e)(04)(18)(00)(00)(02)(03)(07)(30)(00)(1e)(00)(00)(08)(3c)(00)(00)(21)
?
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please check for the latest version of the user guide: https://www.cypress.com/design-guides/ez-serial-wiced-firmware-platform-user-guide-cyw2070x-based-mo...
Some new parameter has been added to the command and response.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for the fast answer.
I download the new document.
I think this new document is near to the actual firmware behavior, but the header of the answer in the user manual is
gap_get_adv_parameters (GAP, ID=4/24)
RSP C0 15 04 18 None
The actual header I get is
(c0)(0e)(04)(18)
The actual length is 0x0e, the documentation length is 0x15!
Other problem: In the previous answer you wrote about a timeout. I think that I can read this timeout
value by the command GSP, ID=4/26. But if I send the command in binary version
[c0][00][04][1a][77]
I get this answer
(80)(02)(02)(02)(03)(02)(24)
This is the system error “Command group/method not valid or unrecognized”.
Question: how can I read the scan timeout value?
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The GSP command is fixed in the latest version of the EZ-Serial FW. But it is not official released yet. Could you contact your local FAE/Sales for a new EZ-Serial FW to test?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you want to get the advertising timeout, you need to use GAP command to check the duration parameter.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ok for using the GAP command, but the header of the answer I receive contains a data length equal to 0x0e,
(c0)(0e)(04)(18)(00)(00)(02)(03)(07)(30)(00)(1e)(00)(00)(08)(3c)(00)(00)(21)
but the length is 0x15 in the documentation.
I am not able to parse the answer.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I received the last beta version of the program and it is quite aligned with the documentation.
I can decode the GAP answer now.
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have tried to use Gap_set_device_name in Binary Mode utilising CYBT-343026-01 series modules and ez-serial firmware version EZ-Serial WICED Firmware V1.1.14 but it does not work.
Gap_set_device_name command response returns error parameter 0x020C . In Text mode works fine but in binary mode does not work.
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.
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 |
Does the Gap_set_device_name work in binary mode? If yes , please may you clarify ?
I am using ezapi.h and ezapi.cpp for the binary commands for the ezserial firmware.
I have created a thread in Cypress forum :
Set device name command has Bug in EZ-Serial WICED Firmware V1.1.1 . Help!!!
Set device name command has Bug in EZ-Serial WICED Firmware V1.1.1 . Help!!!
[1] EZ-Serial_WICED_Firmware_Platform_User_Guide_for_CYW2070x-based_Modules-v1.1.14 . pdf
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I had the same experience and I found the solution: you need to add a 1 byte parameter to command as first parameter.
Set this parameter to zero. You need to modify exapi.h and ezapi.c too..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks GiGu
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
Many Thanks
Kostas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello koTs_4636851
I am not a Cypress guy, so I can't access user document or other documentation to modify it.
I am a simple user.
Bye
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi GiGu
Sorry for the misunderstanding.
Thanks for the help.
Really appreciated
Kostas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I checked about the undocumented event, they are A2DP events which is for future usage in Version 1.1.14.
The function is removed in the new version. You can ignore these events.
We will release a new EZ-Serial FW later.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ok, I'll discard these events