ST Americas mbed Team


Information on how to use the STM32 Nucleo board with mbed

Adding Connectivity U Blox Cell Module

Adding Connectivity: U-Blox Cellular Module

The U-Blox Shield is a 2.5G/GSM/GPRS module that will allow your device to connect to a Cellular network.

  • Connect a U-Blox Cellular shield board into your Nucleo board as shown in picture below.

Note: Since the Nucleo boards use D8/D2 as the default Arduino UART TX/RX instead of D1/D0, you must jumper the arduino pins to move D1/D0 to D8/D2, respectivly, as shown in the picture below.

  • Insert a SIM card with enough credits
  • Connect antennas
  • Have good reception (especially for GPS)

/media/uploads/joe_tijerina/nucleo_u-blox_shield_connections_3.png

  • Plug the STM32F401 Nucleo to your PC with a USB cable

The mbed page for the U-Blox Cellular Host Library is found here:

Import libraryC027_Support

support library for C027 helper functions for Buffer Pipes, Buffered Serial Port (rtos capable) and GPS parsing. It includes modem APIs for USSD, SMS and Sockets.

The API documentation for the library will show you all the library commands available for this module. The C027_SupportTest will demonstrate how to connect the Nucleo board + U-Blox Cellular shield board to a cellular network.

  • Go to C027_SupportTest and import this example program into your mbed compiler by clicking the “Import this program” button

/media/uploads/joe_tijerina/c027_supporttest_mbed_2.png

  • Click the “Import” button on the pop up window shown below

/media/uploads/joe_tijerina/c027_supporttest_import_program.png

  • Open the "main.cpp file"
  • Change line 50 to "MDMSerial mdm(D8,D2);" to reflect the pin changes.

/media/uploads/joe_tijerina/c027_supporttest_program_2.png

  • Compile and load the image onto the F401 Nucleo drive
  • Open a terminal window to display the status of your Cellular connection. For this example, set the terminal BAUD rate to 9600

Note

Additional information on how to set up a terminal window for console output can be found here: Creating Console Output

Once the BAUD rate is set, you may need to unplug then replug your Nucleo board and restart your terminal program with the correct BAUD rate settings. You can also reset your program by pushing the Black reset button on the Nucleo board.

/media/uploads/joe_tijerina/c027_supporttest_debug_terminal.png

You will receive a message on your terminal console on the status of the connection. If you receive the message TCP Socket Hello World your device is connected.


All wikipages