gemesa@home:~$

Introducing stm32-rf-scanner

2.4GHz RF scanner

stm32-rf-scanner contains the source code of an nRF24L01+ and Blue Pill (STM32F103C8T6) based RF scanner. The Blue Pill scans frequencies from 2.400GHz to 2.525GHz (1MHz resolution) with nRF24L01+ and plots the activity on each frequency through UART.

This is what the UART output looks like (explained below):

|------------------------------------------------------------------------------------------------------|-----|-----|
|Frequency layout [GHz]                                                                                |Ref. |Max. |
|2.4       2.41      2.42      2.43      2.44      2.45      2.46      2.47      2.48      2.49..2.52  |RPD  |RPD  |
||         |         |         |         |         |         |         |         |         |     |     |[pcs]|[pcs]|
|------------------------------------------------------------------------------------------------------|-----|-----|
|   :-.               ::  ::..%%@%@#%@@@%%%%#@@@                              .-: ::                   |  10 | 180 |
|.  ....                 .. . @@#%@@#%@@@%%%%#@@                              ::     .                 |  10 | 180 |
|   ....                ...  .%@#%%%%%%%####%##%                            ..  ..:.                   |  16 | 180 |
|                     ..  ...:##***###%@%%@@@%#@                            .:::                       |  11 | 180 |
| ....                ...:... %%%%@%%%%%#***%#%%                                                       |  16 | 180 |
|:.    .              : .:. ..-###%%@###%##%##=:                              ...:.  :                 |  11 | 180 |
|..  ..                .:....: %%%%%%%%%%%@@%%#                             ::...                      |  12 | 180 |
|.... ...               ..   ..@%%@@%%%@%%%%%%%                                 ..  ..                 |  18 | 180 |
|                     .  .::.  @%#%%%#########*                             .                          |  11 | 180 |
|..  ..                      ::%%%%@%%%%@%%@@@%                                  .:..:                 |  12 | 180 |
|..::::                ..    . @#**#%***##*#%##                             ..   .-:.                  |  10 | 180 |
| ... ..                 ...   @%%%%@%%@%%##%%*                              .. ...  .                 |  13 | 180 |
|   .. .                 ..   :*%*%%%%%@%%%%@@%                             ....... ..                 |  14 | 180 |
|..                    ....   .-:::--::------::              .+@@@*           .......                  |  57 | 180 |
|...                    .. ....::.:............             -#@@@#.         .       ..                 |  72 | 180 |
|  ..  .              ..  ..   ................             :*@@@#     ...  ..                         |  73 | 180 |
|                      ..  ....:...............             -+@@@#           ..                        |  73 | 180 |
|  ......             ...    ..................            .##@@%#          .....   ..                 |  74 | 180 |
|   ....                .......:...............             #@@%%=            ..    ..                 |  75 | 180 |
|. ...                 . ....  ::::::::::::::::             *#@@%*                                     |  38 | 180 |
|:....                ..     ..@#**##**%**+****                               ... ...                  |  14 | 180 |
|...   .                  ...  %**%%%%@%%##%#*#                              ..    ..                  |  16 | 180 |
|      .               ..  ....##*#%###*%%#%@##                                 .....:                 |  14 | 180 |

Unknown sig.       Unknown sig. Wi-Fi (WLAN 6)          Microwave oven     Unknown sig.

The axes:

        f[GHz]
    ------------->
    |
 t  |
[s] |
    |
    V

The time difference between each line is ~4s. The greyscale characters represent the signal strengths relative to each other. The signal classification has been added manually.

The code of this project has been implemented using

A detailed description can be found in docs/project_description.md.

A similar, Arduino libraries based design by cpixip can be found at forum.arduino.cc.

Deployment

Important: the project has been developed and tested on Windows only.

Quick deployment process:

  • Build the SW from command line with make and arm-none-eabi-gcc:
cd <path>\stm32-rf-scanner\src\Debug
make all

Note: the SW can be built from Eclipse also. .project is stored in src.

Results

Measurement results are stored in the meas folder:

data0wi-fi+_microwave_oven.log

