Go Down

Topic: MKR GSM 1400 FTP (Read 1 time) previous topic - next topic

MohitB

I am trying to send a file saved in sdcard interfaced to MKR GSM 1400 board to a FTP server. Is it possible to do something like this with the board ?

tryhus

Hi MohitB,

You can clone my fork. I added some FTP and filesystem functions:
https://github.com/tryhus/MKRGSM/tree/feature/ftp

To send a file from sdcard to a FTP server you can get the code from an older post:
https://github.com/arduino-libraries/MKRGSM/pull/73


oberdoed

Hey tryhus,

thanks a lot for the work you've done.

I cloned and imported your MKRGSM Library "feature-ftp" and tryed to verify the FTP example.

This is what i got:

 invalid conversion from 'const char*' to 'uint16_t {aka short unsigned int}' [-fpermissive]

/home/builder/opt/arduino-builder/arduino-builder -compile -core-api-version 10611 -hardware /home/builder/opt/arduino-builder/hardware -hardware /home/builder/.arduino15/packages -tools /home/builder/opt/arduino-builder/tools -tools /home/builder/.arduino15/packages -built-in-libraries /home/builder/opt/libraries/latest -logger humantags -fqbn arduino:samd:mkrgsm1400 -build-cache /tmp -build-path /tmp/937116371/build -verbose -prefs runtime.tools.openocd.path=/home/builder/.arduino15/packages/arduino/tools/openocd/0.10.0-arduino7 -prefs runtime.tools.arduino101load.path=/home/builder/.arduino15/packages/Intel/tools/arduino101load/2.0.1 -prefs runtime.tools.nrf5x-cl-tools.path=/home/builder/.arduino15/packages/arduino/tools/nrf5x-cl-tools/9.3.1 -prefs runtime.tools.arduinoOTA.path=/home/builder/.arduino15/packages/arduino/tools/arduinoOTA/1.2.1 -prefs runtime.tools.x86-linux-gcc.path=/home/builder/.arduino15/packages/arduino/tools/x86-linux-gcc/7.2.0 -prefs runtime.tools.CMSIS-Atmel.path=/home/builder/.arduino15/packages/arduino/tools/CMSIS-Atmel/1.2.0 -prefs runtime.tools.avr-gcc.path=/home/builder/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino5 -prefs runtime.tools.flashpack.path=/home/builder/.arduino15/packages/Intel/tools/flashpack/2.0.0 -prefs runtime.tools.avrdude.path=/home/builder/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino8 -prefs runtime.tools.arm-linux-gcc.path=/home/builder/.arduino15/packages/arduino/tools/arm-linux-gcc/4.9.3 -prefs runtime.tools.xtensa-lx106-elf-gcc.path=/home/builder/.arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/2.5.0-3-20ed2b9 -prefs runtime.tools.arc-elf32.path=/home/builder/.arduino15/packages/Intel/tools/arc-elf32/1.6.9+1.0.1 -prefs runtime.tools.linuxuploader.path=/home/builder/.arduino15/packages/arduino/tools/linuxuploader/1.5.1 -prefs runtime.tools.bossac.path=/home/builder/.arduino15/packages/arduino/tools/bossac/1.7.0-arduino3 -prefs runtime.tools.esptool.path=/home/builder/.arduino15/packages/esp8266/tools/esptool/2.5.0-3-20ed2b9 -prefs runtime.tools.core2-32-poky-linux.path=/home/builder/.arduino15/packages/Intel/tools/core2-32-poky-linux/1.6.2+1.0 -prefs runtime.tools.sketchUploader.path=/home/builder/.arduino15/packages/Intel/tools/sketchUploader/1.6.2+1.0 -prefs runtime.tools.CMSIS.path=/home/builder/.arduino15/packages/arduino/tools/CMSIS/4.5.0 -prefs runtime.tools.dfu-util.path=/home/builder/.arduino15/packages/arduino/tools/dfu-util/0.9.0-arduino1 -prefs runtime.tools.arm-none-eabi-gcc.path=/home/builder/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4 -prefs runtime.tools.mkspiffs.path=/home/builder/.arduino15/packages/esp8266/tools/mkspiffs/2.5.0-3-20ed2b9 -prefs runtime.tools.i586-poky-linux-uclibc.path=/home/builder/.arduino15/packages/Intel/tools/i586-poky-linux-uclibc/1.6.2+1.0 -libraries /tmp/937116371/custom -libraries /tmp/937116371/pinned /tmp/937116371/FTP

Multiple libraries were found for "MKRGSM.h"

Used: /tmp/937116371/custom/MKRGSM

Not used: /home/builder/opt/libraries/latest/mkrgsm_1_4_2

Using library MKRGSM at version 1.3.1 in folder: /tmp/937116371/custom/MKRGSM

/tmp/937116371/FTP/FTP.ino: In function 'void loop()':

/tmp/937116371/FTP/FTP.ino:66:87: error: invalid conversion from 'const char*' to 'uint16_t {aka short unsigned int}' [-fpermissive]

ftp.connect(SECRET_FTP_HOST, SECRET_FTP_USER, SECRET_FTP_PASSWORD, SECRET_FTP_PORT));

^

In file included from /tmp/937116371/FTP/FTP.ino:18:0:

/tmp/937116371/custom/MKRGSM/src/GSMFTP.h:41:8: note: initializing argument 4 of 'bool GSMFTP::connect(String, String, String, uint16_t, bool)'

bool connect(String hostname, String user, String password, uint16_t port, bool passiveMode = true);

^~~~~~~

exit status 1


Could you help me out with this problem?

Thanks a lot.

Go Up