Page 2 of 4

Re: How to update RFLink firmware

Posted: Thursday 17 March 2016 12:21
by RidingTheFlow
Make sure /dev/ACM0 is really the serial device for your RFLink. It may be a serial device, but just a wrong one so programmer can't communicate. You can do it e.g. via screen:

Code: Select all

screen /dev/ACM0 57600
- you should get cleartext communication/build number banner from RFLink

The way udev assigns device links can be semi-random based on what USB devices you have and what ports they use.
Personally I use fixed etc/udev/rules.d/ to make sure device links are fixed, e.g.:

Code: Select all

SUBSYSTEM=="tty", ATTRS{idVendor}=="1a86", ATTRS{idProduct}=="7523", SYMLINK+="ttyUSB-RFLink"
SUBSYSTEM=="tty", ATTRS{idVendor}=="0658", ATTRS{idProduct}=="0200", SYMLINK+="ttyUSB-ZStick"
Stuntteam wrote:Why the -D ?
-D (disable explicit erase) is needed in newer avrdude, because Arduino Mega will auto-erase on programming. Therefore explicit erasing is not needed - and will actually fail with error if you try without this switch.

Re: How to update RFLink firmware

Posted: Thursday 17 March 2016 19:14
by jjansen
remb0 wrote:i got now:
avrdude -v -p atmega2560 -c stk500 -P /dev/ACM0 -b 115200 -D -U flash:w:/home/pi/RFLink.cpp.hex:i

Code: Select all

 Programmer Type : STK500V2
         Description     : Atmel STK500
         Programmer Model: Unknown
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer

I got the same error. Therefore I stopped Domoticz with

Code: Select all

sudo service domoticz.sh stop
Used the avrdude command

and than started domoticz again.

This worked very well.

Re: How to update RFLink firmware

Posted: Friday 18 March 2016 20:49
by marcojpolet
jumbotroll wrote:How to update RFLink on Synology NAS:
1. Download and install avrdude.spk for your synology from my server: http://www.jadahl.com/synology/
2. Copy the newest RFLink.cpp.hex file to a folder on your NAS, for example /volume1/web
3. Go to Hardware settings in Domoticz and temporary disable (not delete) RFLink.
4. Telnet or ssh your NAS and type:
avrdude -v -p atmega2560 -c stk500 -P /dev/ttyUSB1 -b 115200 -D -U flash:w:/volume1/web/RFLink.cpp.hex:i
Remember to edit correct directory and USB port you using!

5. Go to Hardware settings in Domoticz and enable RFLink.
The end :-)
Hi Jumbotroll,
Great packages for the Synology, I use them, also the avrdude is working! Do you also have a serial terminal program I could run from my Synology available as package? This way I could see the debug output of the rflink from my Synology.

Regards,
Marco

Re: How to update RFLink firmware

Posted: Friday 18 March 2016 23:46
by jumbotroll
marcojpolet wrote: Hi Jumbotroll,
Great packages for the Synology, I use them, also the avrdude is working! Do you also have a serial terminal program I could run from my Synology available as package? This way I could see the debug output of the rflink from my Synology.

Regards,
Marco
Sorry I have not compiled serial terminal program for Synology.
Do you have a suggestion source code for a cli serial terminal program that could do that work?

Re: How to update RFLink firmware

Posted: Saturday 19 March 2016 8:06
by marcojpolet
Hi Jumbo,

No sorry, but from what I've read minicom or microcom are linux tools which could do that, perhaps that helps?

Regards,
Marco

Re: How to update RFLink firmware

Posted: Saturday 19 March 2016 19:52
by jumbotroll
minicom v2.7-1.spk for Synology.
Minicom, a terminal program for Linux and other unix-like systems.

Log in with telnet or ssh and start minicom with minicom -s for setting.
For meny type: CTRL-A and use letter A-Z for option.
To exit minicom, type CTRL-A and then type Q.
If you have DSM6.0 beta, type sudo minicom -s
http://www.jadahl.com/synology/index.php?fulllist=true

Re: How to update RFLink firmware

Posted: Sunday 20 March 2016 11:22
by marcojpolet
It's working! Woohooo!

Code: Select all

CTRL-A Z for help | 115200 8N1 | NOR | Minicom 2.7 | VT102 | Offline | ttyACM0
NAS> minicom -s

Welcome to minicom 2.7

OPTIONS: I18n
Compiled on Mar 19 2016, 19:39:25.
Port /dev/ttyACM0, 11:19:10

Press CTRL-A Z for help on special keys

20;E6;Slave;ID=000301;METER=00000050;
20;E7;Slave;ID=000301;METER=00000020;
Took a bit figuring out the settings (57K6, 8N1), this can be set from the menu, not directly, but there are keys in the menu to use next/prev speed, which can do 57K6.

I can now debug and flash directly from the NAS. Now just a way to switch the 10uF capacitor (prevent reset) from software.

