Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Protocol SAE J1939 with Can Bus Qt
QtWS25 Last Chance

Protocol SAE J1939 with Can Bus Qt

Scheduled Pinned Locked Moved Unsolved General and Desktop
6 Posts 3 Posters 2.8k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • W Offline
    W Offline
    Whazzark
    wrote on 6 Jun 2018, 09:59 last edited by Whazzark 6 Jun 2018, 10:08
    #1

    Hi all Qt developpers,

    First of all it's my first topic on Qt Forum so if i'm doing something wrong just tell me :)

    I'm currently working on an QML application using Can Bus and is it possible to send J1939 protocol frames with the class QCanBusFrame ?

    Thanks for your advices.

    A 1 Reply Last reply 6 Jun 2018, 10:46
    0
    • W Whazzark
      6 Jun 2018, 09:59

      Hi all Qt developpers,

      First of all it's my first topic on Qt Forum so if i'm doing something wrong just tell me :)

      I'm currently working on an QML application using Can Bus and is it possible to send J1939 protocol frames with the class QCanBusFrame ?

      Thanks for your advices.

      A Offline
      A Offline
      aha_1980
      Lifetime Qt Champion
      wrote on 6 Jun 2018, 10:46 last edited by
      #2

      Hi @Whazzark, welcome to the forums :)

      I'm currently working on an QML application using Can Bus

      Ok, cool. We currently don't have QML bindings for the CAN bus module, so any experience (and maybe contribution) in this direction is much appreciated.

      is it possible to send J1939 protocol frames with the class QCanBusFrame ?

      Why shouldn't it? J1939 is just CAN 2.0 with extended frame format, so you just have to pack your J1939 frames into CAN frames.

      There is also the idea of improving QCanBus so it supports J1939 directly, but as the standard is "half-closed" nothing happened in this direction so far.

      But I have worked like this 12 years ago already when I wrote my diploma thesis about a J1939 system.

      Regards

      Qt has to stay free or it will die.

      W 1 Reply Last reply 6 Jun 2018, 11:03
      2
      • A aha_1980
        6 Jun 2018, 10:46

        Hi @Whazzark, welcome to the forums :)

        I'm currently working on an QML application using Can Bus

        Ok, cool. We currently don't have QML bindings for the CAN bus module, so any experience (and maybe contribution) in this direction is much appreciated.

        is it possible to send J1939 protocol frames with the class QCanBusFrame ?

        Why shouldn't it? J1939 is just CAN 2.0 with extended frame format, so you just have to pack your J1939 frames into CAN frames.

        There is also the idea of improving QCanBus so it supports J1939 directly, but as the standard is "half-closed" nothing happened in this direction so far.

        But I have worked like this 12 years ago already when I wrote my diploma thesis about a J1939 system.

        Regards

        W Offline
        W Offline
        Whazzark
        wrote on 6 Jun 2018, 11:03 last edited by
        #3

        @aha_1980 Thank you for your reply.

        Yeah you're right I just combine QML graphics and Can bus module in C++ :)

        I was wondering about that because the QCanBusFrame class cannot set up PGN and PDU field directly on the frame and I have to send a frame with 611184 as PGN number. So I thought it wasn't possible to do it with this class.

        Maybe I am clearer with this answer :)

        Regards.

        A J 2 Replies Last reply 7 Jun 2018, 04:53
        0
        • W Whazzark
          6 Jun 2018, 11:03

          @aha_1980 Thank you for your reply.

          Yeah you're right I just combine QML graphics and Can bus module in C++ :)

          I was wondering about that because the QCanBusFrame class cannot set up PGN and PDU field directly on the frame and I have to send a frame with 611184 as PGN number. So I thought it wasn't possible to do it with this class.

          Maybe I am clearer with this answer :)

          Regards.

          A Offline
          A Offline
          aha_1980
          Lifetime Qt Champion
          wrote on 7 Jun 2018, 04:53 last edited by
          #4

          hi @Whazzark,

          is your project open source? if you look at QTBUG-59441, we have the idea to have protocol specific classes on top of QCanBusFrame.

          this has not evolved yet, but with your requirement (and help - hint hint hint) we could start modeling something. in a first draft, I'd model a QJ1939Frame that does the bit fiddling to build up a QCanBusFrame and vice versa.

          unfortunately i dont have the spec and I'm not willing to pay for it just for fun...

          what do you think?

          Qt has to stay free or it will die.

          W 1 Reply Last reply 7 Jun 2018, 07:36
          0
          • A aha_1980
            7 Jun 2018, 04:53

            hi @Whazzark,

            is your project open source? if you look at QTBUG-59441, we have the idea to have protocol specific classes on top of QCanBusFrame.

            this has not evolved yet, but with your requirement (and help - hint hint hint) we could start modeling something. in a first draft, I'd model a QJ1939Frame that does the bit fiddling to build up a QCanBusFrame and vice versa.

            unfortunately i dont have the spec and I'm not willing to pay for it just for fun...

            what do you think?

            W Offline
            W Offline
            Whazzark
            wrote on 7 Jun 2018, 07:36 last edited by
            #5

            @aha_1980 Unfortunately it isn't open source .. During my research I found this and it could be a good idea to implement this in Qt.

            I would be honor to help the framework to rule them all ! If my work can help other you have my words that I could help.

            Regards.

            1 Reply Last reply
            0
            • W Whazzark
              6 Jun 2018, 11:03

              @aha_1980 Thank you for your reply.

              Yeah you're right I just combine QML graphics and Can bus module in C++ :)

              I was wondering about that because the QCanBusFrame class cannot set up PGN and PDU field directly on the frame and I have to send a frame with 611184 as PGN number. So I thought it wasn't possible to do it with this class.

              Maybe I am clearer with this answer :)

              Regards.

              J Offline
              J Offline
              JKSH
              Moderators
              wrote on 7 Jun 2018, 14:12 last edited by
              #6

              @Whazzark said in Protocol SAE J1939 with Can Bus Qt:

              the QCanBusFrame class cannot set up PGN and PDU field directly on the frame and I have to send a frame with 611184 as PGN number.

              QCanBusFrame does not understand PGNs, but it understands the 29-bit CAN identifier.

              You can use bit shifting to create a 29-bit identifier that contains the 18-bit PGN. See:

              • https://www.ixxat.com/images/librariesprovider8/technologies/all4can/j1939-technology-identifier.png?sfvrsn=904b4d6_2&MaxWidth=500&MaxHeight=&ScaleUp=false&Quality=High&Method=ResizeFitToAreaArguments&Signature=7528B5FEEECE73B9DF4697F1F53FA27B60129F63
              • http://slideplayer.com/slide/10852377/39/images/16/Data+Link+Layer+SAE+J1939/21+29+Bit+ID+PRI+PGN+SA+28…26+25+24+23…16.jpg

              This is the simple part. The harder part is writing code that ensure the CAN frames are sent and received in a specific order, as required by the J1939 protocol.

              Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

              1 Reply Last reply
              2

              2/6

              6 Jun 2018, 10:46

              4 unread
              • Login

              • Login or register to search.
              2 out of 6
              • First post
                2/6
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved