• 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
I think the reason might be the CH340. I never use nano's with that RS232 clone.
 
Reply
(04-25-2018, 06:20 AM)curlymo Wrote: I think the reason might be the CH340. I never use nano's with that RS232 clone.

Which ones do you use usually? Is FT232RL OK or do you only use the ones with FTDI?
 
Reply
I always use the FT232RL ones.
 
Reply
After playing around with the CH340 nanos, I found out, that it doesn't matter if the pilight service is started or not, and also the config doesn't matter. It sometimes works, more often not.

Then I ordered a nano with FT232RL ("AptoFun Nano V3.0 Pro ATmega328P / FT232RL"). Same procedure, different symptoms, but same result: doesn't work properly. This one at least doesn't freeze after the "INFO: Checking for an ATMega328P @115200" line, but always gives this:


Code:
[Apr 27 19:39:50:605140] pilight-flash: INFO: **** START UPD. FW ****
[Apr 27 19:39:50:605176] pilight-flash: INFO: Indentifying microprocessor
[Apr 27 19:39:50:607273] pilight-flash: INFO: Checking for an ATMega328P @115200
[Apr 27 19:39:56:662955] pilight-flash: ERROR: ser_recv(): programmer is not responding
[Apr 27 19:39:56:663043] pilight-flash: ERROR: stk500_recv(): programmer is not responding
[Apr 27 19:39:56:663071] pilight-flash: ERROR: stk500_getsync() attempt 1 of 1: not in sync: resp=0x30
[...] same output the same for other baudrates and processors [...]


I guess I have to lookup the pilight-flash code, to understand what's up with those nanos o_0
 
Reply
This one worked now:


Code:
avrdude -b 57600 -p atmega328p -c arduino -P /dev/ttyUSB0 -Uflash:w:pilight_usb_nano.hex


Now using pilight-flash, the output changed:


Code:
[Apr 27 20:26:31:323758] pilight-flash: INFO: **** START UPD. FW ****
[Apr 27 20:26:31:323862] pilight-flash: INFO: Indentifying microprocessor
[Apr 27 20:26:31:330794] pilight-flash: INFO: Checking for an ATMega328P @115200
[Apr 27 20:26:34:586515] pilight-flash: ERROR: stk500_getsync() attempt 1 of 1: not in sync: resp=0x98


No idea why avrdude does the job but pilight-flash not. Gonna try to find it out.
 
Reply
Looking forward to your results. pilight-flash is essentially a wrapper around the relevant parts of avrdude, so no idea why it doesn't work well.
 
Reply
i know its an old thread but maybe helps identifying.
I used arduino ide to flash the nano. First i got some of these sync errors (but a different number).
In the IDE there is an option for "ATMega328P (old bootloader)" this setting worked for me while "ATMega328P" failed to flash.
i guess chip is CH 340.
lsusb
Bus 001 Device 004: ID 1a86:7523 QinHeng Electronics HL-340 USB-Serial adapter
 
Reply
Hi,

I'm not too deep in firmware coding but thought it wouldn't be too much an issue switching the FT23RL to a WiFi shield like ESP8266. I understood both are using AT commands with their firmware so they might be compatible. What else would be needed to get something like this work?

Thx,
Jens
 
Reply
Someone willing to implement this for me or free time for myself.

Porting to the ESP8266 is not that easy. Maybe someone can contact @puuu who built ESPilight.
 
Reply
  


Possibly Related Threads...
Thread Author Replies Views Last Post
  Bug: double free or corruption in pilight-send blackzombie 12 104 10-07-2019, 08:15 PM
Last Post: blackzombie
  pilight-control modify values coolinx 2 78 09-20-2019, 07:24 PM
Last Post: coolinx
  [Fixed] High CPU usage when pilight usb nano disconnects DieterK 1 132 08-13-2019, 05:43 PM
Last Post: curlymo
  problems compiling pilight on Odroid C2 WitchDoctor 101 9,730 03-14-2019, 09:01 PM
Last Post: curlymo
  pilight 8 what chages for custom protocols? polo 11 2,898 02-15-2019, 06:22 PM
Last Post: polo
  pilight-debug shows nothing minhdomanh 3 541 10-18-2018, 07:01 AM
Last Post: felfert
  pilight-send and pilight-daemon DieterK 0 558 06-20-2018, 12:44 AM
Last Post: DieterK
  Lights not switched on or off by rules in pilight 8.1.0 rorie 22 2,491 06-12-2018, 03:56 PM
Last Post: curlymo
  check API in pilight 8 stratege-0815 4 1,397 02-11-2018, 09:34 AM
Last Post: stratege-0815
  pilight-receive terminates zackdvd 8 1,655 12-30-2017, 09:07 PM
Last Post: curlymo

Forum Jump:


Browsing: 1 Guest(s)