How to update RFLink firmware

433Mhz opensource Receiver & Transmitter.

Moderators: leecollings, Stuntteam

RidingTheFlow
Posts: 72
Joined: Friday 11 March 2016 18:23
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Essex, UK
Contact:

Re: How to update RFLink firmware

Post 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.
jjansen
Posts: 6
Joined: Thursday 17 March 2016 19:11
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: How to update RFLink firmware

Post 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.
marcojpolet
Posts: 63
Joined: Thursday 04 February 2016 20:18
Target OS: -
Domoticz version:
Contact:

Re: How to update RFLink firmware

Post 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
User avatar
jumbotroll
Posts: 793
Joined: Tuesday 13 January 2015 14:36
Target OS: NAS (Synology & others)
Domoticz version: Beta
Location: Oslo,Norway
Contact:

Re: How to update RFLink firmware

Post 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?
If you like the work I do for synology and domoticz, I appreciate a donation.
https://paypal.me/Jumbotroll
Regards
Jumbotroll
http://www.jadahl.com
marcojpolet
Posts: 63
Joined: Thursday 04 February 2016 20:18
Target OS: -
Domoticz version:
Contact:

Re: How to update RFLink firmware

Post 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
User avatar
jumbotroll
Posts: 793
Joined: Tuesday 13 January 2015 14:36
Target OS: NAS (Synology & others)
Domoticz version: Beta
Location: Oslo,Norway
Contact:

Re: How to update RFLink firmware

Post 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
If you like the work I do for synology and domoticz, I appreciate a donation.
https://paypal.me/Jumbotroll
Regards
Jumbotroll
http://www.jadahl.com
marcojpolet
Posts: 63
Joined: Thursday 04 February 2016 20:18
Target OS: -
Domoticz version:
Contact:

Re: How to update RFLink firmware

Post 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
marcojpolet
Posts: 63
Joined: Thursday 04 February 2016 20:18
Target OS: -
Domoticz version:
Contact:

Re: How to update RFLink firmware

Post 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 :-)
User avatar
jumbotroll
Posts: 793
Joined: Tuesday 13 January 2015 14:36
Target OS: NAS (Synology & others)
Domoticz version: Beta
Location: Oslo,Norway
Contact:

Re: How to update RFLink firmware

Post 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 :-)
If you like the work I do for synology and domoticz, I appreciate a donation.
https://paypal.me/Jumbotroll
Regards
Jumbotroll
http://www.jadahl.com
User avatar
jumbotroll
Posts: 793
Joined: Tuesday 13 January 2015 14:36
Target OS: NAS (Synology & others)
Domoticz version: Beta
Location: Oslo,Norway
Contact:

Re: How to update RFLink firmware

Post 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
If you like the work I do for synology and domoticz, I appreciate a donation.
https://paypal.me/Jumbotroll
Regards
Jumbotroll
http://www.jadahl.com
RidingTheFlow
Posts: 72
Joined: Friday 11 March 2016 18:23
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Essex, UK
Contact:

Re: How to update RFLink firmware

Post by RidingTheFlow »

I recommend you stop domoticz for flashing.
You don't want domotics trying to communicate with Arduino when flashing is in progress.
User avatar
jumbotroll
Posts: 793
Joined: Tuesday 13 January 2015 14:36
Target OS: NAS (Synology & others)
Domoticz version: Beta
Location: Oslo,Norway
Contact:

Re: How to update RFLink firmware

Post 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.
If you like the work I do for synology and domoticz, I appreciate a donation.
https://paypal.me/Jumbotroll
Regards
Jumbotroll
http://www.jadahl.com
User avatar
jumbotroll
Posts: 793
Joined: Tuesday 13 January 2015 14:36
Target OS: NAS (Synology & others)
Domoticz version: Beta
Location: Oslo,Norway
Contact:

Re: How to update RFLink firmware

Post 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
If you like the work I do for synology and domoticz, I appreciate a donation.
https://paypal.me/Jumbotroll
Regards
Jumbotroll
http://www.jadahl.com
bassie127
Posts: 15
Joined: Tuesday 22 March 2016 10:37
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: How to update RFLink firmware

Post 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
bassie127
Posts: 15
Joined: Tuesday 22 March 2016 10:37
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: How to update RFLink firmware

Post 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.
bassie127
Posts: 15
Joined: Tuesday 22 March 2016 10:37
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: How to update RFLink firmware

Post by bassie127 »

sorry, my virusscanner always deletes this file
bassie127
Posts: 15
Joined: Tuesday 22 March 2016 10:37
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: How to update RFLink firmware

Post 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?
User avatar
Stuntteam
Posts: 399
Joined: Wednesday 06 May 2015 16:39
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: How to update RFLink firmware

Post 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.
-=# RFLink Gateway Development Team #=-
Introduction: http://www.nemcon.nl/blog2/
Generic RFLink Support forum: http://www.esp8266.nu/forum/viewforum.php?f=8
bassie127
Posts: 15
Joined: Tuesday 22 March 2016 10:37
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: How to update RFLink firmware

Post by bassie127 »

Thanks. I will try avrdude onder Windows. Only rflinkloader.exe is remover by virus scanner
woody4165
Posts: 476
Joined: Monday 14 March 2016 13:55
Target OS: Linux
Domoticz version: beta
Location: Rome, Italy
Contact:

Re: How to update RFLink firmware

Post 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
Cubietruck - Linux cubietruck 4.13.16 (Debian GNU/Linux 8 (jessie)) + Domoticz + RFLink, Xiaomi Gateway, Owl USB, Yeelight Color and B/W, ESP8266, Broadlink RM2, Netatmo Thermostat
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests