• 10 dec 2017: forum version update. In case of issues use this topic.
  • 30 nov 2017: pilight moved servers. In case of issues use this topic.
Hello There, Guest! Login Register


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
pilight Nano USB interface
(06-23-2015, 08:51 AM)curlymo Wrote: The far easiest way is to install the Windows version of pilight (if you are using Windows ofc) and then run:
Code:
c:\pilight\pilight-flash -f pilight_usb_nano.hex -p COM1
Change COM1 to the correct comport. The nano is supported since pilight v7.

You can check the pilight manual on how to use the nano:
http://manual.pilight.org/en/configuration-hardware

@pilino1234, the nano firmware is not yet part of the firmware package. Forgot about it Smile


pilight dont run on my Win7-64bit System. i will try it on my Pi.


Attached Files Thumbnail(s)
   
 
Reply
Although a little bit offtopic. Can you check if the new Windows (v7.0) binary does run?
 
Reply
(06-23-2015, 09:06 AM)curlymo Wrote: And done Smile

So to flash the pilight usb nano firmware on linux:
Code:
sudo apt-get install pilight pilight-firmware
sudo pilight-flash -f /etc/pilight/pilight_usb_nano.hex -p /dev/ttyUSB0


this dont work


Code:
sudo pilight-flash -f /etc/pilight/pilight_usb_nano.hex -p /dev/ttyUSB0
[Jun 23 16:21:30:463434] pilight-flash: ERROR: config setting "webserver-https-port" is invalid
[Jun 23 16:21:30:464376] pilight-flash: DEBUG: garbage collected config settings library
[Jun 23 16:21:30:464681] pilight-flash: DEBUG: garbage collected config devices library
[Jun 23 16:21:30:464965] pilight-flash: DEBUG: garbage collected config rules library
[Jun 23 16:21:30:465216] pilight-flash: DEBUG: garbage collected config gui library
[Jun 23 16:21:30:465478] pilight-flash: DEBUG: freed options struct
[Jun 23 16:21:30:465711] pilight-flash: DEBUG: freed options struct
[Jun 23 16:21:30:465862] pilight-flash: DEBUG: freed options struct
[Jun 23 16:21:30:466112] pilight-flash: DEBUG: freed options struct
[Jun 23 16:21:30:466269] pilight-flash: DEBUG: garbage collected config hardware library
[Jun 23 16:21:30:466446] pilight-flash: DEBUG: garbage collected config registry library
[Jun 23 16:21:30:466952] pilight-flash: DEBUG: garbage collected config library
pi@raspberrypi ~ $
 
Reply
There seems to be an error in your config.json, what pilight version are you running? Also, if you aren't using the secure webserver (only available for manually compiled versions for now), it should work if you remove the "webserver-https-port" Smile
 
Reply
ok, found one error, delete https in config file.

but now i get

