Jump to content
View in the app

A better way to browse. Learn more.

Tinkerunity

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

On Error in CAN V2 Brick reset or restart Brick (in Python)

Featured Replies

Geschrieben

Hello I dont know how to read the Error out of the Program ich tried this.

ErrorLog = can.get_error_log()
print(str(ErrorLog))

the answer is this:

ErrorLoG:
ErrorLog(transceiver_state=0, transceiver_write_error_level=0, transceiver_read_error_level=0, transceiver_stuffing_error_count=0, transceiver_format_error_count=0, transceiver_ack_error_count=0, transceiver_bit1_error_count=197, transceiver_bit0_error_count=0, transceiver_crc_error_count=0, write_buffer_timeout_error_count=0, read_buffer_overflow_error_count=0, read_buffer_overflow_error_occurred=(False, False), read_backlog_overflow_error_count=0)
Press key to exit

When i have an Error on the CAN Brick V2 (Red LED is on), i want to reset the Brick or if anyboday has an idear how to solve this?

If i have an erroe i tried this:

HOST = "localhost"
PORT = 4223
UID_can = "can"     # Change XYZ to the UID of your CAN In Bricklet 2.0
from tinkerforge.bricklet_can_v2 import BrickletCANV2
from tinkerforge.ip_connection import IPConnection
ipcon = IPConnection() # Create IP connection
can = BrickletCANV2(UID_can, ipcon)
Reset = can.reset()
HOST = "localhost"
PORT = 4223
UID_can = "can"     # Change XYZ to the UID of your CAN In Bricklet 2.0
from tinkerforge.bricklet_can_v2 import BrickletCANV2
from tinkerforge.ip_connection import IPConnection
ipcon = IPConnection() # Create IP connection
can = BrickletCANV2(UID_can, ipcon)

 

But i get an Error (I deletet my folder ;)):

Traceback (most recent call last):
  File "C:/Users/.../ErrorLogTest.py", line 8, in <module>
    Reset = can.reset()
  File "C:/Users/...\tinkerforge\bricklet_can_v2.py", line 697, in reset
    self.check_validity()
  File "C:/Users/...\tinkerforge\ip_connection.py", line 506, in check_validity
    device_identifier = self.ipcon.send_request(self, 255, (), '', 33, '8s 8s c 3B 3B H')[5] # <device>.get_identity
  File "C:/Users/...\tinkerforge\ip_connection.py", line 1302, in send_request
    self.send(request)
  File "C:/Users/...\tinkerforge\ip_connection.py", line 1274, in send
    raise Error(Error.NOT_CONNECTED, 'Not connected')
tinkerforge.ip_connection.Error: Not connected (-8)

So anybody can help me with this problem?

  • 2 months later...
Geschrieben

As the "Not connected" error indicates, you didn't connect the IP Connection. Take a look at any of our Python examples. Before the can.reset() call you have to call ipcon.connect(HOST, PORT).

But you should figure out where the bit1 errors are coming from. Double check you electrical CAN bus connection. Did you mix up CAN-low and CAN-high?

Also, your post seem to be from May 28 2021, but you seem to have registered your account on August 23 2021 (yesterday). This is confusing me.

Join the conversation

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

Gast
Reply to this topic...

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.