Jump to content
  • 0

Another "My Can Dont Work" Question


Squibo

Question

Hi all,

 

Annoyingly I shorted my can board in an embarrasing way.

Got a new one and decided to just start from a fresh install of mainsail as that was playing up a bit since the canbus breaking update, everything seemed to be going to plan untill the "python3 ~/katapult/scripts/flashtool.py -i can0 -q" command, then i get the below error.

I've tried going back and reflashing things several times using the Esoterical canbus guide, but cant get past this point, I'm not smart enough to know what the actual error is, any ideas what I did wrong?

 

 

ERROR:root:Flash Error
Traceback (most recent call last):
  File "/home/pi/katapult/scripts/flashtool.py", line 491, in run_query
    self.cansock.bind((intf,))
OSError: [Errno 19] No such device

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/pi/katapult/scripts/flashtool.py", line 619, in main
    loop.run_until_complete(sock.run_query(intf))
  File "/usr/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete
    return future.result()
  File "/home/pi/katapult/scripts/flashtool.py", line 493, in run_query
    raise FlashCanError("Unable to bind socket to can0")
FlashCanError: Unable to bind socket to can0
 

 

 

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

So I assume since you are at this command, you flashed Katapult succesfully on your board (I hope the right one (STM32 or RP2040))

This you have done with a connected USB cable from your PI to your CAN board... right?

Now you have connected it on 24V with the canbus wires H/L .. correct?

After this you ran the command and didnt find anything? Just to verify at what point you are?

If above is correct...

Check your wires, that would be first, H/L not wrong way around and is the plug in far enough, sounds wierd, but with some plugs it only connects right at the last mm..

(yes been there)

If it poweres up right an connection is right, check if your CAN0 settings are still correct and I myself would re-flash KAtapult because maybe you selected the wrong settings in the makemenu options, its so easy to make a mistake, make sure you look up your board specific settings.

https://canbus.esoterical.online/toolhead_flashing/common_hardware

Because if you did succesfully follow all and it flashed succesfully, you should be able to see something.

I also find it strange the script throws an error like this tbh, normally it give NO result or A result, but never an error on the script.

  • Like 2
Link to comment
Share on other sites

  • 0
2 hours ago, Squibo said:

Unable to bind socket to can0

Take a look at esotericals troubleshooting guide.

Number 1 mentions your error.

meaning your can network is not there... No idea what is going on but everything is possible since you have been done so much now, with two different boards. And no idea if you have only followed Esotericals guide.

But if you follow the recommendation on that page, and all still does not work, you can either try to find Esoterical himself (and several very knowledgeable people) on Voron discord in the Toolhead PCB channel and ask, or run the debug script and send us the link to look at if we can help you with your problem.

 

  • Like 1
Link to comment
Share on other sites

  • 0

Seems the Can0 network is down or not found. 

Check for network

ip a

You should get in return:

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

then issue the following command:

ip -details -statistics link show can0

You should get something like this:

can0: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1024
link/can  promiscuity 0 minmtu 0 maxmtu 0
can state ERROR-ACTIVE restart-ms 0
        bitrate 1000000 sample-point 0.750
        tq 62 prop-seg 5 phase-seg1 6 phase-seg2 4 sjw 1
        gs_usb: tseg1 1..16 tseg2 1..8 sjw 1..4 brp 1..1024 brp-inc 1
        clock 48000000
        re-started bus-errors arbit-lost error-warn error-pass bus-off
        0          0          0          0          0          0         numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535
RX: bytes  packets  errors  dropped overrun mcast
11412      1551     0       0       0       0
TX: bytes  packets  errors  dropped carrier collsns
3568       641      0       0       0       0

If not, set up a can network:

sudo nano /etc/network/interfaces.d/can0

and enter into the editor:

allow-hotplug can0
iface can0 can static
  bitrate 1000000
  up ifconfig $IFACE txqueuelen 1024

Reboot everything and retry again.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...