Code:
pi@raspberrypi /etc/pilight $ sudo pilight-flash -f /etc/pilight/pilight_usb_nano.hex -p /dev/ttyUSB0
[Jun 23 16:46:50:981214] pilight-flash: INFO: **** START UPD. FW ****
[Jun 23 16:46:50:982426] pilight-flash: INFO: Indentifying microprocessor
[ Jun 23 16:46:52:63022] pilight-flash: INFO: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.01s
[ Jun 23 16:46:52:72750] pilight-flash: INFO: AVR device signature = 0x1e 0x95 0x0f
[ Jun 23 16:46:52:78351] pilight-flash: INFO: Firmware running on an ATmega328P
[Jun 23 16:46:53:183659] pilight-flash: INFO: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.01s
[Jun 23 16:46:53:193847] pilight-flash: INFO: AVR device signature = 0x1e 0x95 0x0f
[Jun 23 16:46:54:390520] pilight-flash: ERROR: stk500_cmd(): protocol error
[Jun 23 16:46:54:390618] pilight-flash: INFO: AVR lfuse reads as 0
[Jun 23 16:46:54:390725] pilight-flash: ERROR: stk500_cmd(): programmer is out of sync
[Jun 23 16:46:54:390794] pilight-flash: ERROR: stk500_cmd(): programmer is out of sync
[Jun 23 16:46:54:390863] pilight-flash: ERROR: stk500_cmd(): programmer is out of sync
[Jun 23 16:46:54:390934] pilight-flash: INFO: AVR hfuse reads as 0
[Jun 23 16:46:54:391002] pilight-flash: INFO: AVR FLASH memory has been specified, an erase cycle will be performed
[Jun 23 16:46:54:391062] pilight-flash: INFO: AVR chip being erased
[Jun 23 16:46:59:393644] pilight-flash: ERROR: ser_recv(): programmer is not responding
[Jun 23 16:46:59:393776] pilight-flash: ERROR: stk500_recv(): programmer is not responding
[Jun 23 16:47:04:399746] pilight-flash: ERROR: ser_recv(): programmer is not responding
[Jun 23 16:47:04:399929] pilight-flash: ERROR: stk500_recv(): programmer is not responding
[Jun 23 16:47:04:399970] pilight-flash: INFO: reading input file "/etc/pilight/pilight_usb_nano.hex"
[Jun 23 16:47:04:400210] pilight-flash: INFO: input file /etc/pilight/pilight_usb_nano.hex auto detected as Intel Hex
[Jun 23 16:47:04:403449] pilight-flash: INFO: writing flash (4214 bytes)
Writing |                                                    | 0% 0.00s[Jun 23 16:47:09:408870] pilight-flash: ERROR: ser_recv(): programmer is not responding
[Jun 23 16:47:09:409015] pilight-flash: ERROR: stk500_recv(): programmer is not responding
[Jun 23 16:47:14:413602] pilight-flash: ERROR: ser_recv(): programmer is not responding
[Jun 23 16:47:14:413699] pilight-flash: ERROR: stk500_recv(): programmer is not responding
Writing | ##                                                 | 3% 10.01s[Jun 23 16:47:19:418903] pilight-flash: ERROR: ser_recv(): programmer is not responding
[Jun 23 16:47:19:419027] pilight-flash: ERROR: stk500_recv(): programmer is not responding
[Jun 23 16:47:24:424207] pilight-flash: ERROR: ser_recv(): programmer is not responding
[Jun 23 16:47:24:424300] pilight-flash: ERROR: stk500_recv(): programmer is not responding
[Jun 23 16:47:29:429457] pilight-flash: ERROR: ser_recv(): programmer is not responding
[Jun 23 16:47:29:429578] pilight-flash: ERROR: stk500_recv(): programmer is not responding
[Jun 23 16:47:34:434755] pilight-flash: ERROR: ser_recv(): programmer is not responding
[Jun 23 16:47:34:434867] pilight-flash: ERROR: stk500_recv(): programmer is not responding
[Jun 23 16:47:39:440028] pilight-flash: ERROR: ser_recv(): programmer is not responding
[Jun 23 16:47:39:440146] pilight-flash: ERROR: stk500_recv(): programmer is not responding
[Jun 23 16:47:44:445353] pilight-flash: ERROR: ser_recv(): programmer is not responding
[Jun 23 16:47:44:445495] pilight-flash: ERROR: stk500_recv(): programmer is not responding
[Jun 23 16:47:49:450705] pilight-flash: ERROR: ser_recv(): programmer is not responding
[Jun 23 16:47:49:450844] pilight-flash: ERROR: stk500_recv(): programmer is not responding
[Jun 23 16:47:54:456092] pilight-flash: ERROR: ser_recv(): programmer is not responding
[Jun 23 16:47:54:456212] pilight-flash: ERROR: stk500_recv(): programmer is not responding
[Jun 23 16:47:59:461597] pilight-flash: ERROR: ser_recv(): programmer is not responding
[Jun 23 16:47:59:461718] pilight-flash: ERROR: stk500_recv(): programmer is not responding
[Jun 23 16:48:04:466929] pilight-flash: ERROR: ser_recv(): programmer is not responding
[Jun 23 16:48:04:467048] pilight-flash: ERROR: stk500_recv(): programmer is not responding
[Jun 23 16:48:09:472242] pilight-flash: ERROR: ser_recv(): programmer is not responding
[Jun 23 16:48:09:472388] pilight-flash: ERROR: stk500_recv(): programmer is not responding
[Jun 23 16:48:14:477595] pilight-flash: ERROR: ser_recv(): programmer is not responding
[Jun 23 16:48:14:477736] pilight-flash: ERROR: stk500_recv(): programmer is not responding
[Jun 23 16:48:19:482973] pilight-flash: ERROR: ser_recv(): programmer is not responding
[Jun 23 16:48:19:483110] pilight-flash: ERROR: stk500_recv(): programmer is not responding
[Jun 23 16:48:24:488320] pilight-flash: ERROR: ser_recv(): programmer is not responding
[Jun 23 16:48:24:488553] pilight-flash: ERROR: stk500_recv(): programmer is not responding
[Jun 23 16:48:29:493805] pilight-flash: ERROR: ser_recv(): programmer is not responding
[Jun 23 16:48:29:493898] pilight-flash: ERROR: stk500_recv(): programmer is not responding
[Jun 23 16:48:34:499039] pilight-flash: ERROR: ser_recv(): programmer is not responding
[Jun 23 16:48:34:499136] pilight-flash: ERROR: stk500_recv(): programmer is not responding
[Jun 23 16:48:39:503625] pilight-flash: ERROR: ser_recv(): programmer is not responding
[Jun 23 16:48:39:503713] pilight-flash: ERROR: stk500_recv(): programmer is not responding
[Jun 23 16:48:44:508894] pilight-flash: ERROR: ser_recv(): programmer is not responding
[Jun 23 16:48:44:509002] pilight-flash: ERROR: stk500_recv(): programmer is not responding
[Jun 23 16:48:49:514182] pilight-flash: ERROR: ser_recv(): programmer is not responding
[Jun 23 16:48:49:514276] pilight-flash: ERROR: stk500_recv(): programmer is not responding
[Jun 23 16:48:54:519422] pilight-flash: ERROR: ser_recv(): programmer is not responding
[Jun 23 16:48:54:519517] pilight-flash: ERROR: stk500_recv(): programmer is not responding
[Jun 23 16:48:59:523684] pilight-flash: ERROR: ser_recv(): programmer is not responding
[Jun 23 16:48:59:523810] pilight-flash: ERROR: stk500_recv(): programmer is not responding
[Jun 23 16:49:04:529090] pilight-flash: ERROR: ser_recv(): programmer is not responding
[Jun 23 16:49:04:529229] pilight-flash: ERROR: stk500_recv(): programmer is not responding
[Jun 23 16:49:09:534469] pilight-flash: ERROR: ser_recv(): programmer is not responding
[Jun 23 16:49:09:534608] pilight-flash: ERROR: stk500_recv(): programmer is not responding
^Cpi@raspberrypi /etc/pilight $

