Dragonboard410c+Seed 96Boards Sensors Arduino issue

I’m using Dragonboard 410c and trying to follow the instruction; the program with c++ demo is working fine, but the one with Arduino can’t working…It shows can’t find Arduino connection. My console as followed:

Arduino.mk Configuration:

[AUTODETECTED] CURRENT_OS = LINUX
[COMPUTED] ARDMK_DIR = /usr/share/arduino (relative to Common.mk)
[AUTODETECTED] ARDUINO_DIR = /usr/share/arduino
[AUTODETECTED] ARDUINO_VERSION = 105
[DEFAULT] ARDUINO_SKETCHBOOK = /root/sketchbook
[BUNDLED] AVR_TOOLS_DIR = /usr/share/arduino/hardware/tools/avr (in Arduino distribution)
[COMPUTED] ARDUINO_LIB_PATH = /usr/share/arduino/libraries (from ARDUINO_DIR)
[DEFAULT] ARDUINO_CORE_PATH = /usr/share/arduino/hardware/arduino/cores/arduino
[COMPUTED] ARDUINO_VAR_PATH = /usr/share/arduino/hardware/arduino/variants (from ARDUINO_DIR)
[COMPUTED] BOARDS_TXT = /usr/share/arduino/hardware/arduino/boards.txt (from ARDUINO_DIR)
[DEFAULT] USER_LIB_PATH = /root/sketchbook/libraries (in user sketchbook)
[DEFAULT] PRE_BUILD_HOOK = pre-build-hook.sh
[DEFAULT] BOARD_TAG = uno
[COMPUTED] OBJDIR = build-uno (from BOARD_TAG)
[ASSUMED] MONITOR_BAUDRATE = 9600
[DEFAULT] OPTIMIZATION_LEVEL = s
[DEFAULT] MCU_FLAG_NAME = mmcu
[DEFAULT] CFLAGS_STD = -std=gnu99
[COMPUTED] DEVICE_PATH = /dev/tty96B0 (from MONITOR_PORT)
[AUTODETECTED] Size utility: AVR-aware for enhanced output
[COMPUTED] BOOTLOADER_PARENT = /usr/share/arduino/hardware/arduino/bootloaders (from ARDUINO_DIR)
mkdir -p build-uno
make reset
make[1]: Entering directory ‘/root/Starter_Kit_for_96Boards/button_led’
/usr/bin/ard-reset-arduino /dev/tty96B0
make[1]: Leaving directory ‘/root/Starter_Kit_for_96Boards/button_led’
make do_upload
make[1]: Entering directory ‘/root/Starter_Kit_for_96Boards/button_led’
/usr/share/arduino/hardware/tools/avr/…/avrdude -q -V -D -p atmega328p -C /usr/share/arduino/hardware/tools/avr/…/avrdude.conf -c arduino -b 115200 -P /dev/tty96B0
-U flash:w:build-uno/button_led.hex:i
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00

avrdude done. Thank you.

/usr/share/arduino/Arduino.mk:1203: recipe for target ‘do_upload’ failed
make[1]: *** [do_upload] Error 1
make[1]: Leaving directory ‘/root/Starter_Kit_for_96Boards/button_led’
/usr/share/arduino/Arduino.mk:1195: recipe for target ‘upload’ failed
make: *** [upload] Error 2
root@linaro-alip:~/Starter_Kit_for_96Boards/button_led#

It sounds like the Arduino bootloader installed on the AVR might be missing or corrupt.

This is recoverable using the ISP socket (P6) but would requires extra hardware. Do you own an AVR programmer or a standalone Arduino?

I don’t have it… I tried two adapter boards, but the new one has same issue also…
Any instruction I can follow if I get the AVR programmer? Thanks.

Unfortunately some were shipped without their bootloaders programmed (although if you’ve ordered recently it was supposed to have been fixed).

Anyhow…

Once you have a programmer hooked up they can be fixed very easily from the Arduino IDE itself. Sparkfun has a fairly comprehensive guide:

https://learn.sparkfun.com/tutorials/installing-an-arduino-bootloader

1 Like

I’ll receive my programmer today. Hope it would work… I appreciate your help.

I got my AVR board, but it can’t be detect by windows 10. I tried to used unsigned signature to install the driver again; although it looks detected, I stall can’t upload new bootloader…

If you can’t get the programmer working on Win10 then you should be able to plug the programmer into the DB410C and used the Arduino GUI on the Dragonboard itself.

What programmer did you buy?

This is the board I got…( Installing an Arduino Bootloader - learn.sparkfun.com ) It has problem to get COM port# successfully…Although I install the via unsigned signature, it became like following pic under computer management.

@wayneyang2286,
Hello, as I can see your ISP programmer is not installed completely. It says “Unknown device”.
Could it be that the installation of the drivers did not succeeded?
Here as an example (but I can be wrong check what device you ordered) of a page where you can find the “windows drivers” https://www.sparkfun.com/products/9825.

I use Windows 10 with a AVR Programmer attached on pin P6 of the mezzanine and have no problems.
In your situation I would try to reload the drivers.
You should see “libusb-win32 devices” and see the device name. Do not need to attach the mezzanine at that point.
Then, once done I use “Sketch”, “Upload Using Programmer”…

Hey Wayne, I’m a bit puzzled but exactly which programmer you got (the link you posted it to a tutorial and has pictures or more than one type of programmer).

Either way, if Jean-Marc guessed right and you got the Sparkfun Pocket AVR programmer you also need to make sure you select the right type of programmer in the Arduino IDE (should be USBtinyISP but your earlier screenshots show something different).

