2021-09-07 03:21 AM
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
Solved! Go to Solution.
2021-09-09 07:42 AM
This slide is extracted from an internal presentation "STM32WB How To Use a Custom Application with CubeMX" which should be released externally soon I hope.
2021-09-09 07:49 AM
>Now i know that the FUS version provided with fw v1.12.1 is not fus 1.2.0.
The version under WB FW v1.12.0 is already FUS V1.2.0
This is what I have on my board.
Yes the scheduler is now named sequencer with slightly modified APIs.
The goal of the Cable Replacement project is indeed to emulate the SPP profile but in a proprietary manner.
There is may be a need to configure the role for each device: Central or Peripheral.
The 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)
2021-09-21 09:23 AM
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)
Ok 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
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.
The 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
30days free trial this should do for now
2021-09-22 01:34 AM
Now im able to undestand what are the com ports echoing back to me
Next step, guetting rid of all that VT100 layer,
i want a plain happy uart bridge whih is what the example should have been in the first place