|------------------------------------------------------------------------------------------------------------------------------|-----|-----|
|Frequency layout [GHz]                                                                                                        |Ref. |Max. |
|2.4       2.41      2.42      2.43      2.44      2.45      2.46      2.47      2.48      2.49      2.5       2.51      2.52  |RPD  |RPD  |
||         |         |         |         |         |         |         |         |         |         |         |         |     |[pcs]|[pcs]|
|------------------------------------------------------------------------------------------------------------------------------|-----|-----|
|   :-.               ::  ::..%%@%@#%@@@%%%%#@@@                              .-: ::                                           |  10 | 180 |
|.  ....                 .. . @@#%@@#%@@@%%%%#@@                              ::     .                                         |  10 | 180 |
|   ....                ...  .%@#%%%%%%%####%##%                            ..  ..:.                                           |  16 | 180 |
|                     ..  ...:##***###%@%%@@@%#@                            .:::                                               |  11 | 180 |
| ....                ...:... %%%%@%%%%%#***%#%%                                                                               |  16 | 180 |
|:.    .              : .:. ..-###%%@###%##%##=:                              ...:.  :                                         |  11 | 180 |
|..  ..                .:....: %%%%%%%%%%%@@%%#                             ::...                                              |  12 | 180 |
|.... ...               ..   ..@%%@@%%%@%%%%%%%                                 ..  ..                                         |  18 | 180 |
|                     .  .::.  @%#%%%#########*                             .                                                  |  11 | 180 |
|..  ..                      ::%%%%@%%%%@%%@@@%                                  .:..:                                         |  12 | 180 |
|..::::                ..    . @#**#%***##*#%##                             ..   .-:.                                          |  10 | 180 |
| ... ..                 ...   @%%%%@%%@%%##%%*                              .. ...  .                                         |  13 | 180 |
|   .. .                 ..   :*%*%%%%%@%%%%@@%                             ....... ..                                         |  14 | 180 |
|..                    ....   .-:::--::------::              .+@@@*           .......                                          |  57 | 180 |
|...                    .. ....::.:............             -#@@@#.         .       ..                                         |  72 | 180 |
|  ..  .              ..  ..   ................             :*@@@#     ...  ..                                                 |  73 | 180 |
|                      ..  ....:...............             -+@@@#           ..                                                |  73 | 180 |
|  ......             ...    ..................            .##@@%#          .....   ..                                         |  74 | 180 |
|   ....                .......:...............             #@@%%=            ..    ..                                         |  75 | 180 |
|. ...                 . ....  ::::::::::::::::             *#@@%*                                                             |  38 | 180 |
|:....                ..     ..@#**##**%**+****                               ... ...                                          |  14 | 180 |
|...   .                  ...  %**%%%%@%%##%#*#                              ..    ..                                          |  16 | 180 |
|      .               ..  ....##*#%###*%%#%@##                                 .....:                                         |  14 | 180 |
                                Wi-Fi (WLAN 6)          Microwave oven

Info: Wi-Fi idle state (no down- and uploading). A microwave oven is being used on a different floor.

data1_wi-fi_upload.log

|------------------------------------------------------------------------------------------------------------------------------|-----|-----|
|Frequency layout [GHz]                                                                                                        |Ref. |Max. |
|2.4       2.41      2.42      2.43      2.44      2.45      2.46      2.47      2.48      2.49      2.5       2.51      2.52  |RPD  |RPD  |
||         |         |         |         |         |         |         |         |         |         |         |         |     |[pcs]|[pcs]|
|------------------------------------------------------------------------------------------------------------------------------|-----|-----|
|. ..          ....:.--:-::::=+**ssss%%%%@ss%%++=:-----::.....                 ....                                            |  65 | 250 |
|..... .      ......:::--:::-+=+%%s*s%@*s%*%s%+++==---=-:..                 ...    ...                                         |  58 | 250 |
|......        ...:-=:+--==--s+*@%*sss*s%%s*%s+==:-===-::...                . ..                                               |  56 | 250 |
|     ..        ..:--=--==--=++*%ss**ss*@**s+*==-:::-::......                .. ......                                         |  64 | 250 |
| .  .         ...:-===+-=:--+=*s**ss%%%%*%@@%**==+=-===::..                 .........                                         |  55 | 250 |
|.. .. .        ..:::--.:----+==s***ss%*s*s@s*+=--:--::-:...                .  ......                                          |  67 | 250 |
|.......       ...::::---:--=++*@*%s%%s***++++==-::::::.....                .. ......                                          |  63 | 250 |
|..  ..        ...:-.::=====+sss%%%%%*s%%@s**s*+-:---.::....                   .. ....                                         |  52 | 250 |
|... ...      ....:-+-+-+-=-=**s@%%%s%@s+%@@ss++---===--::..                  ....                                             |  56 | 250 |
|.   ...      ...::--====---:++*s%sss*ss%*s%@%%*+===+====...                 ... .....                                         |  63 | 250 |
| ..   ..      ...::-=====:--+*s%%%@%ss**s%@%%++----=--::...                    ....                                           |  59 | 250 |
| ...          ..:::---=----=*+*s+sss%s*%s*s@*===-----=::...                 ..  ..  .                                         |  67 | 250 |
|   ...        .....::::--===++*+*****s*****@s+=-::-:-:::...                  .....                                            |  83 | 250 |
|   ..        ....--=++++++-+s*+@%ss***s%%s@%s*++==-==--:..                  ...  ..                                           |  63 | 250 |
|  .. ..       ...::--==+=+++**+s@%sss%sssss*s+*==--===-:...                .  .... ..                                         |  79 | 250 |
|    ...       ...:-=-=+====+*+s%s%%%%*%@s%sss*======--:-...                  .....  .                                         |  60 | 250 |
| ..  ..       ...::==-----=+**+s%@ss******s**=+==-=--:-:..                 ... ..   .                                         |  70 | 250 |
|      .       ....----=++===+*s%s@@s%%%sssss%+++==-===--...                .      ..                                          |  78 | 250 |
| .....         .:::-=+===--:==+s@%%s**sss%%%s+==------:-:..                 .....  ..                                         |  72 | 250 |
|.   ...      ....::::::::---+s%*%s@%ss%s%%ss*-=:-:--:==:....               .. ..  ...                                         |  49 | 250 |
|... ..         ...:---=:--==*+=**%ss**@s****+-+==---:.:...                 .. ... ...                                         |  60 | 250 |
| .... .       ...:-+===+=+-=*+*s**ss*ss%@%%%s+++==----::..                        ...                                         |  70 | 250 |
|.              ...:===-==-==*=*s@ssssss%s%ss%**+==+=---:..      .          . ....                                             |  71 | 250 |
                                Wi-Fi (WLAN 6)

