Selbstbau CUL, bekomme ihn nicht geflasht

Begonnen von rubi007, 13 Juni 2016, 22:50:27

Vorheriges Thema - Nächstes Thema

rubi007

Hallo,

egal was ich anstell, ich bekomme es einfach nicht hin ihn zu flashen..

ich bin bis jetzt so weit gekommen

root@raspberrypi3:/opt/culfw/Devices/nanoCUL# make

Size before:
   text    data     bss     dec     hex filename
  22498      74     831   23403    5b6b nanoCUL.elf

Compiling C: nanoCUL.c
Compiling C: ../../clib/cc1100.c
Compiling C: ../../clib/cc1101_pllcheck.c
Compiling C: ../../clib/clock.c
Compiling C: ../../clib/delay.c
Compiling C: ../../clib/display.c
Compiling C: ../../clib/stringfunc.c
Compiling C: ../../clib/fncollection.c
Compiling C: ../../clib/ringbuffer.c
Compiling C: ../../clib/fht.c
Compiling C: ../../clib/rf_send.c
Compiling C: ../../clib/rf_receive.c
Compiling C: ../../clib/rf_asksin.c
Compiling C: ../../clib/rf_moritz.c
Compiling C: ../../clib/rf_rwe.c
Compiling C: ../../clib/somfy_rts.c
Compiling C: ../../clib/fastrf.c
Compiling C: ../../clib/intertechno.c
Compiling C: ../../clib/kopp-fc.c
Compiling C: ../../clib/memory.c
Compiling C: ../../clib/serial.c
Compiling C: ../../clib/ttydata.c
Compiling C: ../../clib/spi.c
Compiling C: ../../clib/rf_mbus.c
Compiling C: ../../clib/mbus/manchester.c
Compiling C: ../../clib/mbus/3outof6.c
Compiling C: ../../clib/mbus/mbus_packet.c
Compiling C: ../../clib/mbus/crc.c
Linking: nanoCUL.elf
Creating load file for Flash: nanoCUL.hex
Creating load file for EEPROM: nanoCUL.eep
Creating Extended Listing: nanoCUL.lss
Creating Symbol Table: nanoCUL.sym

Size after:
   text    data     bss     dec     hex filename
  22498      74     831   23403    5b6b nanoCUL.elf

root@raspberrypi3:/opt/culfw/Devices/nanoCUL# make program
#@if test ! -d /sys/class/gpio/gpio17; then echo 17 > /sys/class/gpio/export; fi
#@if test ! -d /sys/class/gpio/gpio18; then echo 18 > /sys/class/gpio/export; fi
#echo out > /sys/class/gpio/gpio17/direction
#echo out > /sys/class/gpio/gpio18/direction
#echo 0 > /sys/class/gpio/gpio17/value
#echo 0 > /sys/class/gpio/gpio18/value
#sleep 1
#echo 1 > /sys/class/gpio/gpio17/value
#sleep 1
#echo 1 > /sys/class/gpio/gpio18/value
avrdude -D -p atmega328p -P /dev/serial/by-id/usb-1a86_USB2.0-Serial-if00-port0 -c arduino    -U flash:w:nanoCUL.hex
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.

makefile:218: recipe for target 'program' failed
make: *** [program] Error 1

ka was ich falsch mach

weis von euch jemand rat ?

MadMax-FHEM

Hast du ihn bereits in fhem eingebunden?

Oder mit sonst etwas drauf zugegriffen?

So wie es aussieht könnte es sein (bzw. hatte ich das auch solange fhem lief, hatte ihn aber bereit s"defined"), dass avrdude (das flash-Programm) nicht zugreifen kann weil (evtl.) der Port bereits von einem anderen Programm (fhem) geöffnet ist...

Gruß, Joachim
FHEM PI3B+ Bullseye: HM-CFG-USB, 40x HM, ZWave-USB, 13x ZWave, EnOcean-PI, 15x EnOcean, HUE/deCONZ, CO2, ESP-Multisensor, Shelly, alexa-fhem, ...
FHEM PI2 Buster: HM-CFG-USB, 25x HM, ZWave-USB, 4x ZWave, EnOcean-PI, 3x EnOcean, Shelly, ha-bridge, ...
FHEM PI3 Buster (Test)

rubi007


Floca

Wenn er sich nicht Synchronisieren lässt und du dir sicher bist, dass er sonst nicht verwendet wird, probier es nochmal mit der Arduino IDE am PC. Sollte die was ähnliches werfen ist der Arduino defekt.

rubi007

hab jetzt versucht die https://forum.fhem.de/index.php/topic,35064.0.html Alternative culfw drauf bekommen und er blinkt wie wild... nach einem reboot blinkr er garnicht meht ... komisch

