xively / xively-client-c Goto Github PK
View Code? Open in Web Editor NEWThe official and highly portable Xively C Client designed for embedded platforms.
License: Other
The official and highly portable Xively C Client designed for embedded platforms.
License: Other
Build fails on Windows for me:
c:\ti\xively-client-c-master>gmake PRESET=CC3200_TLS_SOCKET clean
. XI_BSP_PLATFORM: [cc3200]
. XI_BSP_TLS: []
rm -f -rf
c:/ti/xively-client-c-master/bin/cc3200
c:/ti/xively-client-c-master/obj/cc3200
c:/ti/xively-client-c-master/obj/cc3200/tests
c:/ti/xively-client-c-master/obj/cc3200/libxively
c:\ti\xively-client-c-master>gmake PRESET=CC3200_TLS_SOCKET
. XI_BSP_PLATFORM: [cc3200]
. XI_BSP_TLS: []
. run 'make help' for more information, including a list of valid Build PRESETS.
. CONFIG: [bsp_cc3200-memory_fs-tls_socket]
. TARGET: [cc3200-static-release]
. COMPILER: [C:/ti/ccsv7/tools/compiler/gcc-arm-none-eabi-4_9-2015q3/bin/armcl]
[C:/ti/ccsv7/tools/compiler/gcc-arm-none-eabi-4_9-2015q3/bin/armcl] c:/ti/xively-client-c-master/obj/cc3200/libxively/io/fs/memory/xi_fs_memory.o
process_begin: CreateProcess(NULL, C:/ti/ccsv7/tools/compiler/gcc-arm-none-eabi-4_9-2015q3/bin/armcl -DXI_DEBUG_OUTPUT=0 -DXI_DEBUG_ASSERT=0 -DXI_DEBUG_EXTRA_INFO=0 -DXI_
FS_MEMORY -DXI_PLATFORM_BASE_DUMMY -DXI_NO_TLS_LAYER -DXI_BSP_IO_NET_TLS_SOCKET -DXI_BSP -DXI_CROSS_TARGET -DXI_EMBEDDED_TESTS -DNO_WRITEV -fstrict-aliasing -IC:/ti/ccsv7
/tools/compiler/gcc-arm-none-eabi-4_9-2015q3/include -mv7M4 -me -ms --define=css --define=cc3200 --define=WOLFSSL_NOOS_XIVELY --display_error_number --diag_warning=225 --
diag_wrap=off --abi=eabi --opt_for_speed=0 --code_state=16 --float_support=vfplib --preproc_with_compile --preproc_dependency=c:/ti/xively-client-c-master/obj/cc3200/libx
ively/io/fs/memory/xi_fs_memory.d --obj_directory=c:/ti/xively-client-c-master/obj/cc3200/libxively/io/fs/memory/ --asm_directory=c:/ti/xively-client-c-master/obj/cc3200/
libxively/io/fs/memory/ --output_file=c:/ti/xively-client-c-master/obj/cc3200/libxively/io/fs/memory/xi_fs_memory.o -O4 -IC:/ti/tirex-content/CC3200SDK_1.1.0/cc3200-sdk//
driverlib -IC:/ti/tirex-content/CC3200SDK_1.1.0/cc3200-sdk//inc -IC:/ti/tirex-content/CC3200SDK_1.1.0/cc3200-sdk//example/common -IC:/ti/tirex-content/CC3200SDK_1.1.0/cc3
200-sdk//simplelink/include -IC:/ti/tirex-content/CC3200SDK_1.1.0/cc3200-sdk//simplelink_extlib/provisioninglib -I. -Ic:/ti/xively-client-c-master/include/bsp -Ic:/ti/xiv
ely-client-c-master/src/libxively/platform/xi_thread -Ic:/ti/xively-client-c-master/include -Ic:/ti/xively-client-c-master/include_senml -Ic:/ti/xively-client-c-master/sr
c/libxively -Ic:/ti/xively-client-c-master/src/libxively/io/fs/memory -Ic:/ti/xively-client-c-master/src/bsp/platform/cc3200 -Ic:/ti/xively-client-c-master/src/libxively/
io/net -Ic:/ti/xively-client-c-master/src/libxively/memory -Ic:/ti/xively-client-c-master/src/libxively/event_loop -Ic:/ti/xively-client-c-master/src/libxively/time -Ic:/
ti/xively-client-c-master/src/libxively -Ic:/ti/xively-client-c-master/src/libxively/io -Ic:/ti/xively-client-c-master/src/libxively/io/fs -Ic:/ti/xively-client-c-master/
src/libxively/event_dispatcher -Ic:/ti/xively-client-c-master/src/libxively/datastructures -Ic:/ti/xively-client-c-master/src/libxively/mqtt/codec -Ic:/ti/xively-client-c
-master/src/libxively/mqtt/logic -Ic:/ti/xively-client-c-master/src/libxively/control_topic -Ic:/ti/xively-client-c-master/src/libxively/platform/dummy -Ic:/ti/xively-cli
ent-c-master/src/libxively/platform/dummy/xi_thread -Ic:/ti/xively-client-c-master/src/import/cmocka/include/ -Ic:/ti/xively-client-c-master/src/tests -Ic:/ti/xively-clie
nt-c-master/src/tests/tools -Ic:/ti/xively-client-c-master/src/tests/itests -Ic:/ti/xively-client-c-master/src/tests/itests/tools -Ic:/ti/xively-client-c-master/src/tests
/itests/tools/dummy -Ic:/ti/xively-client-c-master/src/libxively -Ic:/ti/xively-client-c-master/src/tests/itests/platform/dummy/xi_thread -c c:/ti/xively-client-c-master/
src/libxively/io/fs/memory/xi_fs_memory.c -o c:/ti/xively-client-c-master/obj/cc3200/libxively/io/fs/memory/xi_fs_memory.o, ...) failed.
make (e=2): The system cannot find the file specified.
Makefile:124: recipe for target 'c:/ti/xively-client-c-master/obj/cc3200/libxively/io/fs/memory/xi_fs_memory.o' failed
gmake: *** [c:/ti/xively-client-c-master/obj/cc3200/libxively/io/fs/memory/xi_fs_memory.o] Error 2
Ran Make at top level without any issue. Changed into examples directory. Ran Make.
[cc] /Users/username/Development/xively-client-c-master/examples/mqtt_logic_example/bin/mqtt_logic_example
ld: warning: directory not found for option '-L/Users/username/Development/xively-client-c-master/examples/mqtt_logic_example/../.././src/import/tls/wolfssl/src/.libs/'
Undefined symbols for architecture x86_64:
"_wolfSSL_UseOCSPStapling", referenced from:
_xi_bsp_tls_init in libxively.a(xi_bsp_tls_wolfssl.o)
"_wolfSSL_UseSNI", referenced from:
_xi_bsp_tls_init in libxively.a(xi_bsp_tls_wolfssl.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [/Users/username/Development/xively-client-c-master/examples/mqtt_logic_example/bin/mqtt_logic_example] Error 1
make: *** [mqtt_logic_example] Error 2
Hi all,
Iโm using msys32 environment to build and compile in my current windows 10 OS.
I downloaded the library source code from xively-clientc repository and then before I proceed with making PRESET=ESP32 I downloaded and installed asked packets; autoconf, automake, librool, and cmake. Here I get the first error, autotools-dev was not found.
And if I proceed without installing this packet, I command make PRESET=ESP32 and I get an error building the libraries and one library (libxively.a) is not build.
Versa2@DESKTOP-FQT4F1B MINGW32 ~/xively/xively-client-c-master
$ make PRESET=ESP32
# Using build PRESET: "ESP32" to set CONFIG and TARGET variables:
. XI_BSP_PLATFORM: [esp32]
. XI_BSP_TLS: [wolfssl]
# Xively C Client
. run 'make help' for more information, including a list of valid Build PRESETS.
. CONFIG: [memory_fs-tls_bsp]
. TARGET: [esp32-static-release]
. COMPILER: [xtensa-esp32-elf-gcc]
make[1]: se entra en el directorio '/home/Versa2/xively/xively-client-c-master/examples/esp32/xively_demo/wolfssl-make'
cd /home/Versa2/xively/xively-client-c-master/src/import/tls/ && ./download_and_compile_wolfssl.sh
!! IMPORTANT !!
WolfSSL's build system requires autotools to be installed on your host system.
Please install the followng packages before proceeding:
MacOSX:
brew update
brew install autoconf automake libtool
Ubuntu:
sudo apt-get update
sudo apt-get install autoconf
sudo apt-get install autotools-dev
sudo apt-get install libtool
For other TLS library options please run make help_tls.
! If you proceed from this step and the build fails then you will need to: !
1: make clean_all
2: rm -rf src/import/tls/wolfssl
Please acknowledge these tool dependencies. Do you wish to proceed? [Y/N] y
-----------------
WolfSSL LICENSING
-----------------
wolfSSL (formerly known as CyaSSL) and wolfCrypt are either licensed for use
under the GPLv2 or a standard commercial license. For our users who cannot use
wolfSSL under GPLv2, a commercial license to wolfSSL and wolfCrypt is available.
Please contact wolfSSL Inc. directly at:
Email: [email protected]
Phone: +1 425 245-8247
More information can be found on the wolfSSL website at www.wolfssl.com.
Do you agree to the license of this third party library? [Y/N] y
Cloning into 'wolfssl'...
remote: Counting objects: 48066, done.
remote: Compressing objects: 100% (70/70), done.
remote: Total 48066 (delta 44), reused 45 (delta 18), pack-reused 47978
Receiving objects: 100% (48066/48066), 37.92 MiB | 2.23 MiB/s, done.
Resolving deltas: 100% (35166/35166), done.
Note: checking out 'tags/v3.10.2-stable'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
git checkout -b <new-branch-name>
HEAD is now at 7da446c2... Merge pull request #748 from JacobBarthelmeh/Release
Can't exec "aclocal": No such file or directory at /usr/share/autoconf/Autom4te/FileUtils.pm line 326.
autoreconf: failed to run aclocal: No such file or directory
WolfSSL Build Complete.
[CC] /home/Versa2/xively/xively-client-c-master/src/import/tls/wolfssl/src/internal.c
[CC] /home/Versa2/xively/xively-client-c-master/src/import/tls/wolfssl/src/io.c
[CC] /home/Versa2/xively/xively-client-c-master/src/import/tls/wolfssl/src/keys.c
[CC] /home/Versa2/xively/xively-client-c-master/src/import/tls/wolfssl/src/ocsp.c
[CC] /home/Versa2/xively/xively-client-c-master/src/import/tls/wolfssl/src/ssl.c
[CC] /home/Versa2/xively/xively-client-c-master/src/import/tls/wolfssl/src/tls.c
[CC] /home/Versa2/xively/xively-client-c-master/src/import/tls/wolfssl/wolfcrypt/src/aes.c
[CC] /home/Versa2/xively/xively-client-c-master/src/import/tls/wolfssl/wolfcrypt/src/arc4.c
[CC] /home/Versa2/xively/xively-client-c-master/src/import/tls/wolfssl/wolfcrypt/src/asn.c
[CC] /home/Versa2/xively/xively-client-c-master/src/import/tls/wolfssl/wolfcrypt/src/coding.c
[CC] /home/Versa2/xively/xively-client-c-master/src/import/tls/wolfssl/wolfcrypt/src/dh.c
[CC] /home/Versa2/xively/xively-client-c-master/src/import/tls/wolfssl/wolfcrypt/src/error.c
[CC] /home/Versa2/xively/xively-client-c-master/src/import/tls/wolfssl/wolfcrypt/src/hash.c
[CC] /home/Versa2/xively/xively-client-c-master/src/import/tls/wolfssl/wolfcrypt/src/hmac.c
[CC] /home/Versa2/xively/xively-client-c-master/src/import/tls/wolfssl/wolfcrypt/src/integer.c
[CC] /home/Versa2/xively/xively-client-c-master/src/import/tls/wolfssl/wolfcrypt/src/logging.c
[CC] /home/Versa2/xively/xively-client-c-master/src/import/tls/wolfssl/wolfcrypt/src/md5.c
[CC] /home/Versa2/xively/xively-client-c-master/src/import/tls/wolfssl/wolfcrypt/src/memory.c
[CC] /home/Versa2/xively/xively-client-c-master/src/import/tls/wolfssl/wolfcrypt/src/random.c
C:/msys32/home/Versa2/xively/xively-client-c-master/src/import/tls/wolfssl/wolfcrypt/src/random.c:1440:2: warning: #warning "write a real random seed!!!!, just for testing now" [-Wcpp]
#warning "write a real random seed!!!!, just for testing now"
^
[CC] /home/Versa2/xively/xively-client-c-master/src/import/tls/wolfssl/wolfcrypt/src/rsa.c
[CC] /home/Versa2/xively/xively-client-c-master/src/import/tls/wolfssl/wolfcrypt/src/sha.c
[CC] /home/Versa2/xively/xively-client-c-master/src/import/tls/wolfssl/wolfcrypt/src/sha256.c
[CC] /home/Versa2/xively/xively-client-c-master/src/import/tls/wolfssl/wolfcrypt/src/wc_port.c
[CC] /home/Versa2/xively/xively-client-c-master/src/import/tls/wolfssl/wolfcrypt/src/wc_encrypt.c
[AR] Static library: /home/Versa2/xively/xively-client-c-master/bin/esp32/libwolfssl.a
make[1]: se sale del directorio '/home/Versa2/xively/xively-client-c-master/examples/esp32/xively_demo/wolfssl-make'
[xtensa-esp32-elf-gcc] /home/Versa2/xively/xively-client-c-master/obj/esp32/libxively/io/fs/memory/xi_fs_memory.o
[xtensa-esp32-elf-gcc] /home/Versa2/xively/xively-client-c-master/obj/esp32/bsp/platform/esp32/xi_bsp_rng_esp32.o
[xtensa-esp32-elf-gcc] /home/Versa2/xively/xively-client-c-master/obj/esp32/bsp/platform/esp32/xi_bsp_io_net_esp32.o
In file included from C:/msys32/home/Versa2/esp-idf/components/lwip/include/lwip/lwip/opt.h:45:0,
from C:/msys32/home/Versa2/esp-idf/components/lwip/include/lwip/lwip/netdb.h:32,
from C:/msys32/home/Versa2/xively/xively-client-c-master/src/bsp/platform/esp32/xi_bsp_io_net_esp32.c:9:
C:/msys32/home/Versa2/esp-idf/components/lwip/include/lwip/port/lwipopts.h:40:23: fatal error: sys/ioctl.h: No such file or directory
compilation terminated.
make: *** [Makefile:136: /home/Versa2/xively/xively-client-c-master/obj/esp32/bsp/platform/esp32/xi_bsp_io_net_esp32.o] Error 1
Hi,
I am evaluating xively client on CC3200, and I don't get any success : I systematically get a "connection to broker.xively.com:8883 has failed reason 32" error message.
xively_error.h -> XI_MQTT_SERVER_UNAVAILIBLE, /* 32 */
I suspect a TLS issue.
My configuration is based on :
Has CC3200 client been tested with this configuration ? (especially last service pack available)
Thanks in advance,
Frederic
Host Driver Version: 1.0.1.11
Build Version 2.9.0.0.31.1.4.0.1.1.0.3.37
Device is configured in default state
Device started as STATION
[WLAN EVENT] STA Connected to the AP: iPhone de Frederic , BSSID: 3a:34:51:5d:18:f1
[NETAPP EVENT] IP Acquired: IP=172.20.10.2 ,Gateway=172.20.10.1
SNTP_G: 1504167349, pool.ntp.org->0x8CC8CA95
SNTP_L: 1504167350, UT 3
close the user file: /cert/xively_cert_globalsign_rootca.der
connection to broker.xively.com:8883 has failed reason 32
[SOCK ERROR] - close socket (81) operation failed to transmit all queued packets
close the user file: /cert/xively_cert_globalsign_rootca.der
connection to broker.xively.com:8883 has failed reason 32
[SOCK ERROR] - close socket (82) operation failed to transmit all queued packets
close the user file: /cert/xively_cert_globalsign_rootca.der
connection to broker.xively.com:8883 has failed reason 32
[SOCK ERROR] - close socket (83) operation failed to transmit all queued packets
close the user file: /cert/xively_cert_globalsign_rootca.der
connection to broker.xively.com:8883 has failed reason 32
[SOCK ERROR] - close socket (84) operation failed to transmit all queued packets
3.10.2 is throwing this error on make
:
/Applications/Xcode.app/Contents/Developer/usr/bin/make -j9 all-am
CCLD src/libwolfssl.la
CC wolfcrypt/benchmark/benchmark.o
wolfcrypt/benchmark/benchmark.c:240:41: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
WOLFSSL_API int wolfSSL_Debugging_ON();
^
void
1 error generated.
make[1]: *** [wolfcrypt/benchmark/benchmark.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [all] Error 2
Which stops the initial xively-client-c make
from properly installing WolfSSL. I ran bash download_and_compile_wolfssl.sh
from the src/imports/tls/
directory and got the same error.
However once I updated WolfSSL to the latest stable version, WolfSSL compiled and installed properly but xively is now failing with a new error, probably from new configuration options with latest version.
# Using build PRESET: "POSIX_REL" to set CONFIG and TARGET variables:
. XI_BSP_PLATFORM: [posix]
. XI_BSP_TLS: [wolfssl]
# Xively C Client
. run 'make help' for more information, including a list of valid Build PRESETS.
. CONFIG: [posix_fs-posix_platform-tls_bsp-senml-control_topic-memory_limiter-secure_file_transfer]
. TARGET: [osx-static-release]
. COMPILER: [cc]
[cc] ####/xively-client-c/obj/osx/libxively/protobuf-generated/control_topic.pb-c.o
...
### omitted for brevity ###
...
In file included from ./src/import/tls/wolfssl/wolfssl/wolfcrypt/types.h:27:
./src/import/tls/wolfssl/wolfssl/wolfcrypt/settings.h:1573:14: error:
"For timing resistance / side-channel attack prevention consider using harden options" [-Werror,-W#warnings]
#warning "For timing resistance / side-channel attack prevention consider using harden options"
^
1 error generated.
make: *** [/Users/westoncatron/heatworks/code/testing/xively-client-c/obj/osx/bsp/platform/posix/xi_bsp_rng_posix.o] Error 1
System Information
Issue
Intermittent issues where all 4 of the NTP servers hard coded in the Xively library fail. This causes a failure to connect to the broker. The 4 hard coded NTP servers that can be found in xi_bsp_time_cc3220sf_sntp.c are:
Below is an image of the debug output when the failure occurs:
xi_bsp_time_getcurrenttime_seconds() is using HAL_GetTick() to calculate the current time (epoch millisecs/secs). HAL_GetTick() returns millisecs tick count with uint32_t data format, which is max 4,294,967,295. This is overruning after 49.7 days.
This issue stands for the STM32F4 BSP package.
Hi All,
I got these messages try to complie wolfssl under windows 10 using msys shell:
"error: 'WOLFSSL_CERT_MANAGER {aka struct WOLFSSL_CERT_MANAGER}' has no member named 'ocsp_stapling'"
here below the log
what i miss or did wrong?
thanks in advaced
$ make PRESET=ESP32
'# Using build PRESET: "ESP32" to set CONFIG and TARGET variables:
. XI_BSP_PLATFORM: [esp32]
. XI_BSP_TLS: [wolfssl]
'# Xively C Client
. run 'make help' for more information, including a list of valid Build PRESETS.
. CONFIG: [memory_fs-tls_bsp]
. TARGET: [esp32-static-release]
. COMPILER: [xtensa-esp32-elf-gcc]
make[1]: ingresso nella directory "/c/esp32/xively-client-c/examples/esp32/xively_demo/wolfssl-make"
[CC] /c/esp32/xively-client-c/src/import/tls/wolfssl/src/ssl.c
C:/esp32/xively-client-c/src/import/tls/wolfssl/src/ssl.c: In function 'wolfSSL_CertManagerFree':
C:/esp32/xively-client-c/src/import/tls/wolfssl/src/ssl.c:2367:19: error: 'WOLFSSL_CERT_MANAGER {aka struct WOLFSSL_CERT_MANAGER}' has no member named 'ocsp_stapling'
if (cm->ocsp_stapling)
^
C:/esp32/xively-client-c/src/import/tls/wolfssl/src/ssl.c:2368:28: error: 'WOLFSSL_CERT_MANAGER {aka struct WOLFSSL_CERT_MANAGER}' has no member named 'ocsp_stapling'
FreeOCSP(cm->ocsp_stapling, 1);
^
C:/esp32/xively-client-c/src/import/tls/wolfssl/src/ssl.c: In function 'wolfSSL_CertManagerEnableOCSPStapling':
C:/esp32/xively-client-c/src/import/tls/wolfssl/src/ssl.c:4793:15: error: 'WOLFSSL_CERT_MANAGER {aka struct WOLFSSL_CERT_MANAGER}' has no member named 'ocsp_stapling'
if (cm->ocsp_stapling == NULL) {
^
C:/esp32/xively-client-c/src/import/tls/wolfssl/src/ssl.c:4794:15: error: 'WOLFSSL_CERT_MANAGER {aka struct WOLFSSL_CERT_MANAGER}' has no member named 'ocsp_stapling'
cm->ocsp_stapling = (WOLFSSL_OCSP*)XMALLOC(sizeof(WOLFSSL_OCSP),
^
C:/esp32/xively-client-c/src/import/tls/wolfssl/src/ssl.c:4796:19: error: 'WOLFSSL_CERT_MANAGER {aka struct WOLFSSL_CERT_MANAGER}' has no member named 'ocsp_stapling'
if (cm->ocsp_stapling == NULL)
^
C:/esp32/xively-client-c/src/import/tls/wolfssl/src/ssl.c:4799:28: error: 'WOLFSSL_CERT_MANAGER {aka struct WOLFSSL_CERT_MANAGER}' has no member named 'ocsp_stapling'
if (InitOCSP(cm->ocsp_stapling, cm) != 0) {
^
C:/esp32/xively-client-c/src/import/tls/wolfssl/src/ssl.c:4801:28: error: 'WOLFSSL_CERT_MANAGER {aka struct WOLFSSL_CERT_MANAGER}' has no member named 'ocsp_stapling'
FreeOCSP(cm->ocsp_stapling, 1);
^
C:/esp32/xively-client-c/src/import/tls/wolfssl/src/ssl.c:4802:19: error: 'WOLFSSL_CERT_MANAGER {aka struct WOLFSSL_CERT_MANAGER}' has no member named 'ocsp_stapling'
cm->ocsp_stapling = NULL;
^
make[1]: *** [Makefile:128: /c/esp32/xively-client-c/obj/esp32/wolfssl/src/ssl.o] Error 1
make[1]: uscita dalla directory "/c/esp32/xively-client-c/examples/esp32/xively_demo/wolfssl-make"
make: *** [make/mt-os/mt-esp32.mk:83: WOLFSSL_STATIC_LIB] Error 2
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.