After Reboot

Code:
pi@raspberrypi ~ $ sudo pilight-flash -f /etc/pilight/pilight_usb_nano.hex -p /dev/ttyUSB0
[Jun 23 16:52:50:829569] pilight-flash: INFO: **** START UPD. FW ****
[Jun 23 16:52:50:830371] pilight-flash: INFO: Indentifying microprocessor
[Jun 23 16:52:51:906521] pilight-flash: INFO: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.01s
[Jun 23 16:52:51:916001] pilight-flash: INFO: AVR device signature = 0x1e 0x95 0x0f
[Jun 23 16:52:51:924725] pilight-flash: INFO: Firmware running on an ATmega328P
[ Jun 23 16:52:53:30973] pilight-flash: INFO: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.01s
[ Jun 23 16:52:53:39573] pilight-flash: INFO: AVR device signature = 0x1e 0x95 0x0f
[ Jun 23 16:52:53:48006] pilight-flash: INFO: AVR lfuse reads as 0
[ Jun 23 16:52:53:56510] pilight-flash: INFO: AVR hfuse reads as 0
[ Jun 23 16:52:53:56593] pilight-flash: INFO: AVR FLASH memory has been specified, an erase cycle will be performed
[ Jun 23 16:52:53:56627] pilight-flash: INFO: AVR chip being erased
[ Jun 23 16:52:53:66470] pilight-flash: INFO: reading input file "/etc/pilight/pilight_usb_nano.hex"
[ Jun 23 16:52:53:66843] pilight-flash: INFO: input file /etc/pilight/pilight_usb_nano.hex auto detected as Intel Hex
[ Jun 23 16:52:53:70256] pilight-flash: INFO: writing flash (4214 bytes)
Writing | ################################################## | 100% 1.15s

