-
Notifications
You must be signed in to change notification settings - Fork 713
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Transfer file via can0 #432
Comments
Ok, that means that you have at least CAN_RAW socket support - which provides a programming interface similar to a stand-alone CAN driver.
Is this CAN bootloader already implemented?
The main problem is that you always need to implement some kind of protocol and process for downloading the firmware. E.g. when the system is up and running, you need to
As written above: When you have a working CAN bootloader/firmware update process in your CAN MCU you need to think about the flash program that reads the hex file and can handle the flash process and data transfer.
Not sure whether PCANView supports any kind of data transfer of hex files. E.g. the PCAN routers use some CAN update protocol to get firmware updates: https://github.com/peak-system/pcanflash You can use a Linux (Debian/Ubuntu) Laptop together with the PCAN USB Adapter to develop your flashing program. And when this is working you can simply compile it for the RasPi and it should work on your target system.
Yes. But you need some kind of protocol to make sure that the receiver knows the start and end of the transmission or some message counters or checksums that the receiver can check for the correct firmware transmission before programming it to the flash chip.
I hope I was able to make the general ideas and concepts behind firmware updates over CAN clear to you. |
To avoid inventing new protocols, ISOBUS specification defines ISOBUS file system protocol ISO 11783 - 13. I'm working on implementation of client and server part, here: |
BTW:
Ask axotec for the source code of the kernel. In order to comply with the Linux kernel's GPL-2 license, they have to give you the source code including all patches. |
You basically have to port the existing CAN flash utility to QT. |
The bit rate is 500 kbit/s. and you have to port the loop in main to QT. Note in |
The bootloader is not yet available everywhere (we will need to use the PICKIT to flash it first either way)
Thanks, will look into it
Definitely!
We contacted them and they will give it to us if we give them our reason.
Was afraid it was going to be like this but will look into it as well Thanks for the information you gave me! Will look into all of it as soon as possible. |
The obvious reason is: "I have the binary, therefor I request the sources.", you can send them the link to the GPL-2.0 FAQ. |
Hello,
we are currently trying to use a bootloader (https://github.com/qnx425/PIC18FXXK80-CAN-Bootloader) with one of our microcontrollers.
Since we have a physical CAN module on our RPI (5.4.65-v7 custom kernel) compatible solution (Axotec IGX-560, compute module with some extensions. Kernel cannot be recompiled, don't have access to the source) we are using that to currently send single messages via QT and SocketCAN.
Our next step was to use the bootloader to flash the MCU without physically accessing it every single time (each behind multiple screws, 1000+ of them in different places around multiple cities).
The bootloader should receive a new firmware (hex file) via can and afterwards restarts the MCU with the new firmware. But I currently cannot find a way to send the file. I tried looking up some solutions but some require more kernel modules and others use USB adapters. For testing purposes we have a PCAN with PCANView to check what is working and what isn't after the firmware update.
Is sending a file generally possible this way? Did I miss anything in the documentation? Do I just need to split the hex file into 8-byte sized frames and send them after each other in a loop for example?
If you have any questions (or just tell me I'm blind and it is written "here or here") just ask/tell me :)
The text was updated successfully, but these errors were encountered: