cancel
Showing results for 
Search instead for 
Did you mean: 

"BLE_CableReplacement" doesnt work for me (P-Nucleo-WB55)

Javier1
Principal

Hello im trying to establish communication between two P-Nucleo_wb55 boards.

Once i flash the firmware with cubeIDE example

(\STM32Cube\Repository\STM32Cube_FW_WB_V1.12.1\Projects\P-NUCLEO-WB55.Nucleo\Applications\BLE\BLE_CableReplacement)

#define GATT_CLIENT                                                           0//1//chaning this for client/server roles

I open serial terminals on my PC (putty or realterm), COM ports are visible but they are unresponsive....

I have no idea of where to start debugging

0693W00000DmOyXQAV.png

we dont need to firmware by ourselves, lets talk
1 ACCEPTED SOLUTION

Accepted Solutions

Im back again to try this.

(after fixing the coprocessor bin issue)

from STM32Cube\Repository\STM32Cube_FW_WB_V1.12.1\Projects\P-NUCLEO-WB55.Nucleo\Applications\BLE\BLE_CableReplacement\readme.txt 

@par How to use it ? 
 
 
 
This application requires having the stm32wb5x_BLE_Stack_full_fw.bin binary flashed on the Wireless Coprocessor.
 
If it is not the case, you need to use STM32CubeProgrammer to load the appropriate binary.
 
All available binaries are located under /Projects/STM32_Copro_Wireless_Binaries directory.
 
Refer to UM2237 to learn how to use/install STM32CubeProgrammer.
 
Refer to /Projects/STM32_Copro_Wireless_Binaries/ReleaseNote.html for the detailed procedure to change the
 
Wireless Coprocessor binary.

  Done that

In order to make the program work, you must do the following:
 
 - Open your preferred toolchain 
 
 - Rebuild all files and load your image into target memory

Im using STM32CubeIDE v1.7.0 and succesfully builds and flashes

Two STM32WB55xx boards are used one acting as GATT client, the other as GATT server.
 
Both boards need to be compiled with different code by changing the #definitions in app_conf.h
 
#define GATT_CLIENT        0/1   /* 1 = Device is GATT Client, 0 = Device is GATT Server */
 
If device is GATT client, it is also central (defined in ble_conf.h) 
 
If device is GATT server, it is also peripheral (defined in ble_conf.h)

Done that and flashed two different images, one in each wb55

Open VT100 Terminals on Client and Server side. Connected to ST Link COM port @115200.

No idea of what VT100 terminal is, im trying to use putty and realTerm, is that ok? it wasnt

Once the code is downloaded on the two STM32WB55xx boards and executed,
 
the modules are initialized. 
 
The Peripheral device (Cable Replacement Server) starts advertising,
 
The Central device (Cable Replacement Client) scans and automatically connects to the Cable Replacement Server.
 
Once connected, the Cable Replacement Client (GATT Client) starts to search the Cable Replacement Services & Characteristics.
 
The above phase takes about 5 seconds, after that period Reception and Transmission parts will appear in the Client and Server VT100 Terminals.
 
On each VT100 Terminal windows you can type the text you want to send and receive the text sent by the connected device.
 
 
 
To summarise:
 
 *1* User write text on GATT Server VT100 Terminal
 
 *2* Server ----------- Notification packet ------>  Client
 
or
 
 *1* User write text on GATT Client VT100 Terminal
 
 *2* Client ----------- Wtite Command packet ------>  Server

 What it actually happens is this

I type ascii "u" and the stlink answers with a weird string (nothing happens in the other module)

0693W00000F9uNEQAZ.pngOk i realised VT100 is not just a name of a serial terminal programm, this is a whole different ancient uart protocol yeey (its defined in octal)

 

So more reverse engineering, im starting to believe this is not going to be a very usefull example

So if i send the character "t"

i would get replied "\e[32;23Ht" which kind of looks like

0693W00000F9xj3QAB.png https://vt100.net/docs/vt100-ug/chapter3.html

"e[" would be equivalent to "ESC[" (CSI)

the last H would be

Final character

   A character whose bit combination terminates an escape or control sequence.

 0693W00000F9y5EQAR.pngThe parameter string has two parameters and they get build inside this function

void PosCur(uint8_t iX, uint8_t iY)
{
  char szCtrl[30] = "\33[01;01H";
 
  szCtrl[3] = (int8_t) ((iY % 10) + '0');
  szCtrl[2] = (int8_t) ((iY / 10) + '0');
  szCtrl[6] = (int8_t) ((iX % 10) + '0');
  szCtrl[5] = (int8_t) ((iX / 10) + '0');
 
  UartTransmitStr(szCtrl);
}

Now i just need to find a working windows vt100 emulator

https://www.ttwin.com/

30days free trial this should do for now

we dont need to firmware by ourselves, lets talk

View solution in original post

13 REPLIES 13
Amel NASRI
ST Employee

