1 year, 3 months ago.
Using UbloxPPPCellularInterface with easy-connect
Trying to use the PPPcellular interface with easy connect and have enabled by uncommenting the entries: Note: we use UbloxAtCellularInterfaceExt here but the examples work with UbloxATCellularInterface, UbloxPPPCellularInterface or UbloxATCellularInterfaceN2xx (though noting that the N211 module supports only UDP and not TCP); simply uncomment/comment the correct options in the next few lines #include "UbloxATCellularInterfaceExt.h"
- include "UbloxPPPCellularInterface.h" #include "UbloxATCellularInterface.h" #include "UbloxATCellularInterfaceN2xx.h"
Parameters added to the call here simply to show how debug can be switched on For the N2xx interface, change xxx to MBED_CONF_UBLOX_CELL_N2XX_BAUD_RATE. UbloxATCellularInterfaceExt cellular(MDMTXD, MDMRXD, MBED_CONF_UBLOX_CELL_BAUD_RATE, false); UbloxPPPCellularInterface cellular; UbloxATCellularInterface cellular; UbloxATCellularInterfaceN2xx cellular;
However I am not able to compile (the orher interfaces compiles fine)
Compile [ 99.7%]: main.cpp [Error] easy-connect.h@45,1: 'UbloxPPPCellularInterface' does not name a type [Error] easy-connect.h@164,26: 'cellular' was not declared in this scope [ERROR] In file included from ./main.cpp:44:0: ./easy-connect/easy-connect.h:45:1: error: 'UbloxPPPCellularInterface' does not name a type UbloxPPPCellularInterface cellular; ^~~~~~~~~~~~~~~~~~~~~~~~ In file included from ./main.cpp:44:0: ./easy-connect/easy-connect.h: In function 'NetworkInterface* easy_connect(bool)': ./easy-connect/easy-connect.h:164:26: error: 'cellular' was not declared in this scope network_interface = &cellular; ^~~~~~~
Any suggestions ?
Question relating to:
1 year, 3 months ago.
It's difficult to say what's going wrong without knowing what your actually compiling.
What I've done below is to take the vanilla mbed-os-example-client, from scratch, and compile it with the fork of easy-connect that you are referring to above, just to show the steps to achieve a complete build. I've attached the files that I have edited, easy-connect.h and mbed_app.json, though note that I had to rename
mbed_app_json.h as this forum interface doesn't seem to allow
.json files to be uploaded.
Downloading the code:
>git clone https://github.com/ARMmbed/mbed-os-example-client Cloning into 'mbed-os-example-client'... remote: Counting objects: 1896, done. remote: Compressing objects: 100% (21/21), done. remote: Total 1896 (delta 10), reused 27 (delta 9), pack-reused 1866 Receiving objects: 100% (1896/1896), 8.03 MiB | 2.24 MiB/s, done. Resolving deltas: 100% (981/981), done. >cd mbed-os-example-client mbed-os-example-client>del easy-connect.lib mbed-os-example-client>mbed deploy [mbed] Adding library "mbed-client" from "https://github.com/ARMmbed/mbed-client" at rev #ea04c5de7822 [mbed] Adding library "mbed-client\mbed-client-c" from "https://github.com/ARMmbed/mbed-client-c" at rev #ecfa619e42b2 [mbed] Adding library "mbed-client\mbed-client-classic" from "https://github.com/ARMmbed/mbed-client-classic" at rev #4e66929607c3 [mbed] Adding library "mbed-client\mbed-client-mbed-tls" from "https://github.com/ARMmbed/mbed-client-mbed-tls" at rev #7e1b6d815038 [mbed] Adding library "mbed-os" from "https://github.com/ARMmbed/mbed-os" at rev #2b4ff78ab0a5 [mbed] Adding library "pal" from "https://github.com/ARMmbed/pal" at rev #60ce64d5ec35 mbed-os-example-client>mbed add https://os.mbed.com/teams/ublox/code/ublox-ppp-cellular-interface/ [mbed] Adding library "ublox-ppp-cellular-interface" from "https://os.mbed.com/teams/ublox/code/ublox-ppp-cellular-interface" at latest revision in the current branch [mbed] Updating reference "ublox-ppp-cellular-interface" -> "https://os.mbed.com/teams/ublox/code/ublox-ppp-cellular-interface/#4c533665168c" warning: LF will be replaced by CRLF in ublox-ppp-cellular-interface.lib. The file will have its original line endings in your working directory. mbed-os-example-client>mbed add https://os.mbed.com/teams/ublox/code/ublox-cellular-base/ [mbed] Adding library "ublox-cellular-base" from "https://os.mbed.com/teams/ublox/code/ublox-cellular-base" at latest revision in the current branch [mbed] Updating reference "ublox-cellular-base" -> "https://os.mbed.com/teams/ublox/code/ublox-cellular-base/#a15349fcab25" warning: LF will be replaced by CRLF in ublox-cellular-base.lib. The file will have its original line endings in your working directory. mbed-os-example-client>mbed add https://os.mbed.com/teams/ublox/code/easy-connect/ [mbed] Adding library "easy-connect" from "https://os.mbed.com/teams/ublox/code/easy-connect" at latest revision in the current branch [mbed] Updating library "easy-connect\atmel-rf-driver" to rev #3cc6010188c0 [mbed] Updating library "easy-connect\esp8266-driver" to rev #44fb447c72a3 [mbed] Updating library "easy-connect\esp8266-driver\ESP8266\ATParser" to rev #77734ee44a63 [mbed] Updating library "easy-connect\mcr20a-rf-driver" to rev #9aac10474702 [mbed] Updating library "easy-connect\stm-spirit1-rf-driver" to rev #cb5f1e808ee9 [mbed] Updating reference "easy-connect" -> "https://os.mbed.com/teams/ublox/code/easy-connect/#304d3ba87a01" warning: LF will be replaced by CRLF in easy-connect.lib. The file will have its original line endings in your working directory.
#include "UbloxPPPCellularInterface.h" and define
"config" section of
mbed_app.json to define
"network-interface" as having the value
"config" section of
mbed_app.json to add the required values for
Supply my own credentials in
Compiling the code:
mbed-os-example-client>mbed config root . [mbed] . now set as default root in program "mbed-os-example-client" mbed-os-example-client>mbed target UBLOX_C030_U201 [mbed] UBLOX_C030_U201 now set as default target in program "mbed-os-example-client" mbed-os-example-client>mbed toolchain GCC_ARM [mbed] GCC_ARM now set as default toolchain in program "mbed-os-example-client" mbed-os-example-client>mbed compile Building project mbed-os-example-client (UBLOX_C030_U201, GCC_ARM) Scan: . Scan: mbed Scan: env Scan: FEATURE_COMMON_PAL Scan: FEATURE_LWIP Scan: FEATURE_NANOSTACK Compile [ 0.1%]: at24mac.cpp Compile [ 0.3%]: MyBuffer.cpp Compile [ 0.4%]: ESP8266Interface.cpp Compile [ 0.6%]: NanostackRfPhyAtmel.cpp Compile [ 0.7%]: ATParser.cpp ... Total Static RAM memory (data + bss): 70684 bytes Total Flash memory (text + data): 317793 bytes Image: .\BUILD\UBLOX_C030_U201\GCC_ARM\mbed-os-example-client.bin
To post an answer, please log in.