TFTP Bootloader install on Nano-clone

Hello

first, sorry if is my english not perfect
but i hope any understand what i mean

i would like burn a TFTP-Bootloader on my arduino-nano 3.0 clone, he has an Atmega328p

i would like use the system with "Arduino as ISP"

My programmer is an Arduino Uno 3.0 with Atmega328p

i have some problems to find the right step by step howto

i use also the Arduino 1.8.5 IDE

i would like try it with arduino-tftpboot-beta-003

My problems start to add the right libraries...
if i add in sketch-folder where i can see in my arduino-settings ... no find arduino IDE
if i add it where installed arduino on D:\Program Files (x86)\Arduino
then i can only see the sketch samples but i can not find the arduino-tftpboot-beta-003 in my tools==>Board===>

i'm sure i do anything total wrong

can anybody help me step by step ?

best regards

Sepp

edit.
i try it now with Ariadne

now i get it in my Arduino IDE
i use it Arduino as ISp to burn the bootloader

if i burn it then i get the message
"Bootloader already burned"

BUT in the serial output i get
***failed;
avrdude: WARNING: invalid value for unused bits in fuse "efuse", should be set to 1 according to datasheet
This behaviour is deprecated and will result in an error in future version
You probably want to use 0xfd instead of 0x05 (double check with your datasheet first).

what i do wrong?

sepp01:
BUT in the serial output i get
***failed;
avrdude: WARNING: invalid value for unused bits in fuse “efuse”, should be set to 1 according to datasheet
This behaviour is deprecated and will result in an error in future version
You probably want to use 0xfd instead of 0x05 (double check with your datasheet first).

what i do wrong?

Nothing. That warning is correct and expected. It does not indicate any problem at all. Just ignore it.

First thanks a lot for help

ok i understand i have to ignore that

i try now this TFTPD https://github.com/per1234/Ariadne-Bootloader

i use also Arduino IDE and i used "Boards Manager Installation" after there HowTo

Burning the Bootloader all looks fine but i not understand the section Netwerksettings...
i understand why i have to change and i know also what i have to write on IP, Gatewayx and subnetmask
But i nót understand how i have to upload this file...

If i uploeaded like any sketch then i think will be overwritet if i upload after any other sketch
and i see this WriteNetworkesstings-sketch use any other Address on EEprom but i can not see how i must install this

only upload?
or only change the settings, safe and then use it the bootloader

i can also not find the file on my filesystem

edit: i changed now to ariadne bootloader!!!

sepp01:
But i nót understand how i have to upload this file...

  • Connect the Arduino as ISP programmer to your Nano
  • Tools > Board > ATmega328P 16MHz, 8 Analog Inputs, Ariadne Bootloader
  • Tools > Programmer > Arduino As ISP
  • Tools > Burn Bootloader
  • Wait for the Burn Bootloader process to finish successfully
  • Disconnect the Arduino as ISP from your Nano
  • Connect the W5100 Ethernet controller to your Nano (this is necessary even when you are uploading over USB).
  • Connect your Nano to your computer using a USB cable
  • File > Examples > NetEEPROM > WriteNetworkSettings
  • Edit the WriteNetworkSettings sketch according to your network configuration
  • Tools > Port > select the COM port of your Nano
  • Sketch > Upload

sepp01:
If i uploeaded like any sketch then i think will be overwritet if i upload after any other sketch

No, because it writes the network settings to EEPROM. EEPROM is not overwritten when you do an upload via USB or TFTP. It will be overwritten if you do a Tools > Burn Bootloader or a Sketch > Upload Using Programmer. You do need to make sure that any other sketches don't write to the EEPROM used to store the network configuration settings: 0-26 for network settings and 27-63 for the password used in the EthernetReset library.

wow
very very good and thank you a lot
why i not find this excellent HowTo in Internet..

now i understand also why is not overwriting after i change networksettings

One question more please

I need some different networksettings for different arduino boards
is much more easy for my i safe my changed NetworkSettings but i can not because 1) is write protected and 2) i not find this file and can not change the permissions there
because maybe i installed via
Boards Manager Installation
and i use
Additional Boards Manager URLs: https://per1234.github.io/Ariadne-Bootloader/package_codebendercc_ariadne-bootloader_index.json

pert:
No, because it writes the network settings to EEPROM. EEPROM is not overwritten when you do an upload via USB or TFTP. It will be overwritten if you do a Tools > Burn Bootloader or a Sketch > Upload Using Programmer. You do need to make sure that any other sketches don’t write to the EEPROM used to store the network configuration settings: 0-26 for network settings and 27-63 for the password used in the EthernetReset library.

for my understanding

now iknow how i havte to upload the networksettigs

but what mean ===> “You do need to make sure that any other sketches don’t write to the EEPROM…” ?

if is my arduino already prepare for TFTP and i have upload my networksettings too and later i would be upload a any normal sketch over usb or over tftp … i have to look then too the sketch not use the address from 0 - 63 ?
or can i uploeaded via USB or tftp normal like the samples what i find on

?

i would like only use the TFTP later if my arduino is fix installed in my hardware-system because then i can not move it out easyly…

i think if i have installed a tftp-bootloader then i can use it uSB for upload sketches too?
right?

in my Boards i not find
ATmega328P 16MHz, 8 Analog Inputs, Ariadne Bootloader

i see only that what you see in my attament-pic
but i try now

sepp01:
why i not find this excellent HowTo in Internet..

