This example establishes a transparent link between the mbed serial port and the modem (LISA or SARA) on the C027. You can use it to use the standard u-blox tools such as m-center or any terminal program. These tools can then connect to the serial port and talk directly to the modem. Baudrate should be set to 115200 baud and is fixed. m-center can be downloaded from u-blox website following this link: http://www.u-blox.com/en/evaluation-tools-a-software/u-center/m-center.html
Dependencies: mbed
Install mbed Windows Drivers
Make sure you installed the drivers on your windows PC to get the virtual serial port. A installation guideline and the drivers can be found in the following wiki page. /handbook/Windows-serial-configuration
Revision 8:b561b2003e76, committed 2014-06-12
- Comitter:
- mazgch
- Date:
- Thu Jun 12 07:28:57 2014 +0000
- Parent:
- 7:5d0d13c54e97
- Commit message:
- update libraries (use api provided by the platform)
Changed in this revision
diff -r 5d0d13c54e97 -r b561b2003e76 C027.lib --- a/C027.lib Thu Dec 19 17:34:25 2013 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -http://mbed.org/teams/ublox/code/C027/#e30f90b5447e
diff -r 5d0d13c54e97 -r b561b2003e76 main.cpp --- a/main.cpp Thu Dec 19 17:34:25 2013 +0000 +++ b/main.cpp Thu Jun 12 07:28:57 2014 +0000 @@ -1,21 +1,36 @@ #include "mbed.h" -#include "C027.h" +#ifdef TARGET_UBLOX_C027 + #include "C027_api.h" +#else + #error "This example is targeted for the C027 platform" +#endif +/* This example is establishing a transparent link between + the mbed serial port and the serial communication interface + of the Modem(MDM). + + For a more advanced driver for the GPS or Modem(MDM) please + look at the follwing library and example: + C027_Support Library + http://mbed.org/teams/ublox/code/C027_Support/ + C027_Support Example + http://mbed.org/teams/ublox/code/C027_SupportTest/ +*/ int main() { - C027 c027; - c027.mdmPower(true); + // setting the power on pin low while powering the device will turn it on + DigitalOut pin(MDMPWRON, 0); + wait_ms(10); + c027_mdm_powerOn(false); // open the mdm serial port - Serial mdm(MDMTXD, MDMRXD); + Serial mdm(MDMTXD,MDMRXD); mdm.baud(MDMBAUD); - // use hardware flow control to make the connection more reliable - mdm.set_flow_control(SerialBase::RTSCTS, MDMRTS, MDMCTS); + mdm.set_flow_control(SerialBase::RTSCTS, MDMRTS,MDMCTS); // open the PC serial port and (use the same baudrate) Serial pc(USBTX, USBRX); pc.baud(MDMBAUD); - while (1) { // transfer data from pc to modem
diff -r 5d0d13c54e97 -r b561b2003e76 mbed.bld --- a/mbed.bld Thu Dec 19 17:34:25 2013 +0000 +++ b/mbed.bld Thu Jun 12 07:28:57 2014 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/mbed_official/code/mbed/builds/dc225afb6914 \ No newline at end of file +http://mbed.org/users/mbed_official/code/mbed/builds/024bf7f99721 \ No newline at end of file