Giter VIP home page Giter VIP logo

Comments (11)

christoph2 avatar christoph2 commented on June 26, 2024

Could you run xcphello.py with -l DEBUG option and post the trace or at least confirm that you are using MAX_DLC_REQUIRED=true option?
Looks much like padded CAN frames -- shortUpload currently just returns the raw response, which would be an explanation for this behaviour, even correct if address granularity == 1 ...
But anyways, I'll fix it.

from pyxcp.

christoph2 avatar christoph2 commented on June 26, 2024

probably fixed by latest commit

from pyxcp.

MYAN1998 avatar MYAN1998 commented on June 26, 2024

This is my other GitHub account. I will try it out tomorrow. Thank you very much

from pyxcp.

MYAN65536 avatar MYAN65536 commented on June 26, 2024

Hi!
The above issues have been resolved.Thank you very much.But when I read two bytes of data, the following error is displayed.
Snipaste_2023-12-08_12-41-16

from pyxcp.

christoph2 avatar christoph2 commented on June 26, 2024

Note regarding UPLOAD and SHORT_UPLOAD:
Parameter length requests a number of elements NOT bytes!
That is length multiplied by address granularity (1, 2, or 4 bytes); you get this information by inspecting/printing slaveProperties, as you did in your first screenshot (unfortunately AG isn't visible...).
An AG of 4 would fit in the picture:

  • maxCto is 8 bytes (obviously CAN classic).
  • max. payload is maxCto minus one byte result code (0xff) ==> 7 bytes.
  • 2 elements ==> 8 bytes, one off, ERR_OUT_OF_RANGE.

from pyxcp.

christoph2 avatar christoph2 commented on June 26, 2024

One thing I forgot to mention:
the addressGranularity member of slaveProperties is more or less decorative in the first place;
since the last commit there's a new property bytesPerElement which could directly used in calculations.

from pyxcp.

christoph2 avatar christoph2 commented on June 26, 2024

Also new: Warning if max. SHORT_UPLOAD maxload is exceeded.

image

from pyxcp.

MYAN65536 avatar MYAN65536 commented on June 26, 2024

Thank you very much.
When a connection request is executed, slave replies with the following packets 'FF 05 41 08 00 08 01 01'. So I think AG is equal to 1.
Snipaste_2023-12-08_15-55-11
Snipaste_2023-12-08_15-55-47

from pyxcp.

christoph2 avatar christoph2 commented on June 26, 2024

Hmm, really strange.
You may try some tests:

ADDR=0x20003bfc

# Should work, if there is no access protection in this range.
for addr in range(ADDR-4, ADDR+4):
    x.shortUpload(1, addr, 0)

# same, with two elements/bytes.
for addr in range(ADDR-4, ADDR+4):
    x.shortUpload(2, addr, 0)

# you should also test other known-good addresses from your A2L.

x.setMta(ADDR-8, 0) 
data = x.fetch(16) # calls UPLOAD not SHORT_UPLOAD under the hood.

from pyxcp.

MYAN65536 avatar MYAN65536 commented on June 26, 2024

OK.Thank you very much

from pyxcp.

MYAN65536 avatar MYAN65536 commented on June 26, 2024

Hi!
I tried the following.The response of the slave is correct, but the terminal does not print a response.
Snipaste_2023-12-11_14-17-54
Snipaste_2023-12-11_14-17-25

from pyxcp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.