[Jun 23 16:52:54:216236] pilight-flash: INFO: 4214 bytes of flash written
[Jun 23 16:52:54:237441] pilight-flash: INFO: verifying flash memory against /etc/pilight/pilight_usb_nano.hex:
[Jun 23 16:52:54:237834] pilight-flash: INFO: load data flash data from input file /etc/pilight/pilight_usb_nano.hex:
[Jun 23 16:52:54:238254] pilight-flash: INFO: input file /etc/pilight/pilight_usb_nano.hex auto detected as Intel Hex
[Jun 23 16:52:54:241820] pilight-flash: INFO: input file /etc/pilight/pilight_usb_nano.hex contains 4214 bytes
Reading | ################################################## | 100% 0.87s

[Jun 23 16:52:55:115477] pilight-flash: INFO: verifying ...
[Jun 23 16:52:55:115691] pilight-flash: ERROR: verification error, first mismatch at byte 0x075c
[Jun 23 16:52:55:115731] pilight-flash: ERROR: 0xd4 != 0x78
[Jun 23 16:52:55:115759] pilight-flash: ERROR: verification error; content mismatch
[Jun 23 16:52:55:121585] pilight-flash: INFO: Finished updating firmware
[Jun 23 16:52:55:121654] pilight-flash: INFO: **** FAILED UPD. FW ****
pi@raspberrypi ~ $
 
Reply
Just retry a few times. Also, are you sure this is an Arduino Nano?
 
Reply
yes, i bought this device
http://www.amazon.de/gp/product/B00PL70X...ge_o05_s00

now i get
Code:
pi@raspberrypi /etc/pilight $ sudo pilight-flash -f /etc/pilight/pilight_usb_nano.hex -p /dev/ttyUSB0
[Jun 23 19:01:29:752757] pilight-flash: INFO: **** START UPD. FW ****
[Jun 23 19:01:29:753521] pilight-flash: INFO: Indentifying microprocessor
[Jun 23 19:01:30:830160] pilight-flash: INFO: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.01s
[Jun 23 19:01:30:839294] pilight-flash: INFO: AVR device signature = 0x1e 0x95 0x0f
[Jun 23 19:01:30:843881] pilight-flash: INFO: Firmware running on an ATmega328P
[Jun 23 19:01:31:941773] pilight-flash: INFO: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.01s
[Jun 23 19:01:31:950802] pilight-flash: INFO: AVR device signature = 0x1e 0x95 0x0f
[Jun 23 19:01:31:958689] pilight-flash: INFO: AVR lfuse reads as 0
[Jun 23 19:01:31:967176] pilight-flash: INFO: AVR hfuse reads as 0
[Jun 23 19:01:31:967499] pilight-flash: INFO: AVR FLASH memory has been specified, an erase cycle will be performed
[Jun 23 19:01:31:967684] pilight-flash: INFO: AVR chip being erased
[Jun 23 19:01:31:977035] pilight-flash: INFO: reading input file "/etc/pilight/pilight_usb_nano.hex"
[Jun 23 19:01:31:977471] pilight-flash: INFO: input file /etc/pilight/pilight_usb_nano.hex auto detected as Intel Hex
[Jun 23 19:01:31:981060] pilight-flash: INFO: writing flash (4214 bytes)
Writing | ################################################## | 100% 1.18s

