Arduino Uno R3 + Lora GPS shield trying to connect to TTN

Hello. I am trying to connect my Arduino Uno r3 to a Dragino Lora/GPS shield and I am getting this error. I will include the error and code below, but I am just a beginner so I'm not sure why I am getting this error and how to fix it. If you know, please help me.

c:\Users\abrah\OneDrive\Documents\Arduino\libraries\MCCI_LoRaWAN_LMIC_library\src\hal\getpinmap_thisboard.cpp: In function 'const Arduino_LMIC::HalPinmap_t* Arduino_LMIC::GetPinmap_ThisBoard()':
c:\Users\abrah\OneDrive\Documents\Arduino\libraries\MCCI_LoRaWAN_LMIC_library\src\hal\getpinmap_thisboard.cpp:71:72: note: #pragma message: Board not supported -- use an explicit pinmap
         #pragma message("Board not supported -- use an explicit pinmap")
                                                                        ^
Sketch uses 29940 bytes (92%) of program storage space. Maximum is 32256 bytes.
Global variables use 1745 bytes (85%) of dynamic memory, leaving 303 bytes for local variables. Maximum is 2048 bytes.
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x12
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x12
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x12
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x12
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x12
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x12
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x12
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x12
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x12
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x12
Failed uploading: uploading error: exit status 1

sensor-nodes/dragino_lora_arduino_shield/Arduino_Sketch_dragino_lora/Arduino_Sketch_dragino_lora.ino at master ยท tum-gis/sensor-nodes ยท GitHub

The person who made the code said they were using a temperature and humidity sensor. I'm not sure how to remove that to add my sensors or if it is a multipurpose variable that can fit other types of data as well. If you have an answer to either of my questions, thank you.

Hi @johan-eltuc. I'm going to ask you to post the full verbose output from an upload attempt.


:exclamation: This procedure is not intended to solve the problem. The purpose is to gather more information.


Please do this:

  1. Select File > Preferences... (or Arduino IDE > Settings... for macOS users) from the Arduino IDE menus.
    The "Preferences" dialog will open.
  2. Uncheck the box next to Show verbose output during: โ˜‘ compilation in the "Preferences" dialog.
  3. Check the box next to Show verbose output during: โ˜ upload.
  4. Click the "OK" button.
  5. Attempt an upload, as you did before.
  6. Wait for the upload to fail.
  7. You will see a "Upload error: ..." notification at the bottom right corner of the Arduino IDE window. Click the "COPY ERROR MESSAGES" button on that notification.
  8. Open a forum reply here by clicking the "Reply" button.
  9. Click the <CODE/> icon on the post composer toolbar.
    This will add the forum's code block markup (```) to your reply to make sure the error messages are correctly formatted.
    Code block icon on toolbar
  10. Press the Ctrl+V keyboard shortcut (Command+V for macOS users).
    This will paste the error output from the upload into the code block.
  11. Move the cursor outside of the code block markup before you add any additional text to your reply.
  12. Click the "Reply" button to post the output.

Try uploading the basic LED blink sketch, what happens ?

This is a warning, not an error.

The error your getting is that your Arduino UNO is not being recognised.

But given that the program your trying to load is using 85% of dynamic memory it would be a good idea to use an Arduino with more memory anyway.

c:\Users\abrah\OneDrive\Documents\Arduino\libraries\MCCI_LoRaWAN_LMIC_library\src\hal\getpinmap_thisboard.cpp: In function 'const Arduino_LMIC::HalPinmap_t* Arduino_LMIC::GetPinmap_ThisBoard()':
c:\Users\abrah\OneDrive\Documents\Arduino\libraries\MCCI_LoRaWAN_LMIC_library\src\hal\getpinmap_thisboard.cpp:71:72: note: #pragma message: Board not supported -- use an explicit pinmap
         #pragma message("Board not supported -- use an explicit pinmap")
                                                                        ^
Sketch uses 29940 bytes (92%) of program storage space. Maximum is 32256 bytes.
Global variables use 1745 bytes (85%) of dynamic memory, leaving 303 bytes for local variables. Maximum is 2048 bytes.
"C:\Users\abrah\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/bin/avrdude" "-CC:\Users\abrah\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf" -v -V -patmega328p -carduino "-PCOM7" -b115200 -D "-Uflash:w:C:\Users\abrah\AppData\Local\Temp\arduino\sketches\D00A5AE44A10A73B6D314B8405E76AE0/sketch_dec28a.ino.hex:i"