Hi @Javier Muñoz​ ,

Did you followed steps & recommendations as provided in the readme file of the selected project?

As I see, you are interested in STM32WB product. May I suggest you to have a look to the dedicated eLearning content.

That should be similar to MOOC content, in all cases we are interested by your feedback.

-Amel

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

thanks @Amel NASRI​ , i have been trying to crack this for a month now.

>Did you followed steps & recommendations as provided in the readme file of the selected project?

i believe so yes.

I am digging trough the MOOC videotutorials stm has online but they are very outdated fw v1.7.0 (we are 1.12.1 now), architecture is different now and functions have different names, i couldnt make it work.

thaks for the eLearning link (i didnt saw this before) ill give it a go and tell you how it went

I believe my issue is i somehow corrupted the .bin of the coprocessor and i cant get it back to normal

https://community.st.com/s/question/0D53W000013qLmwSAE/cubeprogrammer-firmware-upgrade-error-firmware-not-authentic-pnucleowb55

we dont need to firmware by ourselves, lets talk

@Amel NASRI​ I followed the elearning video (WB Bluetooth mesh - 7 Lab 1: Creating Bluetooth Low Energy project STM32WBMMG-DK ) also outdated and meant for another development board but i am sure i followed with detail every step, still no results.

tested in my STM32WB55CGU6 USB dongle boards. (project attached as "dongle_beacon.zip)

I cant get a simple advertise of device out. Im checking with ST BLE profile android app

we dont need to firmware by ourselves, lets talk

Hi @Javier Muñoz​ ,

I add our expert @Remi QUINTIN​  in this discussion, in case he has any recommendation to make the example work properly.

-Amel

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

thanks @Amel NASRI​ @Remi QUINTIN​ , i got the elearning example (WB Bluetooth mesh - 7 Lab 1: Creating Bluetooth Low Energy project STM32WBMMG-DK )

to work (.zip files attached), this is a custom template example, i didnt tried with cablereplacement firmware example yet.

The problems i had were two:

  • all tutorials are Outdated, now(september2021) (and i had an old version of cubeProgrammer) you need to enable in cubeMX the IPCC interruptions and works out of the box, no boilerplate code needed.
we dont need to firmware by ourselves, lets talk
Remi QUINTIN
ST Employee

Very preliminary feedback.

Architecture in between v1.7 and v1.12.x did not change for the BLE stack.

Major differences in between the successive WB FW versions are new protocols supported by the WB through new specific FW stacks.

Your picture shows 2 Nucleo boards.

The elearning “WB Bluetooth mesh - 7 Lab 1: Creating Bluetooth Low Energy project STM32WBMMG-DK�? is based on a Discovery board (DK) and not Nucleo. Cable replacement project is a pure BLE project while this elearning is based on the mesh specifications which is only based on BLE advertisement packets.

In the end, I understand you think you corrupted the FW stack loaded on the M0+ core. You can reload it with CubeProgrammer. Please be sure to have the latest V1.2.0 FUS version loaded on your board before any stack upgrade.

When you are connected, have a look at the SFSA option byte which should be 0xCA for the BLE stack with the WB FW package V1.12.x version.

You can activate IPCC with CubeMX. Have a look at the attached picture.

Remi QUINTIN
ST Employee

With the picture!

@Remi QUINTIN​ thanks for your reply.

>Very preliminary feedback.

Maybe but this is a almost 2 weeks of work now feedback and its not the first time i sit down in fron of an STM product, i know the ecosystem.

>The elearning “WB Bluetooth mesh - 7 Lab 1: Creating Bluetooth Low Energy project STM32WBMMG-DK�? is based on a Discovery board (DK) and not Nucleo.

I know but the dedicated MOOC course was not working for me, thats why i kind of tweaked thatone.

The main learning material i found was the MOOC - STM32WB workshop

The code autogenerated by CubeMx and the Function naming were so wildy different that i just couldnt follow them (speciall mention to the scheduler now called sequencer)

And the IPCC option doesnt show in their cubeMx

>Cable replacement project is a pure BLE project while this elearning is based on the mesh specifications which is only based on BLE advertisement packets.

Exactly what i need, im just trying to do an equivalent to bluetooth's SPP profile in BLE.

>Please be sure to have the latest V1.2.0 FUS version loaded on your board before any stack upgrade.

Now i know that the FUS version provided with fw v1.12.1 is not fus 1.2.0.

>When you are connected, have a look at the SFSA option byte which should be 0xCA for the BLE stack with the WB FW package V1.12.x version.

This is what i was looking for! thanks

>You can activate IPCC with CubeMX. Have a look at the attached picture.

i understood that now, i didnt knew i had to activate it because in the MOOC there is no option in their cubemx.

we dont need to firmware by ourselves, lets talk

Where is this picture from?

Maybe i missed some learning material

we dont need to firmware by ourselves, lets talk