Wiki

 

Program the daughter board via Dragino

For the Dragino, we are using avrdude to upload the program (.hex format) to the daughter board. You can use the Arduino IDE to generate the hex file. The Arduino IDE will generate the hex file in a temporary directory. In the Arduino IDE press the "Shift key" as you click the "compile" command button. The Arduino IDE will automatically generate the .hex file for you. NOTE that the .hex file will automatically be cleared when you close the Arduino sketch.

Arduino IDE.jpg

You can find this hex file in your USER_TEMP_LATEST_build_directoy. Below is an example.

Softserial.jpg

To transfer this file to the daughter board, we can run a Windows TFTP server (tftpd32) and point the TFTP directory to where the hex file is and the IP of your server computer. You can download tftpd32 here

Tftpd32.jpg

Select the daughter board .hex file path and select you server PC's IP address.
Now we need to set up Dragino so it will automatically get the hex file and program the daughter board.
In SSH access to Dragino, run:

 root@dragino-751aff:~# wget http://svn.dragino.com/scripts/upgrade_avr.sh
 // get the upgrade_avr script from Dragino SVN server
 root@dragino-751aff:~#sh upgrade_avr.sh YOUR_HEX_FILE_NAME YOUR_TFTP_SERVER IP


The script will now transfer the file from your TFTP server and upload to the daughter board.
Note: You can modify the upgrade.avr.sh for different configurations.