• 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
  hardware info lost after pilight restart Rschnauzer 3 77 03-17-2021, 11:44 AM
Last Post: Rschnauzer
Question pilight stopped working sl4m01 3 735 11-26-2020, 09:17 PM
Last Post: PPacman
  pilight-raw changes output format from 7 to 8 Rschnauzer 1 527 11-26-2020, 01:52 PM
Last Post: curlymo
Question pilight nightly webgui offline after some hours fleisch 4 483 10-26-2020, 05:19 PM
Last Post: fleisch
  pilight bugs Ascenion 1 549 03-23-2020, 06:29 PM
Last Post: curlymo
  [Solved] pilight service crashing on first webserver access after reboot VrahoK 20 3,850 12-21-2019, 09:46 AM
Last Post: curlymo
  pilight-control modify values coolinx 16 3,023 11-13-2019, 08:02 PM
Last Post: curlymo
  Bug: double free or corruption in pilight-send blackzombie 12 2,662 10-07-2019, 08:15 PM
Last Post: blackzombie
  [Fixed] High CPU usage when pilight usb nano disconnects DieterK 1 866 08-13-2019, 05:43 PM
Last Post: curlymo
  problems compiling pilight on Odroid C2 WitchDoctor 101 26,426 03-14-2019, 09:01 PM
Last Post: curlymo

Forum Jump:


Browsing: 1 Guest(s)