Skip to content
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

can't flash over canboot manta E3EZ #102

Open
swaaws opened this issue Dec 22, 2023 · 0 comments
Open

can't flash over canboot manta E3EZ #102

swaaws opened this issue Dec 22, 2023 · 0 comments

Comments

@swaaws
Copy link

swaaws commented Dec 22, 2023

I get this error

./katapult/scripts/flash_can.py -u 284a47d52c0a -f ~/klipper/out/klipper.bin -i can0
Sending bootloader jump command...
Resetting all bootloader node IDs...
Attempting to connect to bootloader
ERROR:root:Can Read Error
Traceback (most recent call last):
  File "/home/sebastian/./katapult/scripts/flash_can.py", line 138, in send_command
    ret = await self.node.readuntil()
  File "/home/sebastian/./katapult/scripts/flash_can.py", line 294, in readuntil
    return await asyncio.wait_for(self._reader.readuntil(sep), timeout)
  File "/usr/lib/python3.9/asyncio/tasks.py", line 481, in wait_for
    return fut.result()
  File "/usr/lib/python3.9/asyncio/streams.py", line 629, in readuntil
    raise exceptions.IncompleteReadError(chunk, None)
asyncio.exceptions.IncompleteReadError: 0 bytes read on a total of undefined expected bytes
ERROR:root:Can Read Error
Traceback (most recent call last):
  File "/home/sebastian/./katapult/scripts/flash_can.py", line 475, in run
    await flasher.connect_btl()
  File "/home/sebastian/./katapult/scripts/flash_can.py", line 89, in connect_btl
    ret = await self.send_command('CONNECT')
  File "/home/sebastian/./katapult/scripts/flash_can.py", line 193, in send_command
    raise FlashCanError("Error sending command [%s] to Can Device"
FlashCanError: Error sending command [CONNECT] to Can Device

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/sebastian/./katapult/scripts/flash_can.py", line 138, in send_command
    ret = await self.node.readuntil()
  File "/home/sebastian/./katapult/scripts/flash_can.py", line 294, in readuntil
    return await asyncio.wait_for(self._reader.readuntil(sep), timeout)
  File "/usr/lib/python3.9/asyncio/tasks.py", line 481, in wait_for
    return fut.result()
  File "/usr/lib/python3.9/asyncio/streams.py", line 629, in readuntil
    raise exceptions.IncompleteReadError(chunk, None)
asyncio.exceptions.IncompleteReadError: 0 bytes read on a total of undefined expected bytes
ERROR:root:Flash Error
Traceback (most recent call last):
  File "/home/sebastian/./katapult/scripts/flash_can.py", line 475, in run
    await flasher.connect_btl()
  File "/home/sebastian/./katapult/scripts/flash_can.py", line 89, in connect_btl
    ret = await self.send_command('CONNECT')
  File "/home/sebastian/./katapult/scripts/flash_can.py", line 193, in send_command
    raise FlashCanError("Error sending command [%s] to Can Device"
FlashCanError: Error sending command [CONNECT] to Can Device

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/sebastian/./katapult/scripts/flash_can.py", line 622, in main
    loop.run_until_complete(sock.run(intf, uuid, fpath, req_only))
  File "/usr/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete
    return future.result()
  File "/home/sebastian/./katapult/scripts/flash_can.py", line 483, in run
    await flasher.finish()
  File "/home/sebastian/./katapult/scripts/flash_can.py", line 272, in finish
    await self.send_command("COMPLETE")
  File "/home/sebastian/./katapult/scripts/flash_can.py", line 193, in send_command
    raise FlashCanError("Error sending command [%s] to Can Device"
FlashCanError: Error sending command [COMPLETE] to Can Device

my katapult make menuconfig and Klipper make menuconfig

##Manta E3EZ Config for Katapult/Canboot 
#           Katapult Configuration v0.0.1-59-g0ac72fc
#    Micro-controller Architecture (STMicroelectronics STM32)  --->
#    Processor model (STM32G0B1)  --->
#    Build Katapult deployment application (Do not build)  --->
#    Clock Reference (8 MHz crystal)  --->
#    Communication interface (CAN bus (on PD12/PD13))  --->
#    Application start offset (8KiB offset)  --->
#(1000000) CAN bus speed
#()  GPIO pins to set on bootloader entry
#[*] Support bootloader entry on rapid double click of reset button
#[ ] Enable bootloader entry on button (or gpio) state
#[*] Enable Status LED
#(PC7)   Status LED GPIO Pin

##Bootloader (hold Boot and press reset)
sudo dfu-util -a 0 -D ~/katapult/out/canboot.bin --dfuse-address 0x08000000:force:mass-erase -d 0483:df11



##Klipper Config for Manta E3EZ needs CanBoot/katapult
#            Klipper Firmware Configuration
#[*] Enable extra low-level configuration options
#    Micro-controller Architecture (STMicroelectronics STM32)  --->
#    Processor model (STM32G0B1)  --->
#    Bootloader offset (8KiB bootloader)  --->
#    Clock Reference (8 MHz crystal)  --->
#    Communication interface (USB to CAN bus (USB on PA11/PA12))  --->
#    CAN bus interface (CAN bus (on PB12/PB13))  --->
#(1000000) CAN bus speed
#(PC7)  GPIO pins to set at micro-controller startup





##Klipper (bin depend on device) (hold Boot and press reset)
sudo dfu-util -a 0 -d 0483:df11 --dfuse-address 0x08002000:force:leave -D ~/klipper/out/klipper.bin
#this above works


ip addr
11: can0: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc pfifo_fast state UP group default qlen 2048
    link/can 

but if I would do an update over can0 the above error occurs

@swaaws swaaws changed the title can't flash over cannot can't flash over canboot Dec 22, 2023
@swaaws swaaws changed the title can't flash over canboot can't flash over canboot manta E3EZ Dec 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant