Gardena SILENO minimo 250: story about firmware upgrade using Linux

Introduction

I own the Gardena SILENO minimo 250m2 robotic lawnmower:

It’s working very well for about two years so far. I am really happy that I don’t need to use petrol lawn mower anymore, and I just forgot to think about this task, which is really cool!

This model has only a BLE (Bluetooth Low Energy) connectivity (I’m using Android app).

When I installed the mower for the first time, to use the mentioned application I had to create an account using the e-mail. Afterwards (probably because of GDPR) a new Gardena application was released, and my account was removed from their servers (because it was totally unnecessary to use the app).

In this season I observed, that the application works slower. I had problems with connecting to the mower, I had to be very near to establish the connection. Often I also had to “wake it” – pushing some button or power-cycle the mower itself. What was more frustrating: I lost the ability to obtain the mower error log. It was working on the first app version, which I was using, but after update it just stopped working. I also cannot obtain information about mower firmware version.

The mower has an USB-B port for the firmware upgrade, so finally I head up to Gardena support and try to find whether there is any new firmware available. Unfortunately I was not sure (it was even hard to guess from the page). I just decided to give it a try.

This official Gardena software update page is telling that only a Windows 10 or Mac OS are supported when upgrading. Because I am only using Linux, I started with an e-mail to Gardena support asking if they have some Linux upgrade tool available for the process. As you may expect – they just ignored my email (I only got some automatic response in German).

I tried to run the upgrade tool (I’d rather call it a suite – as the installer is really heavy) under Windows 7 but the installer don’t start (as it’s stated on the site).

Installing Windows 10 on KVM

After some consideration the only way to upgrade it, was to install a Windows 10 on my Debian box using the KVM/QEMU which I prefer for virtualization over virt-manager.

Here I have to thank Raphael for his great tutorial about doing this installation:
https://raphtlw.medium.com/how-to-set-up-a-kvm-qemu-windows-10-vm-ca1789411760

I tend to use a “pure” KVM, so after converting the whole virt-manager stuff, my Windows installation commandline ended with the following:

kvm \
-m 4G \
-smp 4 \
-net nic \
-net user,hostfwd=tcp::3389-:3389 \
-usbdevice tablet \
-drive file=/home/kvm/win10/win10.img,media=disk,index=0,format=qcow2,if=virtio \
-drive file=/home/kvm/win10/Win10_22H2_EnglishInternational_x64v1.iso,index=0,media=cdrom \
-drive file=/home/kvm/win10/virtio-win-0.1.229.iso,index=1,media=cdrom \
-vga qxl \
-spice port=5900,addr=192.168.0.2,disable-ticketing \
-boot once=d

Firmware update process

Now I was ready to download and install the Gardena update suite.

I connected the mower using USB cable and nothing happened, so I powered it up, and it shows up in dmesg as:

[Fri Jun 30 19:14:19 2023] usb 1-6: new full-speed USB device number 39 using xhci_hcd
[Fri Jun 30 19:14:19 2023] usb 1-6: New USB device found, idVendor=0483, idProduct=5740, bcdDevice= 2.00
[Fri Jun 30 19:14:19 2023] usb 1-6: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[Fri Jun 30 19:14:19 2023] usb 1-6: Product: Husqvarna Automower FS
[Fri Jun 30 19:14:19 2023] usb 1-6: Manufacturer: Husqvarna AB
[Fri Jun 30 19:14:19 2023] usb 1-6: SerialNumber: xxxxxxxxxxxx
[Fri Jun 30 19:14:19 2023] cdc_acm 1-6:1.0: ttyACM0: USB ACM device
[Fri Jun 30 19:14:19 2023] usbcore: registered new interface driver cdc_acm
[Fri Jun 30 19:14:19 2023] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters

… so the mover act as an USB ACM device (STMicroelectronics according to this site?).

First I was trying to pass the whole USB device to the virtual machine using:

-usb -device usb-host,hostbus=1,hostaddr=39

but this was not working as expected – nothing shows up in windows (maybe the hostaddr is not the device number?)

Finally I decided to pass it according this StackExchange post, so I replaced the above method with this:

-chardev serial,path=/dev/ttyACM1,id=acm \
-usb -device usb-serial,chardev=acm

This finally helps and Windows detected new device (and requests for a reboot). During the reboot the mower went into sleep and disconnected:

[Fri Jun 30 19:26:41 2023] usb 1-6: USB disconnect, device number 41

I had to do it one more time, keeping in mind, that the mower is going to sleep if nothing is initiating transmission for some period of time.

Finally the upgrade suite has detected the mower and tells me that a “New software is available”, yay!
So i clicked “Update firmware”.

It downloads it from the internet, and started the process. The “Stage 1” went OK to the end, and during the “Stage 2” it stops on about 20-30%. I look into host system logs and I’ve got:

[Fri Jun 30 19:30:41 2023] usb 1-6: USB disconnect, device number 42
[Fri Jun 30 19:30:51 2023] usb 1-6: new full-speed USB device number 43 using xhci_hcd
[Fri Jun 30 19:31:36 2023] usb 1-6: new full-speed USB device number 44 using xhci_hcd
[Fri Jun 30 19:31:36 2023] usb 1-6: New USB device found, idVendor=0483, idProduct=5740, bcdDevice= 2.00
[Fri Jun 30 19:31:36 2023] usb 1-6: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[Fri Jun 30 19:31:36 2023] usb 1-6: Product: Husqvarna Automower FS
[Fri Jun 30 19:31:36 2023] usb 1-6: Manufacturer: Husqvarna AB
[Fri Jun 30 19:31:36 2023] usb 1-6: SerialNumber: xxxxxxxxxxxx
[Fri Jun 30 19:31:36 2023] cdc_acm 1-6:1.0: ttyACM0: USB ACM device

Oops! Not good. The result is that it started the upgrade but the process is probably rebooting the mower leading to showing as a new ttyACM0 instead of previous ttyACM1 which was held and passed to VM.

Finally the application of course failed with: “Programming failed, please try again”.

After some time I can see, that the mower restarts two more times:

[Fri Jun 30 19:31:46 2023] usb 1-6: USB disconnect, device number 44
[Fri Jun 30 19:31:50 2023] usb 1-6: new full-speed USB device number 45 using xhci_hcd
[Fri Jun 30 19:31:51 2023] usb 1-6: New USB device found, idVendor=0483, idProduct=5740, bcdDevice= 2.00
[Fri Jun 30 19:31:51 2023] usb 1-6: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[Fri Jun 30 19:31:51 2023] usb 1-6: Product: Husqvarna Automower FS
[Fri Jun 30 19:31:51 2023] usb 1-6: Manufacturer: Husqvarna AB
[Fri Jun 30 19:31:51 2023] usb 1-6: SerialNumber: xxxxxxxxxxxx
[Fri Jun 30 19:31:51 2023] cdc_acm 1-6:1.0: ttyACM0: USB ACM device

[Fri Jun 30 19:34:55 2023] usb 1-6: USB disconnect, device number 45
[Fri Jun 30 19:36:06 2023] usb 1-6: new full-speed USB device number 46 using xhci_hcd
[Fri Jun 30 19:36:06 2023] usb 1-6: New USB device found, idVendor=0483, idProduct=5740, bcdDevice= 2.00
[Fri Jun 30 19:36:06 2023] usb 1-6: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[Fri Jun 30 19:36:06 2023] usb 1-6: Product: Husqvarna Automower FS
[Fri Jun 30 19:36:06 2023] usb 1-6: Manufacturer: Husqvarna AB
[Fri Jun 30 19:36:06 2023] usb 1-6: SerialNumber: xxxxxxxxxxxx
[Fri Jun 30 19:36:06 2023] cdc_acm 1-6:1.0: ttyACM0: USB ACM device

… so it was not looking good, I was expecting a bricked device in the worst case 🙁

The moment of truth

I started the Android Gardena app and trying to connect to the mower using Bluetooth… It seems everything was working properly. I even had the software version showing and even the error log is working back again!

I connected it again and started the update suite, it tells me that the mower “Software is up to date”.

Results

I was watching the youtube videos about upgrading and it seems that it has about six stages when doing an upgrade (it probably depends on model?):

Image from: https://www.cd-k.de/gardena-sileno-software-update-20-22/

In my case it stops on Stage #2. Overall I am not even sure if everything was updated. The good news is that the mower is working even better then before: I have access to the error log, software version, and the most important: I can see that the Bluetooth connectivity is working much better. I can connect to the mower even from inside the house (it was nearly impossible before) and the communication seems to be more stable then before.

Post analyze

I was trying to search if the application stored some upgrade log on the guest machine. I didn’t find it, but instead I found this interesting things:

The main application:

This look like a .NET/WPF application.

There is also a AppData dir which is maybe even more interesting:

I believe this is the firmware bundle, which was downloaded for my mower. Inside are even some README.md files. One of those has the following contents:


installercore

The installercore package is mainained by, and any changes should be applied by, the platform team.

These scripts are highly shared between- and used by all installer-type bundles.
Any change in these scripts will affect the whole G4-platform and stretches further than update-packages.
Among others this affects:

  • AutoCheck bundles
  • AMProduction (mower production in factory)
  • Consumer Upgrade Tool (update at home)
  • FOTA-bundles

Please create a Jira for requested changes/features and send it to the platform team.


or this one:


TIF Test Framework

This directory contains modules for use with TIF-bundles.
When a bundle is genereated using, a subdirectory will be added to the ZIP-file called framework.
This directory will contain all files herein.

Using the basic example located in TIF/Scripts/IntegrationTests/basic_example with createTestBundle.py would generate a bundle ZIP with the following contents:

MyBundle.zip
  |- index.json
  |- basic_example.py
  |- framework
      |- __init__.py
      |- README.md
      |- <other files from this directory> 

Using the Test Framework

NOTE: If using a TifApp or other tifBase-tool which does not support import of TIF-builtins in python scripts, see the DEPRECATED section at the end of this document.

With an updated tifBase, you can simply import whichever part of the framework you need.


There is also the …\AppData\Local\ConsumerProgramming\Firmware\1c72ca5a-b0a5-42f2-8cac-03b9feb7a449.zip\SwPkg\index.json with this content:

{
  "Configurations": [
    {
      "Version": "P005-SystemCfg_32.3",
      "FileName": "P005-SystemCfg_32.3"
    }
  ],
  "Softwares": [
    {
      "Type": "Installer",
      "NodeType": 40,
      "BoardType": "20.15",
      "Version": "40.74_Main-Installer-P005_50.2",
      "FileName": "40.74_Main-Installer-P005_50.2",
      "ConfigFileName": "40.74_Main-Installer-P005_50.2_ConfigArea",
      "ConfigExtFlashFileName": "40.74_Main-Installer-P005_50.2_ConfigAreaExtFlash"
    },
    {
      "Type": "Boot",
      "NodeType": 40,
      "BoardType": "20.15",
      "Version": "40.104_Main-Boot-P005_50.2",
      "FileName": "40.104_Main-Boot-P005_50.2",
      "LoaderVersion": "40.104_Main-Boot-P005_50.2",
      "LoaderFileName": "40.44_Main-Loader-P005_50.2"
    },
    {
      "Type": "Application",
      "NodeType": 40,
      "BoardType": "20.15",
      "Version": "40.5_Main-App-P005_50.2",
      "FileName": "40.5_Main-App-P005_50.2",
      "ConfigFileName": "40.5_Main-App-P005_50.2_ConfigArea"
    },
    {
      "Type": "Sub",
      "NodeType": 40,
      "BoardType": "20.15",
      "Version": "40.50_Sub-App_6.15",
      "FileName": "40.50_Sub-App_6.15"
    },
    {
      "Type": "Boot",
      "NodeType": 37,
      "BoardType": "20.15",
      "Version": "37.101_BLE-Boot_32.9",
      "FileName": "37.101_BLE-Boot-HVHMI_32.9",
      "LoaderVersion": "37.101_BLE-Boot_32.9",
      "LoaderFileName": "37.41_BLE-Loader-HVHMI_32.9"
    },
    {
      "Type": "Application",
      "NodeType": 37,
      "BoardType": "20.15",
      "Version": "37.3_BLE-App-Peripheral_32.11",
      "FileName": "37.3_BLE-App-Peripheral-HVHMI_32.11",
      "ConfigFileName": "37.3_BLE-App-Peripheral-HVHMI_32.11_ConfigArea"
    }
  ],
  "Name": "P005G-SwPkg",
  "Version": "5995762-04C_P005G-SwPkg_50.3",
  "ReleaseEvent": "50",
  "articleNumber": "5995762-04C"
}

So this all seems to be some specific “bundle” made by some framework/third party (‘backend url‘ I found is: https://consumerbundlestorage.azurewebsites.net/). There are plenty of JSON and Python files, so for the moment I was hoping to run it from linux but I also found exe which could be problematic to run under linux. There is also a firmware itself (eg. bin and hex files).

The question remains if those stages progress bars were for the above flashing “parts” (Installer, Boot, Application, Sub, etc.) – or if it programs it all only at the beginning, and then the mower is only rebooting/flashing it “locally” by parts…

I am still unsure if I updated only the very first part (main program?) or all segments. Probably I would not know this, until the next firmware will be released (if any) or if I force somehow to “re-upgrade” this – this however is a risky task and I would like to have this mower running instead of having a bricked one 😉

Comments

  1. Hi, nice read!
    I’m pretty novice to programming, but still; do you know if there’s a way to increase the “drive past wire” more than the apps maximum of 35cm?

    I know the best way would be to move the boundary wire… 🙂

    1. Thanks Joel, IIRC there was a files with miscellaneous parameters, I don’t know if there was the “drive past wire” too. Anyway – I can see two questions:
      1. If the hardware support this
      2. If it flashes properly after the change

Leave a Reply

Your email address will not be published. Required fields are marked *