This message says that you are already running firmware com.zubax.telega-1.0.1e5c06b5751eefb2.6a34880f9af5cb71 (I see that you added the hardware version number to the file name but it’s not needed). Updating to the same version does not make a lot of sense.
The syntax is correct but the command will only work if the C:\ directory contains the firmware file. From the other invocations it is unclear if this is the case.
It doesn’t hang but keeps running while not doing anything, because there are either no nodes to update or no firmware files available.
This invocation is probably not what you mean because you are using 124 as the file name for the allocation table, while not giving an explicit list of nodes to update. The previous forms are correct.
In case you are dealing with some Windows-specific issues, you could upload the firmware via the debug connector of Myxa:
I didn’t do that - that was the same file name from the server.
Would updating it to a much higher version number work?? (i.e. v1.5.6)
Indeed this the case. I tried a few different folders just to be sure…
I’m just trying everything at this point given that I’m not familar with Yakut as much as I’d like to be.
PS C:\Windows\system32> yakut file-server C:\Users\Public --update-software 124
2024-11-11 21:43:14 0003680 WAR yakut.cmd.file_server: Requesting node 124 to update its software: uavcan.node.ExecuteCommand.Request.1.1(command=65533, parameter='com.zubax.telega-1.4.1e5c06b5751eefb2.6a34880f9af5cb71.app.bin')
2024-11-11 21:43:22 0003680 WAR yakut.cmd.file_server: Node 124 ignored because total update mode not selected and its ID is not given explicitly (explicit node-IDs are: (none given))
This is the closest (I think) I’ve gotten.
I’m using a Babel as part of this workflow. How do I use the the debug connector…?
Hm, this is sus. Your logs refer to com.zubax.telega-1.3-1.1.1e5c06b5751eefb2.6a34880f9af5cb71.app.bin (the second entry from your previous post), but the file on the file server is named slightly differently. The name itself doesn’t matter that much but I need to understand what caused it to be different.
Regarless, though, you don’t need to use the v1 firmware, since you want to downgrade (although I would go with that Lua script still, in which case no downgrade is needed). If you’re confident you want to downgrade, obtain the latest v0 firmware from the file server.
Please try running your first command again, but this time ensure that the binary file is indeed contained in the specified path (or change the path), and add the node-ID after the --update-software flag, like this (I am using shorthand options here for brevity):
y -v file-server C:\Users\Public -P allocation_table.db -u 124
You should see the command emit messages like Requesting node 124 to update its software: ..., followed by requests coming back from the node. If anything goes wrong, we should see helpful log messages.
An alternative to this would be to use any STM32-compatible SWD adapter to upload the firmware as I mentioned earlier. One such adapter is available here:
Oh I see what the problem is – I should have checked this early. The device you’re upgrading was manufactured back in 2019. The bootloaders shipped in 2019 are not compatible with Telega v1 – you can switch to v1 but you can’t go back after that. You have two solutions:
Replace the bootloader using an SWD adapter. Babel cannot be used for this because it is not an SWD adapter. To do that, upload this binary at 0x08000000 (i.e., the origin of flash): https://files.zubax.com/products/com.zubax.telega/com.zubax.telega.bootloader.bin; be sure to retain the 256 bytes between 0x0000BF00 and 0x0000C000, they contain the digital signature. Since you’re using the SWD adapter anyway, you can also use it to rewrite the application as well while you’re at it; the load address is 0x0000C000.
Replace the bootloader using this script via CAN, then update the firmware normally like you’ve been attempting to do: update_bootloader.py (13.5 KB); invoke it as follows (this is Unix shell; adjust for powershell as needed):
export UAVCAN__CAN__IFACE='socketcan:slcan0' # Update as necessary
export UAVCAN__CAN__MTU=8
export UAVCAN__CAN__BITRATE='1000000 1000000'
export UAVCAN__NODE__ID=$(yakut accommodate)
echo "Auto-selected node-ID for this session: $UAVCAN__NODE__ID"
#export VERBOSE=1 # Enable extra logging for troubleshooting.
export UAVCAN__CLN__LOW_LEVEL_IO__ID=10
exec ./update_bootloader.py
PS C:\Users\Jeeva Arjun\Downloads> python ./update_bootloader.py
Install PyCyphal: pip install pycyphal[transport-can-pythoncan,transport-serial]; also configure the CYPHAL_PATH environment variable; see PyCyphal or Yakut docs for details.
I have set my Windows environment variables, but this error strongly suggests I’ve done it incorrectly. I’ve tried it a few different ways and there is no change.
(Indeed my installation of PyCyphal is also correct - installed as per the PyPI docs and the error thrown up)
Some help would be appreciated in the verification of my installation.
I used to run WSL (Windows Subsystem for Linux) for that express purpose but it had lots of cross-os dependency issues.
I run Windows for Solidworks/Edge and other stuff. Unless I really have to, I’d like to stick to Windows, but I guess I could run an Ubuntu Virtual Machine. It just means that I’ve got to set everything up again. @pavel-kirienko, did you want me to switch to Ubuntu or can you help me solve this Windows environment variable problem?
Thanks again!
As far as I’m aware using WSL does not solve the issue that Windows is just not very good for these kinds of tasks.
It might work for compiling the occasional program or something like that, but as soon as you want to venture beyond that (like connecting to CAN networks) it becomes really difficult (as you mentioned, that’s when the cross-OS issues start to get in the way).
As a simple example, here I’m doing a simple demo by turning a magnet on/off; on Ubuntu I can open 2 separate terminals connected to the device through Cyphal/CAN; one observing the state of the magnet and one sending commands. This works because at the level of interacting with the network we can rely on SocketCAN.
Using Windows, doing exactly the same is simply not possible: a serial port can only be accessed by 1 process on Windows (and SocketCAN is only supported on Linux).
(If you’re planning to do embedded programming, GNU/Linux is also a no-brainer.)
I have no experience with WSL so I can’t be certain if things are going to work there as they should. If you can switch to a GNU/Linux distribution, that would certainly help (it doesn’t have to be Ubuntu).
The error message explains what needs to be done to fix the problem:
I’ve installed an Ubuntu virtual machine on my Windows machine (Ubuntu 20.04).
Following your screencast, I’ve installed Yakut correctly (it gives an output when yakut --help). However, I can’t seem to run the transport. I tried the sourcing method, but it returns:
sudo: setup_slcan: command not found
OSError: [Errno 19] No such device
Auto-selected node-ID for this session:
When I try setting the environment variables manually, I’ve found my Babel as tty/ACM0:
user@ubuntu:/sys$ export UAVCAN__CAN__IFACE="slcan:ttyACM0"
user@ubuntu:/sys$ export UAVCAN__NODE__ID=$(yakut accommodate)
InvalidMediaConfigurationError: Interface does not support CAN FD: slcan
To fix the “interface does not support CAN FD” error, you need to set the bit rate and the MTU manually. This is because by default, PyCyphal assumes that you want CAN FD, but it is not supported by the SLCAN protocol. Here’s how you can do it:
So I’ve done a fair level of digging and I’m up to this point:
user@ubuntu:~/Desktop$ python3 update_bootloader.py
Install PyCyphal: pip install pycyphal[transport-can-pythoncan,transport-serial]; also configure the CYPHAL_PATH environment variable; see PyCyphal or Yakut docs for details.
But I know that my env path is installed correctly (following the screencast). In the actual python updatebootloader file, I see that error is returned when the program can’t:
import pycyphal
import uavcan
import zubax
Manually running python and checking sees that I can indeed import PyCyphal, but I can’t import uavcan (even after installing it (pip3 install uavcan/pip install pyuavcan_v0) and I can’t import zubax. However, I can’t seem to find an package for that.
How do I solve this?
Done.
When I run echo $CYPHAL_PATH I get: /home/usr/public_regulated_data_types/, and running cd $CYPHAL PATH, throws me into the right folder. When I set the variable correctly, I got a compiling DSDL .... (can’t recall fully), and then the shell gives me the same error as earlier:
Install PyCyphal: pip install pycyphal[transport-can-pythoncan,transport-serial]; also configure the CYPHAL_PATH environment variable; see PyCyphal or Yakut docs for details.
The DSDL files are correct now, yet the error is the same.