Well... https://github.com/per1234/Ariadne-Bootloader is actually my repository. I'm not the author of the Ariadne bootloader but I did fork on the recommendation of the bootloader author since I wanted to add Boards Manager support but they were unable to work on Ariadne at that time. In addition to Boards Manager support, I did try to improve the documentation, and I believe I covered most of what I said in my previous reply in the Ariadne readme, but I'm sure it could use some more work. I have a lot more improvements I'd like to make to Ariadne but I've been busy with other projects so I haven't gotten around to it.

sepp01:

  1. is write protected

The Arduino IDE write protects example sketches to prevent people from accidentally making changes to them. You only need to do File > Save As... and save your modified version of the sketch anywhere else you like.

sepp01:
2) i not find this file

You can find the location of any sketch you have open by Sketch > Show sketch folder.

sepp01:
can not change the permissions there

The file attributes are not likely set to read only. It's only the Arduino IDE that considers the sketch read only because it's a library example. You should be able to open the file in a standard text editor and edit it but it's better for you to leave it alone and instead save your own version of the sketch somewhere else.

sepp01:
because maybe i installed via
Boards Manager Installation

Boards Manager does install the hardware package to a strange location on your computer:
On Mac OS X:
/Users/{username}/Library/Arduino15

On Windows:
Arduino IDE 1.6.5r5 and previous:
C:\Users{username}\AppData\Roaming\Arduino15
Arduino IDE 1.6.6 and later:
C:\Users{username}\AppData\Local\Arduino15

On Linux:
/home/{username}/.arduino15 (a.k.a. ~/.arduino15)

You can find the location of your Arduino15 folder at the line following File > Preferences > More preferences can be edited directly in the file.

That folder may be hidden by your OS and I suppose it's possible there are some permissions restrictions on the entire folder imposed by the OS.

sepp01:
but what mean ===> "You do need to make sure that any other sketches don't write to the EEPROM..." ?

if is my arduino already prepare for TFTP and i have upload my networksettings too and later i would be upload a any normal sketch over usb or over tftp ... i have to look then too the sketch not use the address from 0 - 63 ?

Yes, you need to make sure any other sketches don't write to EEPROM addresses 0-63. There is actually a library included with Ariadne named NewEEPROM that automatically avoids those addresses but I think it's easier to just know the addresses to avoid and use the standard EEPROM library instead.

Note that only EEPROM addresses 0-26 are used for the network settings. 27-63 are used by the EthernetReset library to store the reset password but you don't need to use EthernetReset, that's optional. The idea with a password protected reset is that if you expose your Arduino with the Ariadne bootloader to the Internet then anyone could upload a sketch to it. I only have my Arduinos exposed to my local network so security is not a concern for me and I don't use a password and I don't use the EthernetReset library. I just have a simple command I send to my Arduino to trigger the reset.

sepp01:
i think if i have installed a tftp-bootloader then i can use it uSB for upload sketches too?
right?

That's correct, but USB uploads only work if you have the W5100 Ethernet controller connected to your Nano. It's just a quirk of the bootloader that I intend to fix eventually:

i can only say... thank you so much
im happy too that we hae people like you they work on that projects for nothing and help any other with this nice features

i need now only a howto to can programming my sketches with the EEPROM-Addresse what must be free
but that i'm sure can help me some in germany

Thank you so much again

i whisch you a good start in this weeek
Cheers
Sepp

I'm glad if it can be helpful to you. I really like Ariadne because it allows me to upload programs every Arduino in my house that's connected to the network instead of requiring them to be within USB cable's length of my computer

Enjoy!
Per

Hi
sorry i must ask again.
my TFTP Upload no work

i write now my steps and what is happen

1). u write the Ariadne Bootloader at my nano-Clone
2) the LED there blink fast
3) i try it to, upload via USB a other blink Programm for check the On-Board-LED blink#
a) i upload the sketch with arduino IDE and via USB
b) the sketch start works after 15 seconds (before blink the nano fast) and the onboard-LED blink normal (like seconds what i write in my sketch)

  1. i create a other Blink.bin file…with avr-objcopy -O ihex -R .eeprom c:\xxxxx\Blink.ino.elf Blink.cpp.hex
  2. i create the binary with avr-objcopy -I -ihex Blink.cpp.hex -O binaty Blink.bin
  3. i try to upload via TFTP
  4. i reset the nano
  5. i try upload via tftp
    a) tftp -i 192.168.2.58 PUT Blink.bin
    b) nano blink fast
    c) my CMD win-terminal get message TIMEOUT

after that is anything wrong with my normal blink-programm
Remember… i upload before a normal-blink programm there blink the LED 1 second and wait 1 second
this programm work no more after i try upload the new Blink Programm via TFTP

i try it to with a Linux terminal
there i get
tftp 192.168.2.58 69
tftp> mode octet
tftp> trace
Packet tracing on.
tftp> verbose
Verbose mode on.
tftp> put Blink1.bin
putting Blink1.bin to 192.168.2.58:Blink1.bin [octet]
sent WRQ <file=Blink1.bin, mode=octet>
sent WRQ <file=Blink1.bin, mode=octet>
sent WRQ <file=Blink1.bin, mode=octet>
sent WRQ <file=Blink1.bin, mode=octet>
sent WRQ <file=Blink1.bin, mode=octet>
Transfer timed out.

tftp> quit

what i can do?

all works fine now

the problems what i get was the local firewall they block the ports

now i try the next... EthernetReset