Hi Folks,
Have been banging my head against the wall for a while now to try and make progress with a Things Node but have run out of ideas so hoping one of you clever folks can point me in the right direction.
Initially I was using Arduino on a linux (ubuntu 18.04) box as that’s my main dev system. Initially things seemed to go fine and I could run the DeviceInfo sketch. However when I tried to upload the Basic sketch to connect it to my gateway it seemed to brick with a magenta light.
I tried to follow the reset process but it was pretty much impossible on Linux to catch it while the /dev/ttyACM0 device existed (it comes and goes in a few seconds) before dmesg shows the USB bus as being reset.
So I went to a windows system instead (as that’s a tad less dynamic in its port creation) and after a few tries I managed to reload it with an empty sketch, and then reload the DeviceInfo sketch.
However, although that now runs, and I can get the console output it doesn’t show any of the monitor values that it did first time around. I now get:
> 17:08:27.538 -> Device Information
> 17:08:27.538 ->
> 17:08:27.572 -> EUI: 0004A30B00EAF2AC
> 17:08:27.572 -> Battery: 3294
> 17:08:27.572 -> AppEUI: 0000000000000000
> 17:08:27.605 -> DevEUI: 0004A30B00EAF2AC
> 17:08:27.605 -> Data Rate: 0
> 17:08:27.605 -> RX Delay 1: 1000
> 17:08:27.605 -> RX Delay 2: 2000
> 17:08:27.605 ->
> 17:08:27.605 -> Use the EUI to register the device for OTAA
> 17:08:27.605 -> -------------------------------------------
> 17:08:27.605 ->
whereas in the screen dump I took earlier to save the EUI I was also getting values such as “Light”, Temperature", etc.
The versions of TheThings libraries are the same on both Windows and Linux (TTNetwork 2.6.0, TTNode 2.0.9).
If I connect it back to my Linux system it will now connect on the USB port, and I can see the same shortened list of values.
However if i try to re-upload even an empty sketch on the Linux system I get now errors (error log included below).
I can (if I retry enough times) reset it and load an empty sketch from my Windows system and then get back to the (truncated) DeviceInfo output.
Any thoughts on how to recover from here ?
Thanks
Phil
— Arduino error log ----
Arduino: 1.8.13 (Linux), Board: "SparkFun Pro Micro, ATmega32U4 (3.3V, 8 MHz)"
Sketch uses 3460 bytes (12%) of program storage space. Maximum is 28672 bytes.
Global variables use 149 bytes (5%) of dynamic memory, leaving 2411 bytes for local variables. Maximum is 2560 bytes.
Forcing reset using 1200bps open/close on port /dev/ttyACM0
PORTS {/dev/ttyACM0, /dev/ttyS4, } / {/dev/ttyS4, } => {}
PORTS {/dev/ttyS4, } / {/dev/ttyACM0, /dev/ttyS4, } => {/dev/ttyACM0, }
Found upload port: /dev/ttyACM0
/opt/arduino-1.8.13/hardware/tools/avr/bin/avrdude -C/opt/arduino-1.8.13/hardware/tools/avr/etc/avrdude.conf -v -patmega32u4 -cavr109 -P/dev/ttyACM0 -b57600 -D -Uflash:w:/tmp/arduino_build_842830/sketch_aug14b.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 "/opt/arduino-1.8.13/hardware/tools/avr/etc/avrdude.conf"
User configuration file is "/home/phil/.avrduderc"
User configuration file does not exist or is not a regular file, skipping
Using Port : /dev/ttyACM0
Using Programmer : avr109
Overriding Baud Rate : 57600
AVR Part : ATmega32U4
Chip Erase delay : 9000 us
PAGEL : PD7
BS2 : PA0
RESET disposition : dedicated
RETRY pulse : SCK
serial program mode : yes
parallel program mode : yes
Timeout : 200
StabDelay : 100
CmdexeDelay : 25
SyncLoops : 32
ByteDelay : 0
PollIndex : 3
PollValue : 0x53
Memory Detail :
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
eeprom 65 20 4 0 no 1024 4 0 9000 9000 0x00 0x00
flash 65 6 128 0 yes 32768 128 256 4500 4500 0x00 0x00
lfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
hfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
efuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
lock 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00
signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00
Programmer Type : butterfly
Description : Atmel AppNote AVR109 Boot Loader
Connecting to programmer: .
Found programmer: Id = "CATERIN"; type = S
.?; No Hardware Version given.
Programmer supports auto addr increment.
Programmer supports buffered memory access with buffersize=128 bytes.
Programmer supports the following devices:
Device code: 0x44
avrdude: devcode selected: 0x44
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude: Device signature = 0x1e9587 (probably m32u4)
avrdude: reading input file "/tmp/arduino_build_842830/sketch_aug14b.ino.hex"
avrdude: writing flash (3460 bytes):
Writing | ##########################avrdude: error: programmer did not respond to command: set addr
################the selected serial port ################ does not exist or your board is not connected
####avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: write block
## ***failed;
***failed;
***failed;
***failed;
<< repeats many times>>
avrdude: Error: butterfly programmer uses avr_write_page() but does not
provide a cmd() method.
*** page 127 (addresses 0x0000 - 0x007f) failed to write
***failed;
***failed;
***failed;
<< repeats many times>>
# | 100% 0.43s
avrdude: 3460 bytes of flash written
avrdude: verifying flash memory against /tmp/arduino_build_175565/sketch_aug14c.ino.hex:
avrdude: load data flash data from input file /tmp/arduino_build_175565/sketch_aug14c.ino.hex:
avrdude: input file /tmp/arduino_build_175565/sketch_aug14c.ino.hex contains 3460 bytes
avrdude: reading on-chip flash data:
Reading | avrdude: error: programmer did not respond to command: set addr
#avrdude: error: programmer did not respond to command: set addr
##avrdude: error: programmer did not respond to command: set addr
##avrdude: error: programmer did not respond to command: set addr
##avrdude: error: programmer did not respond to command: set addr
#avrdude: error: programmer did not respond to command: set addr
##avrdude: error: programmer did not respond to command: set addr
##avrdude: error: programmer did not respond to command: set addr
##avrdude: error: programmer did not respond to command: set addr
##avrdude: error: programmer did not respond to command: set addr
#avrdude: error: programmer did not respond to command: set addr
##avrdude: error: programmer did not respond to command: set addr
##avrdude: error: programmer did not respond to command: set addr
##avrdude: error: programmer did not respond to command: set addr
##avrdude: error: programmer did not respond to command: set addr
#avrdude: error: programmer did not respond to command: set addr
##avrdude: error: programmer did not respond to command: set addr
##avrdude: error: programmer did not respond to command: set addr
##avrdude: error: programmer did not respond to command: set addr
#avrdude: error: programmer did not respond to command: set addr
##avrdude: error: programmer did not respond to command: set addr
##avrdude: error: programmer did not respond to command: set addr
##avrdude: error: programmer did not respond to command: set addr
##avrdude: error: programmer did not respond to command: set addr
#avrdude: error: programmer did not respond to command: set addr
##avrdude: error: programmer did not respond to command: set addr
##avrdude: error: programmer did not respond to command: set addr
##avrdude: error: programmer did not respond to command: set addr
## | 100% 0.04s
avrdude: verifying ...
avrdude: verification error, first mismatch at byte 0x0000
0x45 != 0x0c
avrdude: verification error; content mismatch
avrdude: error: programmer did not respond to command: leave prog mode
avrdude: error: programmer did not respond to command: exit bootloader
avrdude done. Thank you.