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. No such plugin:"peakcan" on Raspi
Qt 6.11 is out! See what's new in the release blog

No such plugin:"peakcan" on Raspi

Scheduled Pinned Locked Moved Solved General and Desktop
15 Posts 4 Posters 1.9k 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.
  • Y Offline
    Y Offline
    y.exars
    wrote on last edited by
    #1

    I have use peakcan with raspi but it not working.(Qt version 5.7.1)

    According to debug output the peakcan interface also available, createDevice(…) always returns false.

    I have using QT on rasberry pi should I have to change any setting?? and how can I check USB??

    if(QCanBus::instance()->plugins().contains("peakcan")){
        // plugin available
    }
    const QString errorString;
    device = QCanBus::instance()->createDevice("peakcan",QStringLiteral("usb0"),(QString*)&errorString);
    if(!device){
        //Error handling goes here
        qDebug() << errorString;
        return;
    }else{
        connect(device, &QCanBusDevice::framesReceived, this , &MainWindow::canreceived);
        device->setConfigurationParameter(QCanBusDevice::BitRateKey,500000);
        if(device->connectDevice() == false){
            ui->label->setText(QString(" not connected"));
            return;
        }
    }
    
    1 Reply Last reply
    0
    • Y y.exars

      @kuzulis

      but I already installed qtserialbus by using

      sudo apt-get install libqt5serialbus5-dev
      

      this one, doesn't install qtserialbus plugins ??

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #14

      @y-exars said in No such plugin:"peakcan" on Raspi:

      doesn't install qtserialbus plugins ??

      No
      libqt5serialbus5-plugins does

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1
      • C Offline
        C Offline
        ChrisW67
        wrote on last edited by
        #2

        What is returned in errorString?
        What is returned by QCanBus::availableDevices("peakcan")?

        1 Reply Last reply
        0
        • Y Offline
          Y Offline
          y.exars
          wrote on last edited by y.exars
          #3

          @ChrisW67
          at debug window I got this:

          09:25:01: Debugging starts
          &"warning: GDB: Failed to set controlling terminal: \343\203\207\343\203\220\343\202\244\343\202\271\343\201\253\345\257\276\343\201\231\343\202\213\344\270\215\351\201\251\345\210\207\343\201\252ioctl\343\201\247\343\201\231\n"
          libEGL warning: DRI2: failed to authenticate
          qt5ct: using qt5ct plugin
          qt5ct: D-Bus global menu: no
          "No such plugin: 'peakcan'"
          09:25:16: Debugging has finished

          1 Reply Last reply
          0
          • C Offline
            C Offline
            ChrisW67
            wrote on last edited by
            #4

            And the second question?

            Y 2 Replies Last reply
            0
            • C ChrisW67

              And the second question?

              Y Offline
              Y Offline
              y.exars
              wrote on last edited by
              #5

              @ChrisW67
              the same
              "No such plugin:'peakcan'"

              1 Reply Last reply
              0
              • C ChrisW67

                And the second question?

                Y Offline
                Y Offline
                y.exars
                wrote on last edited by
                #6

                @ChrisW67
                It doesn't have any deviecs Avaliable.

                1 Reply Last reply
                0
                • K Offline
                  K Offline
                  kuzulis
                  Qt Champions 2020
                  wrote on last edited by kuzulis
                  #7

                  That means that you has did not installed the peack-can plugin in your Raspi. Maybe it is in the Raspi repository, also maybe something else. You can search for this shared library in your Raspi file system where the Qt installed.

                  It is a question to the Raspi maintainers.

                  1 Reply Last reply
                  0
                  • K Offline
                    K Offline
                    kuzulis
                    Qt Champions 2020
                    wrote on last edited by
                    #8

                    Besides, to use the PEAKCAN you need to install to the Raspi the PEAK-CAN vendor drivers and specific shared libraries downloaded from the PEAK-CAN WEB site. Are you sure that you have all these requirements? Read the documentation at first: https://doc.qt.io/qt-6/qtserialbus-peakcan-overview.html

                    UPD: You can use the socket-can plugin with the PEAK-CAN adapters, that does work by default. The PEAK-CAN adapter is detected in Linux as usual socket-can device (AFAIK).

                    Y 1 Reply Last reply
                    0
                    • K kuzulis

                      Besides, to use the PEAKCAN you need to install to the Raspi the PEAK-CAN vendor drivers and specific shared libraries downloaded from the PEAK-CAN WEB site. Are you sure that you have all these requirements? Read the documentation at first: https://doc.qt.io/qt-6/qtserialbus-peakcan-overview.html

                      UPD: You can use the socket-can plugin with the PEAK-CAN adapters, that does work by default. The PEAK-CAN adapter is detected in Linux as usual socket-can device (AFAIK).

                      Y Offline
                      Y Offline
                      y.exars
                      wrote on last edited by
                      #9

                      @kuzulis
                      I already Installed Peakcan driver before. but I had wrote the below code and didn't have any return or deivces showed

                      const QStringList plugins = QCanBus::instance()->plugins();
                      
                      for (auto plugin : plugins) {
                          QString errorString;
                          const QList<QCanBusDeviceInfo> devices = 
                                QCanBus::instance()->availableDevices(
                                      plugin, &errorString);
                          if (!errorString.isEmpty())
                              qDebug() << plugin << errorString;
                          for (auto device : devices)
                              qDebug() << plugin << device.name();
                      }
                      
                      1 Reply Last reply
                      0
                      • K Offline
                        K Offline
                        kuzulis
                        Qt Champions 2020
                        wrote on last edited by
                        #10

                        @y-exars said in No such plugin:"peakcan" on Raspi:

                        const QStringList plugins = QCanBus::instance()->plugins();

                        does plugins contains peakcan ?

                        Y 1 Reply Last reply
                        0
                        • K kuzulis

                          @y-exars said in No such plugin:"peakcan" on Raspi:

                          const QStringList plugins = QCanBus::instance()->plugins();

                          does plugins contains peakcan ?

                          Y Offline
                          Y Offline
                          y.exars
                          wrote on last edited by
                          #11

                          @kuzulis

                          program did not run into

                          for (auto plugin : plugins)
                          

                          while debug plugin is show 0

                          1 Reply Last reply
                          0
                          • K Offline
                            K Offline
                            kuzulis
                            Qt Champions 2020
                            wrote on last edited by
                            #12

                            Well, it means that your Raspi has not any qtserialbus plugins installed. Maybe they are in the different packages of Raspi repository. You need to install them.

                            Y 1 Reply Last reply
                            0
                            • K kuzulis

                              Well, it means that your Raspi has not any qtserialbus plugins installed. Maybe they are in the different packages of Raspi repository. You need to install them.

                              Y Offline
                              Y Offline
                              y.exars
                              wrote on last edited by
                              #13

                              @kuzulis

                              but I already installed qtserialbus by using

                              sudo apt-get install libqt5serialbus5-dev
                              

                              this one, doesn't install qtserialbus plugins ??

                              jsulmJ 1 Reply Last reply
                              0
                              • Y y.exars

                                @kuzulis

                                but I already installed qtserialbus by using

                                sudo apt-get install libqt5serialbus5-dev
                                

                                this one, doesn't install qtserialbus plugins ??

                                jsulmJ Offline
                                jsulmJ Offline
                                jsulm
                                Lifetime Qt Champion
                                wrote on last edited by
                                #14

                                @y-exars said in No such plugin:"peakcan" on Raspi:

                                doesn't install qtserialbus plugins ??

                                No
                                libqt5serialbus5-plugins does

                                https://forum.qt.io/topic/113070/qt-code-of-conduct

                                1 Reply Last reply
                                1
                                • Y Offline
                                  Y Offline
                                  y.exars
                                  wrote on last edited by
                                  #15
                                  This post is deleted!
                                  1 Reply Last reply
                                  0

                                  • Login

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