Coder Social home page Coder Social logo

Comments (5)

ashrafalhajjeh avatar ashrafalhajjeh commented on August 16, 2024

After doing a little digging into this issue, here's what I found:
In pdu.c, the PDU length is packed on lines (269->272) as big-endian:
pdu_c_length_gen

In pdu.c, the received file data packet struct generation also interprets PDU length as big-endian:
pdu_c_fd_struct_len
pdu_c_fd_struct_len_2
which is good.

The reason I was having issues now come from the following two pieces of code:
In cf_app.c:
cf_app_c_length_usage
In pdu.c:
pdu_c_nak_struct_len

Where the length is interpreted as a struct parameter assuming the machine's endianness (in my case little-endian). In the cf_app.c case, this forced me to create a very large incoming packet buffer (>60k bytes) for file chunks of just 200-500 bytes. In the pdu.c case, I ended up running into the "Incoming Nak truncated to fit in storage" message due to the pdu length indicating a large memory size for the NAK struct creation.

I think the two areas that use the length in an endianness dependent manner should be changed to accommodate running on a little-endian machine.

from cf.

moafandi0 avatar moafandi0 commented on August 16, 2024

I had the same issue. When I changed the code at cf_app.c line 1030 and added the CFE_MAKE_BIG16 macro it worked. I could get class 1 transactions working but I'm having issues with class 2 transactions. Did you have any success with class 2 transactions? @ashrafalhajjeh

from cf.

skliper avatar skliper commented on August 16, 2024

I realize this isn't immediate help, but just a heads up that there is a major update to CF in the works that we plan to release open source.

from cf.

moafandi0 avatar moafandi0 commented on August 16, 2024

@skliper I guess I'm just gonna wait for the new update then and work on other stuff for now.

from cf.

skliper avatar skliper commented on August 16, 2024

Closing as obsolete (applies to v2.X)

from cf.

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.