[Jun 23 19:01:33:158701] pilight-flash: INFO: 4214 bytes of flash written
[Jun 23 19:01:33:179477] pilight-flash: INFO: verifying flash memory against /etc/pilight/pilight_usb_nano.hex:
[Jun 23 19:01:33:180412] pilight-flash: INFO: load data flash data from input file /etc/pilight/pilight_usb_nano.hex:
[Jun 23 19:01:33:181417] pilight-flash: INFO: input file /etc/pilight/pilight_usb_nano.hex auto detected as Intel Hex
[Jun 23 19:01:33:185048] pilight-flash: INFO: input file /etc/pilight/pilight_usb_nano.hex contains 4214 bytes
Reading | ################################################## | 100% 0.87s

[ Jun 23 19:01:34:52460] pilight-flash: INFO: verifying ...
[ Jun 23 19:01:34:52760] pilight-flash: INFO: 4214 bytes of flash verified
[ Jun 23 19:01:34:62337] pilight-flash: INFO: AVR lfuse reads as 0
[ Jun 23 19:01:34:70808] pilight-flash: INFO: AVR hfuse reads as 0
[ Jun 23 19:01:34:70918] pilight-flash: INFO: AVR fuses OK
[ Jun 23 19:01:34:76630] pilight-flash: INFO: Finished updating firmware
[ Jun 23 19:01:34:76769] pilight-flash: INFO: **** DONE UPD. FW ****

But LOG show
Code:
[Jun 23 19:03:26:651513] pilight-daemon: WARNING: could not sync FW values
 
Reply
Yes, you can ignore that one Smile Need to fix that.
 
Reply
Lightbulb 
Hi all,
last weekend I installed my nano-receiver together with pilight on my bananapi-board and it works quite good. So a big thank you!

On remark: I think it would be better to remove the check for a valid port name, especially for the linux part.

Why? I came across this problem because I have 2 ftdi adapters attached to my board, and they not always get enumerated in the same sequence.
Usually I use udev-rules to get persistent device names, i.e. /dev/usbtty[0,1,...] is always mapped to a user-selected constant name, in my case /dev/nano0 or /dev/nano1, depending on the ftdi serial number.
I removed the check in the source and it works fine.

Thanks!
 
Reply
Why don't you just make sure your fix the ttyUSB assignments?
 
Reply
  


Possibly Related Threads...
Thread Author Replies Views Last Post
  how to compile pilight with custom protocol code? am i missing something? stanwebber 2 90 07-05-2021, 03:49 AM
Last Post: stanwebber
  hardware info lost after pilight restart Rschnauzer 3 259 03-17-2021, 11:44 AM
Last Post: Rschnauzer
Question pilight stopped working sl4m01 3 957 11-26-2020, 09:17 PM
Last Post: PPacman
  pilight-raw changes output format from 7 to 8 Rschnauzer 1 641 11-26-2020, 01:52 PM
Last Post: curlymo
Question pilight nightly webgui offline after some hours fleisch 4 694 10-26-2020, 05:19 PM
Last Post: fleisch
  pilight bugs Ascenion 1 664 03-23-2020, 06:29 PM
Last Post: curlymo
  [Solved] pilight service crashing on first webserver access after reboot VrahoK 20 4,521 12-21-2019, 09:46 AM
Last Post: curlymo
  pilight-control modify values coolinx 16 3,631 11-13-2019, 08:02 PM
Last Post: curlymo
  Bug: double free or corruption in pilight-send blackzombie 12 3,105 10-07-2019, 08:15 PM
Last Post: blackzombie
  [Fixed] High CPU usage when pilight usb nano disconnects DieterK 1 986 08-13-2019, 05:43 PM
Last Post: curlymo

Forum Jump:


Browsing: 3 Guest(s)