i have a little linux server running debian and OMV, does anyone know, is it possible to connect a arduino-uno board to the server (USB) and make some kind of USB->LAN LAN-Arduino-IDE ?
I need to program the arduino sitting in another room so any ideas howto?
There must be some kind of virtuel-USB Port?
Not quite what you're asking for but this is what I use:
It's a TFTP bootloader for uploading sketches to the Arduino over Ethernet. The difference is that instead of your:
Arduino IDE->LAN->USB->Arduino Uno
it's:
TFTP program on your computer->LAN->W5x00->Arduino Uno
The W5x00(W5100, W5200, W5500) are the very common Ethernet controllers used in the Arduino Ethernet shields and also available as modules. Probably the trickiest part of it is that instead of being able to upload directly from the Arduino IDE you will compile your sketch to a .hex file(Sketch > Export compiled binary), convert the .hex file to .bin using the avr-objcopy program included with the Arduino IDE, then use any TFTP program to upload the .bin file to the IP address of your Arduino Uno.
I also remember someone posting on the Arduino Developers mailing list about AVRDUDE having some kind of a remote port functionality but I've never heard of anyone using it so I don't know how difficult that would be to implement.
I find it really convenient to be able to program any of my network connected Arduino boards in place.
Another simple solution: Run the Arduino IDE on your server and take the X server display to your local machine. This way you can program on your workstation and the Arduino IDE access the Arduino locally over USB.
thats also a good idea! but i dont have (&want) X on my server, the main drive would be too small (flash-drive).
i think, if the "press-reset" works over ethernet too, it would be the right thing!
mega-hz:
i think, if the "press-reset" works over ethernet too, it would be the right thing!
Can you explain what you mean by this?
With Ariadne you must tell the Arduino Uno to do a watchdog reset just before you start the TFTP upload. Although most bootloaders(e.g. Optiboot) are only activated for upload after a hardware reset, Ariadne allows upload after a hard or soft reset so that you can activate the bootloader remotely without need for extra hardware.
The remote desktop sort of solution would work just the same as a normal upload. The USB-serial chip on the Arduino Uno does a hard reset of the board when the serial port used for the upload is opened by AVRDUDE.
well,, that sounds good!
I must misunderstoud when reading about Ariadne, i will try it soon.
Normal Ethernet funktion after upload still works i guess, right?
Yes, you can use the W5x00 as usual, it's connected just as a normal Ethernet shield would be. When Ariadne first came out they didn't have the watchdog reset working, so there's a Hackaday article that says you have to manually press the reset button(which pretty much defeats the whole point of the thing) but that was fixed years ago. You just have to make sure to always add some code to every sketch you upload to accept some kind of a command over Ethernet to do the reset. The way you want to implement that probably depends on how you're using the W5x00 during normal operation, for example, I'm using a specialized authenticated TCP communications protocol to communicate with the automation software running on my computer so that's how I send the command to my Arduinos to trigger the reset. I have a batch file that converts the most recently created .hex file in the build folder, sends the reset command, then starts the TFTP upload so it's almost as easy as a normal upload over USB. There is an example sketch with the NetReset library included with Ariadne that demonstrates another system of doing the reset but I haven't tried it.
I finally burnt the ariadne bootloader w5100.
After reset led13 is flashing, so far so good.
But i cant get a tftp running to connect, using windows 10-64.
Can you help me? The EEPROM Settings i changed a the ports are forwarded in my fritz!box.
mega-hz:
maybe there is a simple batch-file to upload with tftp over ethernet?
I've attached mine(EDIT: the forum wouldn't allow me to attach as .bat so I had to add .txt extension so you will need to rename the file after downloading). It's not quite so simple and is somewhat specific to my system so I don't know if it will be helpful to you but maybe you can find some useful parts in it. The way it works is:
I use the Arduino IDE to compile the sketch I want to upload.
I run the batch file with the fourth octet of the IP address of the Arduino I want to upload to as a command line parameter. The first three octets are always the same on my system so I have those hardcoded in the batch file.
The batch file locates the newest build folder and converts the .hex file to .bin.
The batch file prompts the user for confirmation of the upload so you can be sure you're uploading the right sketch. If you accidentally upload a sketch that doesn't have code to receive the reset command that's a problem because then you have to manually reset the Arduino to do the next upload.
The batch file causes a program named EventGhost I have running on my computer to send the reset command via TCP to the target Arduino using the communications protocol of the TCPEvents or Network Event Sender plugins of EventGhost and the EtherEvent Arduino library.
The batch file starts the TFTP upload.
The TFTP command I use is pretty simple, for example:
tftp -i 192.168.69.100 PUT upload.bin
I would check to be sure the network configuration you wrote to EEPROM is correct. The MAC address can be anything you like but it does need to be unique on your network.
mega-hz:
on arduino ide (1.6.5) i get an error when selecting Board Arduino Uno (Ariadne Bootloader, W5100)
and uploading some sketch:
Fehlender Konfigurationsparameter 'upload.tool'
What is that upload tool?
upload.tool is a property in boards.txt. There are actually two different boards.txt files in the Ariadne project to make it compatible with Arduino IDE 1.0.x and 1.6.x, because different folder structure of hardware packages are required depending on the IDE version. The boards.txt for 1.6.x(located at {sketchbook folder}/hardware/ariadne/avr/boards.txt) does have an upload.tool property. The boards.txt for 1.0.x(located at {sketchbook folder}/hardware/ariadne/boards.txt) does not. This makes me think something might be wrong with your installation.
I'm currently using a Raspberry that is close to my arduino's to program them, and the develeopment station is on my LAN. Please note i do all my coding on a remote machine, using vim, so this may not reflect your situation.
I have used 'inotool' on the raspberry in the past (really good for motivation of writing code that compiles first time), but some time ago compatibility with Arduino IDE >1.5 broke, so I have to go back to some other ways.
Inotool used to be my go-to tool to use, althouhg it's just a replacement for some simple manual work, i really love it.
My workaround for the slow compiling on raspberry also gave me a workaround for the broken ino.
My workaround;
create a complete code tree on the development station
compile code
scp the entire tree to the raspberry (optionally, the hex file only)
run the remote command (via ino) to upload the code
All the above is in a shell script
when serial console is needed, i can access this from the raspberry
Lately, for one project, i've started using platformio, and I must say it's convenient, and I like their features, including remote upload. Downside; remote upload and remote serial monitor are limited in the free version.
after long time of trying to get that ariadne bootloader getting running i give up.
I can't get any connections and i also can't flash over usb anymore, so i decided to put back the normal bootloader and to take care of the functions of the program.
The next step was including the can-bus to the webserver, therefore i had to make some changes on the elecfreak-Can-Bus-Shield, because the CS was hardwired to D10 wich is also the CS of the Ethernet-Shield.
The Can-Bus Shield now has CS D9.
Including the mcp-can library makes the system don't run anymore, too less memory!
I tried to free memory on all edges but as soon as the website is going to be loaded of the sd-card it stopps.
Because there will be much more of coding it never would fit into an Arduino-Uno.
So my idea: i will take two Arduinos, connecting them together over I2C i think.
I have to try I2C first and hope there is still enough mem for that.
If not, maybe i'll try it with SPI or get a Mega.
For the remote flashing i will install X on my Server and connect the Arduino('s) over USB.
Does anybody know the difference of mem-usage for taking the website of the sd or code the html-commands in the sketch? I think it would be similar?
That would indicate the Ethernet controller is not correctly connected to your Arduino. It's a quirk of the bootloader that it only works for USB upload with the Ethernet controller connected. That's something I plan to fix eventually.
Maybe there is no need for 2 Arduinos!
I just tryed a ESP8266 NODEMCU with 80Mhz and 4MB Flash!
Putting this thin on a breadboard-shield i can use my stack of shield with that ESP8266 !
It should have much enough mem and it is much faster!
Just tried a simple webserver and it runs very stable and fast!
I am getting new Ideas for Arduino Shields again... :o
How about a ESP8266 on a shield as substitiute for an arduino?...