avrdude: Version 6.3-20190619
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "C:\Users\abrah\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf"

         Using Port                    : COM7
         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=0x1b
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x1b
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x1b
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x1b
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x1b
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x1b
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x1b
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x1b
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x1b
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x1b

avrdude done.  Thank you.

Failed uploading: uploading error: exit status 1

Is this what you mean? By the way, thank you. I liked the longer replies to the errors I keep getting. I also liked seeing the port and baud rate displayed. I think I will keep it this way in the future.

I think I understand a bit more about the problem. I believe one of those errors is in part due to the fact I don't have a wifi module or esp8266 module connected to my Arduino. Am I correct?

Nope.

Connecting a LoRaWAN node to TTN has nothing to do with WiFi modules or ESP8266s.

What happened when you tried the suggestion in post #3 ?

If you mean did the code work or not, it did and there were no error messages. That was like a checkup right?

It was.

The 'errors' you posted suggested there was an upload problem with the UNO.

Were the IDE settings you used for the LoRaWAN sketch exactly the same as for the blink sketch ?

I haven't tested anything in between the 2 projects, nor have I changed the settings. I am still browsing the internet for a solution

Maybe post the code that apepars to cause the problem ?

It is in the link I attached to the first message.

It is possible for a short or external circuitry connected to the Arduino board to interfere with the upload process, causing this type of upload error.

Make sure the board is not sitting on anything conductive that could short the contacts on the bottom of the board. Make sure there isn't any conductive debris (e.g., strands of wire or component leads) on the board or on the surface the board is sitting on.

If you have a shield or any external circuitry or components connected to your Arduino board, try this experiment:

  1. Disconnect the USB cable of the Arduino board from your computer.
  2. Disconnect any shields, modules, external circuitry, etc. from your board.
  3. Connect the Arduino board to your computer with a USB cable.

Now try uploading a sketch to the board again. Does the upload succeed?

This experiment will determine whether the upload error was caused by interference from your external circuitry. If so, you can then focus your attention on identifying the specific problem with the circuit and resolving it.

That sketch uploads onto a UNO here.

However the program needs a fair bit more memory than a UNO has.

I doubt even if you solve the loading issue you have whether the program would work or be reliable.

Does anyone have an idea as to why the code itself doesn't work? Because the memory problem with the arduino is a separate matter. If anyone still has advice, please share it.

How do know the 'code' does not work ?

The error you have reported getting is that the program wont upload in the first place, so there no way of knowing if the 'code' works or not.

What I mean is the error with the problem compiling. That is all I'm asking

By "error with the problem compiling", do you mean this:

It is not strictly correct to refer to this as an error. An error is something that causes compilation to fail. The content of the message does give the impression that this might indicate a critical problem. However, the author of the code chose to make this an informational message when they could have just as easily made it an error or warning so I'm not so sure.

The documentation gives the impression that it should be compatible with UNO R3:

https://github.com/mcci-catena/arduino-lmic#supported-hardware

So my recommendation is to focus your attention on finding a fix for the upload failure as that is a complete show-stopper for all Arduino work. After that is fixed, you can check to see whether the program works. If it works then you can ignore the message. The "Board not supported" message is completely unrelated to the upload error.

Did you try what I suggested in post #13? If so, what was the result?

As I said in post #4 that is a warning, not an error. If you have provided the pin numbers and the code linked to does as in below;

// Pin mapping of the LoRa transceiver. Please make sure that DIO1 is connected
// to Arduino Digital Pin 6 using an external wire. DIO2 is left unconnected
// (it is only required, if FSK modulation instead of LoRa would be used).
const lmic_pinmap lmic_pins = {
    .nss = 10,
    .rxtx = LMIC_UNUSED_PIN,
    .rst = 9,
    .dio = {2, 6, 7},
};

Then ignore the warning.

The library does have pre-defined pin maps for some Arduinos, but not an UNO, so it issues a warning.

Given that the UNO is really short on memory, for the library, that may be the reason there is no pre-defined pin map. Also UNO is 5V logic and LoRa devices are 3.3V Logic so its not a normal combination.

1 Like