04-24-2018, 11:32 PM
(This post was last modified: 04-24-2018, 11:41 PM by sensorback.)
I got some Nano clones with Atmega328P and CH340 Chip. I tried to flash pilight_usb_nano.hex using this command line:
I tried it on a RPi 3+ and on a RPi 2, both failed with different errors like this one:
Sometimes it even hangs after the "INFO: Checking for an ATMega328P @115200" line (waited for minutes). Filename and COM port are correct, they are bash-autocompleted. Then I tried flashing on my laptop running Ubuntu 17.10 and it worked on the first try. Same cable, same nano. The nanos are completely "nude", no pins and no 433MHz receiver or sender connected. Also the Blink example of Arduino studio worked - so the nano(s) seem to be alright.
Anybody else having issues when flashing pilight_usb_nano.hex to an USB Nano on a Pi?
EDIT: Whop, nearly shutdown and went to bed, then I had an idea: I swapped my /etc/pilight/config.json on the Pi with the original one which has just the bare minimum, as this was the only difference between the newly setup Pi and my laptop. And it worked. Then I tried playing around with starting and stopping the plight service and swapping the configs. It works with the original minimum config, no matter if the pilight service is started. With my config.json, it also works if the service is stopped, but not if it's started. Is this "working as expected"?
Code:
pilight-flash -f pilight_usb_nano.hex -p /dev/ttyUSB0
I tried it on a RPi 3+ and on a RPi 2, both failed with different errors like this one:
Code:
# pilight-flash -f pilight_usb_nano.hex -p /dev/ttyUSB0
[Apr 24 22:15:36:401571] pilight-flash: INFO: **** START UPD. FW ****
[Apr 24 22:15:36:401829] pilight-flash: INFO: Indentifying microprocessor
[Apr 24 22:15:36:413013] pilight-flash: INFO: Checking for an ATMega328P @115200
[Apr 24 22:15:38:215461] pilight-flash: ERROR: stk500_getsync() attempt 1 of 1: not in sync: resp=0xff
Sometimes it even hangs after the "INFO: Checking for an ATMega328P @115200" line (waited for minutes). Filename and COM port are correct, they are bash-autocompleted. Then I tried flashing on my laptop running Ubuntu 17.10 and it worked on the first try. Same cable, same nano. The nanos are completely "nude", no pins and no 433MHz receiver or sender connected. Also the Blink example of Arduino studio worked - so the nano(s) seem to be alright.
Anybody else having issues when flashing pilight_usb_nano.hex to an USB Nano on a Pi?
EDIT: Whop, nearly shutdown and went to bed, then I had an idea: I swapped my /etc/pilight/config.json on the Pi with the original one which has just the bare minimum, as this was the only difference between the newly setup Pi and my laptop. And it worked. Then I tried playing around with starting and stopping the plight service and swapping the configs. It works with the original minimum config, no matter if the pilight service is started. With my config.json, it also works if the service is stopped, but not if it's started. Is this "working as expected"?