rubi007

bin jetzt ein stück weiter... im windows steht usb-serial CH340 (COM7)

und bei Arduino steht


BN: Unknown board
VID: 1A86
PID: 7523
SN: Upload any sketch to obtain it

MadMax-FHEM

Wild blinken nach dem Flashen oder beim Flashen?

Beim Flashen ist (könnte) normal sein, weil er ja per serieller Schnittstelle mit Daten (FW) versorgt wird...

Flashen ohne Fehler!?

Danach gar nicht blinken weiß ich jetzt nicht, was die FW so von sich gibt an Blinkmeldungen...
FHEM PI3B+ Bullseye: HM-CFG-USB, 40x HM, ZWave-USB, 13x ZWave, EnOcean-PI, 15x EnOcean, HUE/deCONZ, CO2, ESP-Multisensor, Shelly, alexa-fhem, ...
FHEM PI2 Buster: HM-CFG-USB, 25x HM, ZWave-USB, 4x ZWave, EnOcean-PI, 3x EnOcean, Shelly, ha-bridge, ...
FHEM PI3 Buster (Test)

killah78

#7
flasht du am raspberry?
Dieses wilde blinken NACH dem flashen hatte ich auch mal. Sieht so aus, als würde er immernoch weiterflashen. Habe dann nanoCUL vom USB getrennt und wieder angestöpselt, danach hat der Flashvorgang dann funktioniert.
Hast du den Arduino nachgelötet bezüglich des Reset-Bugs? War bei mir notwendig, weil er sonst nach neustart nicht richtig initialisiert wurde. Da half dann immer nur ab- und wieder anstöpseln.

Edit: Ahh, das mit dem Löten betrifft nur FTDI Clones. Trifft bei dir ja nicht zu. Aber probier mal mit vorher ab- und anstöpseln.

Beta-User

Zitat von: rubi007 am 14 Juni 2016, 00:59:49
bin jetzt ein stück weiter... im windows steht usb-serial CH340 (COM7)

und bei Arduino steht


BN: Unknown board
VID: 1A86
PID: 7523
SN: Upload any sketch to obtain it

Für das Flashen war es bei mir (aber aus Linux heraus) hin und wieder erforderlich, den "Reset"-Button am Arduino zu drücken, kurz bevor die Arduino-IDE den flash-Vorgang gestartet hat (mehrere Nano- bzw. Micro-Boards, mit und ohne CH340). Dann natürlich warten, bis die IDE "upload completed" (oder so) meldet.

Damit habe ich auch Nanos wieder "eingefangen", bei denen der flash-Vorgang nur teilweise geklappt hatte (wackeliges Kabel :'().  8)
Server: HP-elitedesk@Debian 12, aktuelles FHEM@ConfigDB | CUL_HM (VCCU) | MQTT2: MiLight@ESP-GW, BT@OpenMQTTGw | MySensors: seriell, v.a. 2.3.1@RS485 | ZWave | ZigBee@deCONZ | SIGNALduino | MapleCUN | RHASSPY
svn: u.a MySensors, Weekday-&RandomTimer, Twilight,  div. attrTemplate-files

riker1

Hallo
hatte das gleiche problem.

habe dann manuell mittels

sudo avrdude -p atmega328p -c arduino -P /dev/ttyUSB0 -b 57600 -D -Uflash:w:~/Downloads/cul/nano868CUL.hex:i

flashen können.

kein reset button erforderlich.

hoffe es hilft


FHEM    5.26.1 Ubuntu 18, FHEM    5.26.1 RPI 3 , Actoren: IT ,Tasmota, ESPEasy,
MAX CUBE, MAX HT, MAX WT, Selbstbau nanoCULs, FS 20,Tasmota, Homematic, FTK, SW. DIM, Smoke,KODI,Squeezebox

micky0867

Zitat von: riker1 am 30 September 2017, 14:47:53
Hallo
hatte das gleiche problem.

habe dann manuell mittels

sudo avrdude -p atmega328p -c arduino -P /dev/ttyUSB0 -b 57600 -D -Uflash:w:~/Downloads/cul/nano868CUL.hex:i

flashen können.

kein reset button erforderlich.

hoffe es hilft
Einige meiner Nano-China--Klone haben das gleiche Problem, dass ein flashen per USB nicht geht.
Da half nur ein richtiger "Programmer" (z. B.  AVR-ISP)
Bei einigen funzte das flashen per USB dann auch, nachdem ich den Bootloader neu geflasht hatte.
Bei anderen bekomme ich den Sketch nur per richtigem Programmer drauf, egal, was ich anstelle.


Gesendet von meinem ONEPLUS A3003 mit Tapatalk