Info: uploading data through Wi-Fi.

data2_bluetooth_0.log

|------------------------------------------------------------------------------------------------------------------------------|-----|-----|
|Frequency layout [GHz]                                                                                                        |Ref. |Max. |
|2.4       2.41      2.42      2.43      2.44      2.45      2.46      2.47      2.48      2.49      2.5       2.51      2.52  |RPD  |RPD  |
||         |         |         |         |         |         |         |         |         |         |         |         |     |[pcs]|[pcs]|
|------------------------------------------------------------------------------------------------------------------------------|-----|-----|
|     ..              . .. ...+=-**+*####*@##%#:-.                           ..  .:..                                          |  17 | 180 |
|..--.                     .-:*%+#%@#%@@*++%+-=:-                      ..    :.     ..                                         |  10 | 180 |
| .....               .....:=%%*#%@%###*++++*%+=::                   ...... ..........                                         |  19 | 180 |
|...   .                .. :-+*##%**++*%*#%##@#-::                        . ..   ..                                            |  24 | 180 |
|     ..                 ...-+=**++#*=**##*#**@=-                      .... .. .... ..                                         |  21 | 180 |
|.                      ...=+=%#@%##**+#*++--+#.:.                   .  .     ..    ..                                         |  20 | 180 |
|   .. .              ...  --.+*+#+=*+*=**#@+*+-=.                        .  ..    ...                                         |  24 | 180 |
|.  ....               .. ..=-+%##@####%*#@%*#:-::                                ....                                         |  20 | 180 |
|    ..                 ...:-:-***=*%=****+%%@-==.                           .. ..   .                                         |  24 | 180 |
|  ...                .  .. :-=*#*#*#@@@%%##**=::.                              .... .                                         |  25 | 180 |
|..    .              ...  =--+@%+*+*%%*++*%@#-*:.                             .. ..                                           |  17 | 180 |
|   ....              . . .:-%#%@###***%%%#*+*:.:. . .. ..  .    .   .           ..  .                                         |  19 | 180 |
|...  .. . ..  : ..  . .. ...:.%#*@@####*##*@#-:...  . .   .            ..  .  ..                                              |  19 | 180 |
|  :..:: . .  .. .  .. :.::=.=.*#****%@%%@##@@:-.:  .. .  .                  ..:.                                              |  18 | 180 |
|  .:...  .  . ..  . ..... :-.:@*####****++++#.... . .  ..                :.  ....  ..                                         |  21 | 180 |
|   . ..  .  ...   . .. ...:..:+##%@@@**+*%#*#:.:.   . ...   .         .  .. .........                                         |  26 | 180 |
|   .. :  .. .  .  . .. .:.-:-%#%%@@%@##*+%*##+.:. . ..  .                 .    ..  ..                                         |  22 | 180 |
|.. .  :  . .  .  .. .. .  ..:+#@@@%@##%%##+*+.::... .. .   .             .  . ..:                                             |  22 | 180 |
|. .....    .  .  .  .  . .::=******#*#@#%%%%%=-:..  . ..  .         .       .  .    .                                         |  27 | 180 |
|... ..  . .  .       ..  :.::+*++=**+=++++#@*-::-... ..     .  .  ..       .. .. ...                                          |  23 | 180 |
|    ..  . .  .  .  .  :. . ..=#*+*%#*%#@@%%%%=.... .  .. .                 ....  ...                                          |  26 | 180 |
| .. . ..    ::  . .   ..:..:::%*+%%*@*=+=**%*-..: ..  . ..                 .:-.  ...                                          |  18 | 180 |
| ...  . .. .     .  :..:. . --*#@%#****#%%**+:.. .  .  .  .              .  ...:  ..                                          |  28 | 180 |
                                Wi-Fi (WLAN 6)
								