Thanks Jumbotroll, great work!!

Regards,
Marco

Re: How to update RFLink firmware

Posted: Sunday 20 March 2016 11:25
by marcojpolet
Note; I use 'synopkg stop Domoticz' and start to stop and start Domoticz, otherwise the port is not accebible.
Hmmm update; stoppping works, starting not yet, I'll find out :-)

Re: How to update RFLink firmware

Posted: Sunday 20 March 2016 11:40
by jumbotroll
@marcojpolet
about the 10uF capacitor to prevent reset you can test this:

killall synousbmodemd

Do this before you connect the device and check if that work for you.
Remember to remove the 10uF capacitor first :-)

Re: How to update RFLink firmware

Posted: Sunday 20 March 2016 12:13
by jumbotroll

Code: Select all

Welcome to minicom 2.7

OPTIONS: I18n 
Compiled on Mar 19 2016, 19:27:24.
Port /dev/ttyUSB1, 12:03:12

Press CTRL-A Z for help on special keys

20;70;Xiron;ID=A301;TEMP=005e;HUM=41;BAT=OK;
20;71;PONG;                             
20;72;Prologue;ID=96a1;TEMP=00e8;BAT=LOW;
20;73;XT200;ID=005f;TEMP=8080;BA20;74;Xiron;ID=A301;TEMP=005f;HUM=41;BAT=OK;
20;75;XT200;ID=00e1;TEMP=0030;BAT=LOW;  
20;76;PONG;                             
20;77;Prologue;ID=96a1;TEMP=00e8;BAT=LOW;
20;78;XT200;ID=005f;TEMP=8080;BAT=OK;   
20;79;Alecto V3;ID=0087;TEMP=80a20;7A;FineOffset;ID=045c;TEMP=00e1;
20;7B;Xiron;ID=A301;TEMP=005e;HUM=41;BAT=OK;
I don't have to stop domoticz or disable RFLink from domoticz. Just started minicom and it's up and running :-)
BTW I use Arduino Mega clone with CH341 driver on ttyUSB1

Re: How to update RFLink firmware

Posted: Sunday 20 March 2016 14:15
by RidingTheFlow
I recommend you stop domoticz for flashing.
You don't want domotics trying to communicate with Arduino when flashing is in progress.

Re: How to update RFLink firmware

Posted: Sunday 20 March 2016 14:51
by jumbotroll
RidingTheFlow wrote:I recommend you stop domoticz for flashing.
You don't want domotics trying to communicate with Arduino when flashing is in progress.
Yes, I always stop before flash, but does not when logging.

Re: How to update RFLink firmware

Posted: Thursday 24 March 2016 23:19
by jumbotroll
I have build some packages for DSM 6.0
avrdude, minicom, mochad, netcat, usbutils and (UsbSerialDrivers for non domoticz users)
http://www.jadahl.com/synology6/
http://www.jadahl.com/synology6/index.php?fulllist=true

Re: How to update RFLink firmware

Posted: Friday 25 March 2016 9:22
by bassie127
Where can I find the RFlink software, including the RFlinkloader.exe?
The URL mentioned in the first post does not work
http://sourceforge.net/projects/rflink/ ... urce=files

Re: How to update RFLink firmware

Posted: Friday 25 March 2016 9:34
by bassie127
OK I found it on https://drive.google.com/file/d/0BwEYW5 ... lFd3c/view
The strange thing is that Google drive indicaties that rflinkloader.exe is present in the zip file, but when I download en open the zip file in Windows, that file is not present.
Solution for me was to extract the zip file with the cloud app suggested by Google drive, which extracts the zip file to my Google Drive.

Re: How to update RFLink firmware

Posted: Friday 25 March 2016 9:43
by bassie127
sorry, my virusscanner always deletes this file

Re: How to update RFLink firmware

Posted: Friday 25 March 2016 10:11
by bassie127
Is it possible to run RFlinkloader software on Raspberry/linux in stead of on windows? Because on my work laptop the virusscanner keeps deleten rflinkloader.exe
Or do you have any other ideas?

Re: How to update RFLink firmware

Posted: Friday 25 March 2016 10:39
by Stuntteam
rflinkloader is a windows only front end program.
It calls avrdude for the actualy flashing of the Arduino (one of the reasons that some poor anti virus programs report a virus)
You can use avrdude on a Pi to do the flashing. You can follow jumbotrolls synology explanations as the avrdude command is the same.

Re: How to update RFLink firmware

Posted: Friday 25 March 2016 12:16
by bassie127
Thanks. I will try avrdude onder Windows. Only rflinkloader.exe is remover by virus scanner

Re: How to update RFLink firmware

Posted: Thursday 31 March 2016 9:10
by woody4165
Hi

How can I check which fw is loaded into RFLink?

I just got one, I presume it's latest one, but os there a way to check it?

Thanks