-->
Page 1 of 1

converting MAC address into string

PostPosted: Thu Sep 24, 2015 6:10 am
by trendchaster
Howdy,
I am converting MAC address into string. That string I want to save in a variable and publish that variable value using MQTT. Any guess how to do it

os_printf("rdaddr: %02x:%02x:%02x:%02x:%02x:%02x "tsaddr: %02x:%02x:%02x:%02x:%02x:%02x " "bssid: %02x:%02x:%02x:%02x:%02x:%02x ""addr4: %02x:%02x:%02x:%02x:%02x:%02x\n", MAC2STR(probe_request->rdaddr),
MAC2STR(probe_request->bssid));


The os_snprintf does not support it shows error

c:/espressif/xtensa-lx106-elf/bin/../lib/gcc/xtensa-lx106-elf/5.1.0/../../../../xtensa-lx106-elf/bin/ld.exe: build/app.out section .text' will not fit in regioniram1_0_seg' c:/espressif/xtensa-lx106-elf/bin/../lib/gcc/xtensa-lx106-elf/5.1.0/../../../../xtensa-lx106-elf/lib\libc.a(lib_a-stdio.o):(.literal+0x0): undefined reference to _read_r'
c:/espressif/xtensa-lx106-elf/bin/../lib/gcc/xtensa-lx106-elf/5.1.0/../../../../xtensa-lx106-elf/lib\libc.a(lib_a-stdio.o):(.literal+0x4): undefined reference to_lseek_r' c:/espressif/xtensa-lx106-elf/bin/../lib/gcc/xtensa-lx106-elf/5.1.0/../../../../xtensa-lx106-elf/lib\libc.a(lib_a-stdio.o):(.literal+0x8): undefined reference to _write_r'
c:/espressif/xtensa-lx106-elf/bin/../lib/gcc/xtensa-lx106-elf/5.1.0/../../../../xtensa-lx106-elf/lib\libc.a(lib_a-stdio.o):(.literal+0xc): undefined reference to_close_r' c:/espressif/xtensa-lx106-elf/bin/../lib/gcc/xtensa-lx106-elf/5.1.0/../../../../xtensa-lx106-elf/lib\libc.a(lib_a-stdio.o): In function __sread':
d:\Neo\esp8266-devkit\Espressif\dl\esp-newlib\build\xtensa-lx106-elf\newlib\libc\stdio/../../../../../newlib/libc/stdio/stdio.c:48: undefined reference to_read_r' C:/Espressif/examples/esp_mqtt/Makefile:187: recipe for target 'build/app.out' failed c:/espressif/xtensa-lx106-elf/bin/../lib/gcc/xtensa-lx106-elf/5.1.0/../../../../xtensa-lx106-elf/lib\libc.a(lib_a-stdio.o): In function __swrite':
d:\Neo\esp8266-devkit\Espressif\dl\esp-newlib\build\xtensa-lx106-elf\newlib\libc\stdio/../../../../../newlib/libc/stdio/stdio.c:89: undefined reference to_lseek_r' d:\Neo\esp8266-devkit\Espressif\dl\esp-newlib\build\xtensa-lx106-elf\newlib\libc\stdio/../../../../../newlib/libc/stdio/stdio.c:97: undefined reference to _write_r'
c:/espressif/xtensa-lx106-elf/bin/../lib/gcc/xtensa-lx106-elf/5.1.0/../../../../xtensa-lx106-elf/lib\libc.a(lib_a-stdio.o): In function__sseek': d:\Neo\esp8266-devkit\Espressif\dl\esp-newlib\build\xtensa-lx106-elf\newlib\libc\stdio/../../../../../newlib/libc/stdio/stdio.c:117: undefined reference to _lseek_r'
c:/espressif/xtensa-lx106-elf/bin/../lib/gcc/xtensa-lx106-elf/5.1.0/../../../../xtensa-lx106-elf/lib\libc.a(lib_a-stdio.o): In function__sclose': d:\Neo\esp8266-devkit\Espressif\dl\esp-newlib\build\xtensa-lx106-elf\newlib\libc\stdio/../../../../../newlib/libc/stdio/stdio.c:135: undefined reference to _close_r'
c:/espressif/xtensa-lx106-elf/bin/../lib/gcc/xtensa-lx106-elf/5.1.0/../../../../xtensa-lx106-elf/lib\libc.a(lib_a-mallocr.o):(.literal+0x20): undefined reference to_sbrk_r' c:/espressif/xtensa-lx106-elf/bin/../lib/gcc/xtensa-lx106-elf/5.1.0/../../../../xtensa-lx106-elf/lib\libc.a(lib_a-mallocr.o): In function malloc_extend_top':
d:\Neo\esp8266-devkit\Espressif\dl\esp-newlib\build\xtensa-lx106-elf\newlib\libc\stdlib/../../../../../newlib/libc/stdlib/mallocr.c:2165: undefined reference to_sbrk_r' d:\Neo\esp8266-devkit\Espressif\dl\esp-newlib\build\xtensa-lx106-elf\newlib\libc\stdlib/../../../../../newlib/libc/stdlib/mallocr.c:2202: undefined reference to _sbrk_r'
c:/espressif/xtensa-lx106-elf/bin/../lib/gcc/xtensa-lx106-elf/5.1.0/../../../../xtensa-lx106-elf/lib\libc.a(lib_a-freer.o): In function_malloc_trim_r': d:\Neo\esp8266-devkit\Espressif\dl\esp-newlib\build\xtensa-lx106-elf\newlib\libc\stdlib/../../../../../newlib/libc/stdlib/mallocr.c:3325: undefined reference to _sbrk_r'
d:\Neo\esp8266-devkit\Espressif\dl\esp-newlib\build\xtensa-lx106-elf\newlib\libc\stdlib/../../../../../newlib/libc/stdlib/mallocr.c:3332: undefined reference to_sbrk_r' c:/espressif/xtensa-lx106-elf/bin/../lib/gcc/xtensa-lx106-elf/5.1.0/../../../../xtensa-lx106-elf/lib\libc.a(lib_a-freer.o):d:\Neo\esp8266-devkit\Espressif\dl\esp-newlib\build\xtensa-lx106-elf\newlib\libc\stdlib/../../../../../newlib/libc/stdlib/mallocr.c:3340: more undefined references to `_sbrk_r' follow collect2.exe: error: ld returned 1 exit status mingw32-make.exe: *** [build/app.out] Error 1