@danielt
Sorry for confusing… This is the one I got. (https://www.sparkfun.com/products/9825)
I tried from AVR ISP to USBtinyISP…BTW…is there any difference with Board types?
Or the only part I have to select is “Programmer: USBtinylSP” and click “Burn Bootloader”?

@jmjobin
I use the same driver, and install under unsigned signature mode. After I install the driver, the device turn from quotation mark to the one I showed in picture. Would you please share me the device list you have? Also, do I need to select comport, or just select USBtinyISP and burn bootloader?

Finally, I burn the firmware via ubuntu as followed:

wayne@wayne-Inspiron-5537:~$
wayne@wayne-Inspiron-5537:~$ sudo avrdude -b 19200 -c usbtiny -p m328p -v -e -U efuse:w:0x05:m -U hfuse:w:0xD6:m -U lfuse:w:0xFF:m

avrdude: Version 6.0.1, compiled on Oct 21 2013 at 15:55:32
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2009 Joerg Wunsch

     System wide configuration file is "/etc/avrdude.conf"
     User configuration file is "/home/wayne/.avrduderc"
     User configuration file does not exist or is not a regular file, skipping

     Using Port                    : usb
     Using Programmer              : usbtiny
     Overriding Baud Rate          : 19200

avrdude: usbdev_open(): Found USBtinyISP, bus:device: 001:011
AVR Part : ATmega328P
Chip Erase delay : 9000 us
PAGEL : PD7
BS2 : PC2
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  3600  3600 0xff 0xff
       flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
       lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
       hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
       efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
       lock           0     0     0    0 no          1    0      0  4500  4500 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 : USBtiny
     Description     : USBtiny simple USB programmer, http://www.ladyada.net/make/usbtinyisp/

avrdude: programmer operation not supported

avrdude: Using SCK period of 10 usec
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.01s

avrdude: Device signature = 0x1e950f
avrdude: safemode: lfuse reads as FF
avrdude: safemode: hfuse reads as D6
avrdude: safemode: efuse reads as 5
avrdude: erasing chip
avrdude: Using SCK period of 10 usec
avrdude: reading input file “0x05”
avrdude: writing efuse (1 bytes):

Writing | ################################################## | 100% 0.00s

avrdude: 1 bytes of efuse written
avrdude: verifying efuse memory against 0x05:
avrdude: load data efuse data from input file 0x05:
avrdude: input file 0x05 contains 1 bytes
avrdude: reading on-chip efuse data:

Reading | ################################################## | 100% 0.00s

avrdude: verifying …
avrdude: 1 bytes of efuse verified
avrdude: reading input file “0xD6”
avrdude: writing hfuse (1 bytes):

Writing | ################################################## | 100% 0.00s

avrdude: 1 bytes of hfuse written
avrdude: verifying hfuse memory against 0xD6:
avrdude: load data hfuse data from input file 0xD6:
avrdude: input file 0xD6 contains 1 bytes
avrdude: reading on-chip hfuse data:

Reading | ################################################## | 100% 0.00s

avrdude: verifying …
avrdude: 1 bytes of hfuse verified
avrdude: reading input file “0xFF”
avrdude: writing lfuse (1 bytes):

Writing | ################################################## | 100% 0.00s

avrdude: 1 bytes of lfuse written
avrdude: verifying lfuse memory against 0xFF:
avrdude: load data lfuse data from input file 0xFF:
avrdude: input file 0xFF contains 1 bytes
avrdude: reading on-chip lfuse data:

Reading | ################################################## | 100% 0.00s

avrdude: verifying …
avrdude: 1 bytes of lfuse verified

avrdude: safemode: lfuse reads as FF
avrdude: safemode: hfuse reads as D6
avrdude: safemode: efuse reads as 5
avrdude: safemode: Fuses OK (H:05, E:D6, L:FF)

avrdude done. Thank you.

wayne@wayne-Inspiron-5537:~$

-----------------------------but---------------------------------

Although I burn bootloader, upload Arduino isn’t working either…

clot@linaro-alip:~/Starter_Kit_for_96Boards/button_led# stty -F /dev/tty96B0 hupc
root@linaro-alip:~/Starter_Kit_for_96Boards/button_led#
root@linaro-alip:~/Starter_Kit_for_96Boards/button_led# -hupcl
root@linaro-alip:~/Starter_Kit_for_96Boards/button_led# stty -F /dev/tty96B0 hupc
root@linaro-alip:~/Starter_Kit_for_96Boards/button_led#
root@linaro-alip:~/Starter_Kit_for_96Boards/button_led# make upload reset_stty

Arduino.mk Configuration:

  • [AUTODETECTED] CURRENT_OS = LINUX s/button_led# stty -F /dev/tty96B0 -hup
  • [COMPUTED] ARDMK_DIR = /usr/share/arduino (relative to Common.mk)
  • [AUTODETECTED] ARDUINO_DIR = /usr/share/arduino
  • [AUTODETECTED] ARDUINO_VERSION = 105
  • [DEFAULT] ARDUINO_SKETCHBOOK = /root/sketchbook
  • [BUNDLED] AVR_TOOLS_DIR = /usr/share/arduino/hardware/tools/avr (in Arduino distribution)
  • [COMPUTED] ARDUINO_LIB_PATH = /usr/share/arduino/libraries (from ARDUINO_DIR)
  • [DEFAULT] ARDUINO_CORE_PATH = /usr/share/arduino/hardware/arduino/cores/arduino
  • [COMPUTED] ARDUINO_VAR_PATH = /usr/share/arduino/hardware/arduino/variants (from ARDUINO_DIR)
  • [COMPUTED] BOARDS_TXT = /usr/share/arduino/hardware/arduino/boards.txt (from ARDUINO_DIR)
  • [DEFAULT] USER_LIB_PATH = /root/sketchbook/libraries (in user sketchbook)
  • [DEFAULT] PRE_BUILD_HOOK = pre-build-hook.sh
  • [DEFAULT] BOARD_TAG = uno
  • [COMPUTED] OBJDIR = build-uno (from BOARD_TAG)
  • [DETECTED] MONITOR_BAUDRATE = 115200 (in sketch)
  • [DEFAULT] OPTIMIZATION_LEVEL = s
  • [DEFAULT] MCU_FLAG_NAME = mmcu
  • [DEFAULT] CFLAGS_STD = -std=gnu99
  • [COMPUTED] DEVICE_PATH = /dev/tty96B0 (from MONITOR_PORT)
  • [AUTODETECTED] Size utility: AVR-aware for enhanced output
  • [COMPUTED] BOOTLOADER_PARENT = /usr/share/arduino/hardware/arduino/bootloaders (from ARDUINO_DIR)

mkdir -p build-uno
make reset
make[1]: Entering directory ‘/root/Starter_Kit_for_96Boards/button_led’
/usr/bin/ard-reset-arduino /dev/tty96B0
make[1]: Leaving directory ‘/root/Starter_Kit_for_96Boards/button_led’
make do_upload
make[1]: Entering directory ‘/root/Starter_Kit_for_96Boards/button_led’
/usr/share/arduino/hardware/tools/avr/…/avrdude -q -V -D -p atmega328p -C /usr/share/arduino/hardware/tools/avr/…/avrdude.conf -c arduino -b
-U flash:w:build-uno/button_led.hex:i
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00

avrdude done. Thank you.

/usr/share/arduino/Arduino.mk:1203: recipe for target ‘do_upload’ failed
make[1]: *** [do_upload] Error 1
make[1]: Leaving directory ‘/root/Starter_Kit_for_96Boards/button_led’
/usr/share/arduino/Arduino.mk:1195: recipe for target ‘upload’ failed
make: *** [upload] Error 2
root@linaro-alip:~/Starter_Kit_for_96Boards/button_led#

@wayneyang2286
For my part. I am using a device compatible to yours and use the USBtinyISP drivers as well as you and according to me we are on the right track.

But: For me it shows the “USBtiny” as a device in the Windows Device manager not as “Unknown Device #1” as yours.

I do not select the port since I program directly from my PC, select “Sketch”, “Upload Using Programmer”.
I am using Android so I am not programming from the DragonB.

If selecting “Tools” you have to select the right device as USBtinyISP as mentionned Daniel.
And from “Tools” yes you need too select the comport.
I never had to program the bootloader… so for the rest I let you in Daniel’s hands :slight_smile:

1 Like

@wayneyang2286
BTW: Try to follow this, on the example the hardware is older as ours but this works for our usbTinyISP.

jean-marc

I don’t think this command programs the bootloader. It will erases the chip and rewrite the fuses but it does not write anything to the device! That is done with the second command (the one that includes the .hex) file.

I suggest that the most “robust” [i.e. hardest to get wrong :wink: and easiest to support if it doesn’t work] way to reprogram the bootloader should be something like:

  1. Disconnect the sensor board from the DB410C
  2. Plug the programmer into the DB410C USB port and into the ISP socket on the sensor board (set the programmer up to power the sensor board).
  3. Run the Arduino IDE on DB410C.
  4. Set the board to “Arduino Uno”
  5. Set the programmer to “USBtiny” (might be “USBtinyISP”, I’m don’t have my DB410C booted whilst I type this).
  6. Select “Burn bootloader”
  7. Turn everything off, reassemble and try again.

Obviously if you don’t have a display device attached to your DB410C you won’t be able to do this and will have to adapt the instruction for running the Arduino IDE running on Ubuntu instead.

@jmjobin
I really appreciate your experience…I’m able to load Arduino firmware successfully via programmer, but setting of examples are using “/dev/tty96B0”. There might have some issue I have to figure out :frowning:

@wayneyang2286
Great!! good work… but for the DragonBoard and Linux maybe some other Linux guru like Daniel, Lawrence King (the DragonBoard creator) as well as Robert Wolff are surely more indicated to help you I am exclusively using Android for now :slight_smile:
Why don’t you show up at 96BoardOpenHours http://www.96boards.org/openhours/ and ask some questions :slight_smile: these guys are often there at the session…
Have fun.
jean-marc

@danielt
I tried your way to use DB410C to program the sensor board; however, it still not working. The result as followed:



Currently, I only can play arduino and Linux separately…

Thanks for the clear photos. They were a big help. What is happening is that the user you are running as (linaro) doesn’t have permission to read/write to the USBTiny.

This can be fixed by running the following command in a terminal (note that this is all one line, if there is a line break when you see it your web browser has put it there):
echo ‘SUBSYSTEM==“usb”, ATTR{idVendor}==“1781”, ATTR{idProduct}==“0c9f”, MODE=“0660”, GROUP=“dialout”’ | sudo dd of=/etc/udev/rules.d/99-usbtinyisp.rules

The effect of this command is that the hotplug manager (udev) will now recognise the USBTiny (1781:0c9f), give the device read/write permissions for the owning group (0660) and put it in the “dialout” group (of which the “linaro” user is a member) whenever it is plugged in.

Having run this command, you should be able to disconnect and reconnect the programmer from the DB410C and the problem should to be fixed.

Good luck!

1 Like

@danielt
Here’s the result I tried…Anything incorrect?