Info: phone is trying to connect to turned off JBL (Bluetooth).

data3_bluetooth_1.log

|------------------------------------------------------------------------------------------------------------------------------|-----|-----|
|Frequency layout [GHz]                                                                                                        |Ref. |Max. |
|2.4       2.41      2.42      2.43      2.44      2.45      2.46      2.47      2.48      2.49      2.5       2.51      2.52  |RPD  |RPD  |
||         |         |         |         |         |         |         |         |         |         |         |         |     |[pcs]|[pcs]|
|------------------------------------------------------------------------------------------------------------------------------|-----|-----|
|. :::----:::-:....   ..   :++#*%%%*#**+*###*@@..-      ....:-:-:+++-=-=+**=#+::..::.                                          |  16 | 180 |
|:. .-=+=-::.:.... .    .....-*#*%##@%#####@#%%+:.         ..:::.--:..... ..::::::..                                           |  16 | 180 |
|..:. .:--==-==---..  .. ..:=@%@@#++##*+#*%*%+*+-.        .:-=++*++--=---::::::..:. ..                                         |  18 | 180 |
|..-=-:=*=--:-:..  .  .   .-=@@%%#++*##%*%*%@*%#:.       ..::---::--::::==-==-..... ..                                         |  18 | 180 |
|....:-----=-:::..        :--%+*++*+*+++*#+**+%@::      ..........:.::-:-::::::::... .                                         |  26 | 180 |
|...::-:-:-:=-:...      .. .=*##%*#*#@*#@+%=+#%#::           .::-:-----::...-:=-=....                                          |  20 | 180 |
|  ..:::-::-:::::..   ......-+*+#+=+=+%%+@*+%###:.     . .....-----::..:.....--::....                                          |  20 | 180 |
|.....::::----::..     . .::.*##+***%#**##%*#%@%-:      ....:--:::.:::::::.::---:..                                            |  21 | 180 |
| ...::::::::.....    .. .-+=%%%%%#%##%#%#@%*##+=-       ..::::::.......:..:::......                                           |  29 | 180 |
|..................    ....::*#*####@##%%%%@%#%@:-      ...........................                                            |  38 | 180 |
|....:::::..::::-:::  .   ::.**%%%@%*%#%%%%#@%%#..       ..   .......::::-::.:.... ..                                          |  24 | 180 |
|......-=++**+*+::..  ... ...%@%#@%#*#@@###*+%@%:.            . ..:=----:-:-:.:.:....                                          |  20 | 180 |
|.. .:-::--=----:..    ......#**##*#@*%@**%%+*#*..            ..::.:--=-==-:....... ..                                         |  25 | 180 |
| ...---::.:......    ..  ...%#*%**#+*#%##@@@%%@.              .:::...:::..::-::::.  .                                         |  22 | 180 |
|..::----::--=-::::.  . ...:.#++#*#+=#*+=+*#@*%#..            ...:.:::-:-----:=-....                                           |  21 | 180 |
| ...::::....:::....    ...-:%*##*%%#**%#**%#@@*::               ...::-..............                                          |  28 | 180 |
|..:......:.:.. ...    .. ...++**#@#**=#*#%###*#::          .   ....:::::..:....:.....                                         |  29 | 180 |
| ...::.---::::....      ....+++*#*#%%*#@@%%**##:.            ..........:.......:...                                           |  30 | 180 |
| .....::--::+-:::::  ..   --%#**++-#*+*#%#%%*#@-:             ..:-++=-:::..::---::.                                           |  24 | 180 |
|.  ..:-.::.:-:::.:.    .....@%@%@%%@@*######+== .      ...:::.:::.. ..:.:::.:..    ..                                         |  21 | 180 |
|   ...:::==:===-::.     ..:.#+*%**##@%%#@@@#*%%:.       .:....::..:::.::::::--....                                            |  17 | 180 |
|...................   ......*++**++#*#***@***#%:..        ....:..::.............  ..                                          |  32 | 180 |
|  .::...:::::-:.....  .. .==#@%@##%##=+*++#****--      ......:...................  ..                                         |  35 | 180 |
                                Wi-Fi (WLAN 6)
								
Info: phone is playing music via JBL (Bluetooth).