Libelium is offering new technical support channels, to contact with de Technical Support team to solve any issue our doubt please contact with your sales agent or visit our contact site



Post a new topicPost a reply Page 1 of 1   [ 4 posts ]
Author Message
 Post subject: Geolocation Tracker (GPRS + GPS) con SIM908 en Arduino UNO
PostPosted: Mon Nov 16, 2015 11:45 am 

Joined: Mon Nov 16, 2015 11:16 am
Posts: 2
Estoy intentando ejecutar una petición HTTP GET con el shield Geolocation Tracker con SIM908 en un Arduino Uno, tomando como referencia el post https://www.cooking-hacks.com/documentation/tutorials/geolocation-tracker-gprs-gps-geoposition-sim908-arduino-raspberry-pi/.

Mi entorno es un Mac OS X - El Capitan y el Arduino está conectado al USB de mi Mac.

Al conectar el dispositivo y ejecutar los comandos AT directamente con el Serial Monitor todo es correcto y he conseguido registrarme en la red de Vodafone (el operador mi tarjeta SIM). Las pruebas de sketches con el Arduino funcionando, sin ningún shield conectado, van bien.

Al intentar subir (Upload) el sketch de ejemplo con un petición HTTP GET es donde tengo los errores (las trazas más abajo).

Los jumpers que tengo actualmente en el setup son los del modo Arduino y el microprocesador del Arduino no está ensamblado (tal como indica el post https://www.cooking-hacks.com/documentation/tutorials/geolocation-tracker-gprs-gps-geoposition-sim908-arduino-raspberry-pi/).

Además de la traza de error del upload, adjunto la cabecera del HardwareSerial.h (no hay ningún fichero /Users/apastoriza/.avrduderc sobreescribiendo parámetros y el avrdude.conf es el que viene por defecto)

¿Que estoy haciendo mal? ¿Podéis darme algo de luz?

Salida del Arduino IDE al hacer el Upload:
Code:

Arduino: 1.7.7 (Mac OS X), Board: "Arduino Uno"

/Users/apastoriza/Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10707 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -I/Users/apastoriza/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino -I/Users/apastoriza/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/variants/standard /var/folders/0k/y_zjyrd17bl8k0m9h5pm57b00000gn/T/build3239863014611751268.tmp/sketch_nov14a.cpp -o /var/folders/0k/y_zjyrd17bl8k0m9h5pm57b00000gn/T/build3239863014611751268.tmp/sketch_nov14a.cpp.o
Using previously compiled file: /var/folders/0k/y_zjyrd17bl8k0m9h5pm57b00000gn/T/build3239863014611751268.tmp/hooks.c.o
Using previously compiled file: /var/folders/0k/y_zjyrd17bl8k0m9h5pm57b00000gn/T/build3239863014611751268.tmp/WInterrupts.c.o
Using previously compiled file: /var/folders/0k/y_zjyrd17bl8k0m9h5pm57b00000gn/T/build3239863014611751268.tmp/wiring.c.o
Using previously compiled file: /var/folders/0k/y_zjyrd17bl8k0m9h5pm57b00000gn/T/build3239863014611751268.tmp/wiring_analog.c.o
Using previously compiled file: /var/folders/0k/y_zjyrd17bl8k0m9h5pm57b00000gn/T/build3239863014611751268.tmp/wiring_digital.c.o
Using previously compiled file: /var/folders/0k/y_zjyrd17bl8k0m9h5pm57b00000gn/T/build3239863014611751268.tmp/wiring_pulse.c.o
Using previously compiled file: /var/folders/0k/y_zjyrd17bl8k0m9h5pm57b00000gn/T/build3239863014611751268.tmp/wiring_shift.c.o
Using previously compiled file: /var/folders/0k/y_zjyrd17bl8k0m9h5pm57b00000gn/T/build3239863014611751268.tmp/abi.cpp.o
Using previously compiled file: /var/folders/0k/y_zjyrd17bl8k0m9h5pm57b00000gn/T/build3239863014611751268.tmp/CDC.cpp.o
Using previously compiled file: /var/folders/0k/y_zjyrd17bl8k0m9h5pm57b00000gn/T/build3239863014611751268.tmp/HardwareSerial.cpp.o
Using previously compiled file: /var/folders/0k/y_zjyrd17bl8k0m9h5pm57b00000gn/T/build3239863014611751268.tmp/HardwareSerial0.cpp.o
Using previously compiled file: /var/folders/0k/y_zjyrd17bl8k0m9h5pm57b00000gn/T/build3239863014611751268.tmp/HardwareSerial1.cpp.o
Using previously compiled file: /var/folders/0k/y_zjyrd17bl8k0m9h5pm57b00000gn/T/build3239863014611751268.tmp/HardwareSerial2.cpp.o
Using previously compiled file: /var/folders/0k/y_zjyrd17bl8k0m9h5pm57b00000gn/T/build3239863014611751268.tmp/HardwareSerial3.cpp.o
Using previously compiled file: /var/folders/0k/y_zjyrd17bl8k0m9h5pm57b00000gn/T/build3239863014611751268.tmp/HID.cpp.o
Using previously compiled file: /var/folders/0k/y_zjyrd17bl8k0m9h5pm57b00000gn/T/build3239863014611751268.tmp/IPAddress.cpp.o
Using previously compiled file: /var/folders/0k/y_zjyrd17bl8k0m9h5pm57b00000gn/T/build3239863014611751268.tmp/main.cpp.o
Using previously compiled file: /var/folders/0k/y_zjyrd17bl8k0m9h5pm57b00000gn/T/build3239863014611751268.tmp/new.cpp.o
Using previously compiled file: /var/folders/0k/y_zjyrd17bl8k0m9h5pm57b00000gn/T/build3239863014611751268.tmp/Print.cpp.o
Using previously compiled file: /var/folders/0k/y_zjyrd17bl8k0m9h5pm57b00000gn/T/build3239863014611751268.tmp/Stream.cpp.o
Using previously compiled file: /var/folders/0k/y_zjyrd17bl8k0m9h5pm57b00000gn/T/build3239863014611751268.tmp/Tone.cpp.o
Using previously compiled file: /var/folders/0k/y_zjyrd17bl8k0m9h5pm57b00000gn/T/build3239863014611751268.tmp/USBCore.cpp.o
Using previously compiled file: /var/folders/0k/y_zjyrd17bl8k0m9h5pm57b00000gn/T/build3239863014611751268.tmp/WMath.cpp.o
Using previously compiled file: /var/folders/0k/y_zjyrd17bl8k0m9h5pm57b00000gn/T/build3239863014611751268.tmp/WString.cpp.o
Using previously compiled file: /var/folders/0k/y_zjyrd17bl8k0m9h5pm57b00000gn/T/build3239863014611751268.tmp/core.a
/Users/apastoriza/Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/avr-gcc -w -Os -Wl,--gc-sections -mmcu=atmega328p -o /var/folders/0k/y_zjyrd17bl8k0m9h5pm57b00000gn/T/build3239863014611751268.tmp/sketch_nov14a.cpp.elf /var/folders/0k/y_zjyrd17bl8k0m9h5pm57b00000gn/T/build3239863014611751268.tmp/sketch_nov14a.cpp.o /var/folders/0k/y_zjyrd17bl8k0m9h5pm57b00000gn/T/build3239863014611751268.tmp/core.a -L/var/folders/0k/y_zjyrd17bl8k0m9h5pm57b00000gn/T/build3239863014611751268.tmp -lm
/Users/apastoriza/Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/avr-objcopy -O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 /var/folders/0k/y_zjyrd17bl8k0m9h5pm57b00000gn/T/build3239863014611751268.tmp/sketch_nov14a.cpp.elf /var/folders/0k/y_zjyrd17bl8k0m9h5pm57b00000gn/T/build3239863014611751268.tmp/sketch_nov14a.cpp.eep
/Users/apastoriza/Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/avr-objcopy -O ihex -R .eeprom /var/folders/0k/y_zjyrd17bl8k0m9h5pm57b00000gn/T/build3239863014611751268.tmp/sketch_nov14a.cpp.elf /var/folders/0k/y_zjyrd17bl8k0m9h5pm57b00000gn/T/build3239863014611751268.tmp/sketch_nov14a.cpp.hex

Sketch uses 6,484 bytes (20%) of program storage space. Maximum is 32,256 bytes.
Global variables use 1,724 bytes (84%) of dynamic memory, leaving 324 bytes for local variables. Maximum is 2,048 bytes.
Low memory available, stability problems may occur.
/Users/apastoriza/Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/avrdude -C/Users/apastoriza/Applications/Arduino.app/Contents/Java/hardware/tools/avr/etc/avrdude.conf -v -patmega328p -carduino -P/dev/tty.usbmodem1411 -b115200 -D -Uflash:w:/var/folders/0k/y_zjyrd17bl8k0m9h5pm57b00000gn/T/build3239863014611751268.tmp/sketch_nov14a.cpp.hex:i

avrdude: Version 6.0.1, compiled on Jan 15 2015 at 12:42:51
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "/Users/apastoriza/Applications/Arduino.app/Contents/Java/hardware/tools/avr/etc/avrdude.conf"
         User configuration file is "/Users/apastoriza/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : /dev/tty.usbmodem1411
         Using Programmer              : arduino
         Overriding Baud Rate          : 115200
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00

avrdude done.  Thank you.

Problem uploading to board.  See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.



HardwareSerial.h:
Code:
#ifndef HardwareSerial_h
#define HardwareSerial_h

#include <inttypes.h>

#include "Stream.h"

// Define constants and variables for buffering incoming serial data.  We're
// using a ring buffer (I think), in which head is the index of the location
// to which to write the next incoming character and tail is the index of the
// location from which to read.
// NOTE: a "power of 2" buffer size is reccomended to dramatically
//       optimize all the modulo operations for ring buffers.
#if !(defined(SERIAL_TX_BUFFER_SIZE) && defined(SERIAL_RX_BUFFER_SIZE))
#if (RAMEND < 1000)
#define SERIAL_TX_BUFFER_SIZE 192
#define SERIAL_RX_BUFFER_SIZE 192
#else
#define SERIAL_TX_BUFFER_SIZE 256
#define SERIAL_RX_BUFFER_SIZE 256
#endif
#endif
#if (SERIAL_TX_BUFFER_SIZE>256)
typedef uint16_t tx_buffer_index_t;
#else
typedef uint8_t tx_buffer_index_t;
#endif
#if  (SERIAL_RX_BUFFER_SIZE>256)
typedef uint16_t rx_buffer_index_t;
#else
typedef uint8_t rx_buffer_index_t;
#endif

// Define config for Serial.begin(baud, config);
#define SERIAL_5N1 0x00
#define SERIAL_6N1 0x02
#define SERIAL_7N1 0x04
#define SERIAL_8N1 0x06
#define SERIAL_5N2 0x08
#define SERIAL_6N2 0x0A
#define SERIAL_7N2 0x0C
#define SERIAL_8N2 0x0E
#define SERIAL_5E1 0x20
#define SERIAL_6E1 0x22
#define SERIAL_7E1 0x24
#define SERIAL_8E1 0x26
#define SERIAL_5E2 0x28
#define SERIAL_6E2 0x2A
#define SERIAL_7E2 0x2C
#define SERIAL_8E2 0x2E
#define SERIAL_5O1 0x30
#define SERIAL_6O1 0x32
#define SERIAL_7O1 0x34
#define SERIAL_8O1 0x36
#define SERIAL_5O2 0x38
#define SERIAL_6O2 0x3A
#define SERIAL_7O2 0x3C
#define SERIAL_8O2 0x3E

class HardwareSerial : public Stream
{
  protected:
    volatile uint8_t * const _ubrrh;
    volatile uint8_t * const _ubrrl;
    volatile uint8_t * const _ucsra;
    volatile uint8_t * const _ucsrb;
    volatile uint8_t * const _ucsrc;
    volatile uint8_t * const _udr;
    // Has any byte been written to the UART since begin()
    bool _written;

    volatile rx_buffer_index_t _rx_buffer_head;
    volatile rx_buffer_index_t _rx_buffer_tail;
    volatile tx_buffer_index_t _tx_buffer_head;
    volatile tx_buffer_index_t _tx_buffer_tail;

    // Don't put any members after these buffers, since only the first
    // 32 bytes of this struct can be accessed quickly using the ldd
    // instruction.
    unsigned char _rx_buffer[SERIAL_RX_BUFFER_SIZE];
    unsigned char _tx_buffer[SERIAL_TX_BUFFER_SIZE];

  public:
    inline HardwareSerial(
      volatile uint8_t *ubrrh, volatile uint8_t *ubrrl,
      volatile uint8_t *ucsra, volatile uint8_t *ucsrb,
      volatile uint8_t *ucsrc, volatile uint8_t *udr);
    void begin(unsigned long baud) { begin(baud, SERIAL_8N1); }
    void begin(unsigned long, uint8_t);
    void end();
    virtual int available(void);
    virtual int peek(void);
    virtual int read(void);
    int availableForWrite(void);
    virtual void flush(void);
    virtual size_t write(uint8_t);
    inline size_t write(unsigned long n) { return write((uint8_t)n); }
    inline size_t write(long n) { return write((uint8_t)n); }
    inline size_t write(unsigned int n) { return write((uint8_t)n); }
    inline size_t write(int n) { return write((uint8_t)n); }
    using Print::write; // pull in write(str) and write(buf, size) from Print
    operator bool() { return true; }

    // Interrupt handlers - Not intended to be called externally
    inline void _rx_complete_irq(void);
    void _tx_udr_empty_irq(void);
};

#if defined(UBRRH) || defined(UBRR0H)
  extern HardwareSerial Serial;
  #define HAVE_HWSERIAL0
#endif
#if defined(UBRR1H)
  extern HardwareSerial Serial1;
  #define HAVE_HWSERIAL1
#endif
#if defined(UBRR2H)
  extern HardwareSerial Serial2;
  #define HAVE_HWSERIAL2
#endif
#if defined(UBRR3H)
  extern HardwareSerial Serial3;
  #define HAVE_HWSERIAL3
#endif

extern void serialEventRun(void) __attribute__((weak));

#endif



Top
 Profile  
 
 Post subject: Re: Geolocation Tracker (GPRS + GPS) con SIM908 en Arduino U
PostPosted: Tue Nov 17, 2015 8:47 am 

Joined: Mon Sep 28, 2009 12:06 pm
Posts: 11366
Hola apastoriza:

Mira este post, ahí damos más información sobre éste modulo:

viewtopic.php?f=19&t=5946

Básicamente estás intentado programar un micro que no está en la PCB. Con este Shield puedes trabajar de 2 modos. Como Gateway (controlas el módulo desde terminal) o como Arduino Master (el arduino manda los comandos al módulo).

Para programar el arduino. Tienens que insertarlo en su zócalo y quitar los jumpers de selección de serial. Una vez programado puedes poner los jumper en modo arduino para que controle el módulo.

Saludos.


Top
 Profile  
 
 Post subject: Re: Geolocation Tracker (GPRS + GPS) con SIM908 en Arduino U
PostPosted: Tue Nov 17, 2015 10:42 am 

Joined: Mon Nov 16, 2015 11:16 am
Posts: 2
Ha funcionado. Muchas gracias.


Top
 Profile  
 
 Post subject: Re: Geolocation Tracker (GPRS + GPS) con SIM908 en Arduino U
PostPosted: Wed Nov 18, 2015 8:32 am 

Joined: Mon Sep 28, 2009 12:06 pm
Posts: 11366
Gracias a ti.
Saludos.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post a new topicPost a reply Page 1 of 1   [ 4 posts ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
cron


Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Libelium theme based on 610nm Style by Daniel St. Jules of http://www.gamexe.net


© Libelium Comunicaciones Distribuidas S.L. | Terms of use.