Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Collapse
Brand Logo

ModalAI Forum

  1. ModalAI Support Forum
  2. FAQs
  3. voxl_spi_init, failed to open /dev/spidev device: No such file or directory.

voxl_spi_init, failed to open /dev/spidev device: No such file or directory.

Scheduled Pinned Locked Moved FAQs
30 Posts 4 Posters 8.5k Views 2 Watching
  • 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.
  • 이광철이 Offline
    이광철이 Offline
    이광철
    Contributor
    wrote on last edited by
    #1

    Hello.

    I have voxl2 mini.

    The system and kernel versions are as follows.

    system-image: 1.7.1-M0104-14.1a-perf-nightly-20231025
    kernel: #1 SMP PREEMPT Thu Oct 26 04:23:26 UTC 2023 4.19.125
    hw version: M0104
    voxl-suite: 1.1.2

    I want to use j10 External UART in spi mode.
    I called the voxl_spi_init function as below.

    SPI_BUS = 14;
    if (voxl_spi_init(SPI_BUS, SPI_MODE_0, 12000000) < 0)
    return FALSE;

    The result is ERROR in voxl_spi_init, failed to open /dev/spidev device: No such file or directory.

    The results of ls -al /dev/spi* are as follows:
    crw------- 1 root root 153, 0 Mar 2 2023 spidev0.0
    crw------- 1 root root 153, 1 Mar 2 2023 spidev3.0

    The result of voxl-gpio -r 67 are as follows:
    1

    where is spidev14.0?
    Or what am I doing wrong?

    Thanks.

    Alex KushleyevA 1 Reply Last reply
    0
    • 이광철이 이광철

      Hello.

      I have voxl2 mini.

      The system and kernel versions are as follows.

      system-image: 1.7.1-M0104-14.1a-perf-nightly-20231025
      kernel: #1 SMP PREEMPT Thu Oct 26 04:23:26 UTC 2023 4.19.125
      hw version: M0104
      voxl-suite: 1.1.2

      I want to use j10 External UART in spi mode.
      I called the voxl_spi_init function as below.

      SPI_BUS = 14;
      if (voxl_spi_init(SPI_BUS, SPI_MODE_0, 12000000) < 0)
      return FALSE;

      The result is ERROR in voxl_spi_init, failed to open /dev/spidev device: No such file or directory.

      The results of ls -al /dev/spi* are as follows:
      crw------- 1 root root 153, 0 Mar 2 2023 spidev0.0
      crw------- 1 root root 153, 1 Mar 2 2023 spidev3.0

      The result of voxl-gpio -r 67 are as follows:
      1

      where is spidev14.0?
      Or what am I doing wrong?

      Thanks.

      Alex KushleyevA Offline
      Alex KushleyevA Offline
      Alex Kushleyev
      ModalAI Team
      wrote on last edited by
      #2

      @이광철 ,

      Make sure you are using correct spi device path.

      voxl2:/$ ls /dev/spidev*
      /dev/spidev0.0  /dev/spidev11.0  /dev/spidev14.0  /dev/spidev3.0
      
      1 Reply Last reply
      0
      • adminA Offline
        adminA Offline
        admin
        admin
        wrote on last edited by
        #3

        Hi @이광철 ,

        We defaulted this interface to SPI starting in SDK 1.1.2.

        Link Preview Image
        VOXL 2 Mini Linux User Guide

        ModalAI technical documentation for VOXL and VOXL 2 Companion Computers for PX4 and ArduPilot Obstacle Avoidance and GPS-denied navigation, assembled in the USA

        favicon

        ModalAI Technical Docs (docs.modalai.com)

        Link Preview Image
        VOXL 2/VOXL2 Mini System Image

        ModalAI technical documentation for VOXL and VOXL 2 Companion Computers for PX4 and ArduPilot Obstacle Avoidance and GPS-denied navigation, assembled in the USA

        favicon

        ModalAI Technical Docs (docs.modalai.com)

        ae312240-e5ce-4587-be4d-b8c5d045463d-image.png

        It can be converted back to SPI with a kernel change and rebuild if you are able to try that.
        https://docs.modalai.com/voxl2-kernel-build-guide/

        Enable:
        https://gitlab.com/voxl-public/system-image-build/meta-voxl2-bsp/-/blob/qrb5165-ubun1.0-14.1a/recipes-kernel/linux-msm/files/dts/m0104/m0104-modalai-qupv3.dtsi?ref_type=heads#L93
        Disable:
        https://gitlab.com/voxl-public/system-image-build/meta-voxl2-bsp/-/blob/qrb5165-ubun1.0-14.1a/recipes-kernel/linux-msm/files/dts/m0104/m0104-modalai-qupv3.dtsi?ref_type=heads#L98

        이광철이 1 Reply Last reply
        0
        • adminA admin

          Hi @이광철 ,

          We defaulted this interface to SPI starting in SDK 1.1.2.

          Link Preview Image
          VOXL 2 Mini Linux User Guide

          ModalAI technical documentation for VOXL and VOXL 2 Companion Computers for PX4 and ArduPilot Obstacle Avoidance and GPS-denied navigation, assembled in the USA

          favicon

          ModalAI Technical Docs (docs.modalai.com)

          Link Preview Image
          VOXL 2/VOXL2 Mini System Image

          ModalAI technical documentation for VOXL and VOXL 2 Companion Computers for PX4 and ArduPilot Obstacle Avoidance and GPS-denied navigation, assembled in the USA

          favicon

          ModalAI Technical Docs (docs.modalai.com)

          ae312240-e5ce-4587-be4d-b8c5d045463d-image.png

          It can be converted back to SPI with a kernel change and rebuild if you are able to try that.
          https://docs.modalai.com/voxl2-kernel-build-guide/

          Enable:
          https://gitlab.com/voxl-public/system-image-build/meta-voxl2-bsp/-/blob/qrb5165-ubun1.0-14.1a/recipes-kernel/linux-msm/files/dts/m0104/m0104-modalai-qupv3.dtsi?ref_type=heads#L93
          Disable:
          https://gitlab.com/voxl-public/system-image-build/meta-voxl2-bsp/-/blob/qrb5165-ubun1.0-14.1a/recipes-kernel/linux-msm/files/dts/m0104/m0104-modalai-qupv3.dtsi?ref_type=heads#L98

          이광철이 Offline
          이광철이 Offline
          이광철
          Contributor
          wrote on last edited by
          #4

          @admin

          Do I need to change the kernel to use spi14 using the voxl_spi_init function?
          or
          Is this possible using voxl2_SDK_1.1.1?

          Thanks

          Alex KushleyevA 1 Reply Last reply
          0
          • 이광철이 이광철

            @admin

            Do I need to change the kernel to use spi14 using the voxl_spi_init function?
            or
            Is this possible using voxl2_SDK_1.1.1?

            Thanks

            Alex KushleyevA Offline
            Alex KushleyevA Offline
            Alex Kushleyev
            ModalAI Team
            wrote on last edited by
            #5

            @이광철 yes, you have to to switch the kernel. you can try using the old kernel from sdk 1.1.1. You can test it before flashing permanently : https://docs.modalai.com/voxl2-kernel-build-guide/#test . I dont see any significant changes in 1.1.2 that may affect you, but you should test before overwriting your kernel

            이광철이 1 Reply Last reply
            0
            • Alex KushleyevA Alex Kushleyev

              @이광철 yes, you have to to switch the kernel. you can try using the old kernel from sdk 1.1.1. You can test it before flashing permanently : https://docs.modalai.com/voxl2-kernel-build-guide/#test . I dont see any significant changes in 1.1.2 that may affect you, but you should test before overwriting your kernel

              이광철이 Offline
              이광철이 Offline
              이광철
              Contributor
              wrote on last edited by
              #6

              @Alex-Kushleyev

              Hi.
              I rebuilt the kernel referring to your advice.

              The modified contents are as follows.
              modify file: build_mount/lu.um.1.2.1/apps_proc/poky/meta-voxl2-bsp/recipes-kernel/linux-msm/files/dts/m0104/m0104-modalai-qupv3.dtsi

              /* M0104 - J10 - GPIO 40-44 */
              &qupv3_se14_spi {
              status = "ok";
              };

              /* M0104 - J10 JST connector */
              &qupv3_se14_2uart {
              status = "ok";
              };

              ./qrb5165-clean.sh
              ./qrb5165-build.sh -m M0104

              After building the kernel, ttyMSM0 was created in /dev.
              However, spidev14.0 is still not found.

              ls /dev/spidev*
              spidev0.0 spidev3.0

              I'm looking forward to your advice.
              Thanks.

              Alex KushleyevA 1 Reply Last reply
              0
              • 이광철이 이광철

                @Alex-Kushleyev

                Hi.
                I rebuilt the kernel referring to your advice.

                The modified contents are as follows.
                modify file: build_mount/lu.um.1.2.1/apps_proc/poky/meta-voxl2-bsp/recipes-kernel/linux-msm/files/dts/m0104/m0104-modalai-qupv3.dtsi

                /* M0104 - J10 - GPIO 40-44 */
                &qupv3_se14_spi {
                status = "ok";
                };

                /* M0104 - J10 JST connector */
                &qupv3_se14_2uart {
                status = "ok";
                };

                ./qrb5165-clean.sh
                ./qrb5165-build.sh -m M0104

                After building the kernel, ttyMSM0 was created in /dev.
                However, spidev14.0 is still not found.

                ls /dev/spidev*
                spidev0.0 spidev3.0

                I'm looking forward to your advice.
                Thanks.

                Alex KushleyevA Offline
                Alex KushleyevA Offline
                Alex Kushleyev
                ModalAI Team
                wrote on last edited by
                #7

                @이광철 , you need to disable uart:

                /* M0104 - J10 JST connector */
                &qupv3_se14_2uart {
                status = "disabled";
                };
                
                이광철이 1 Reply Last reply
                0
                • Alex KushleyevA Alex Kushleyev

                  @이광철 , you need to disable uart:

                  /* M0104 - J10 JST connector */
                  &qupv3_se14_2uart {
                  status = "disabled";
                  };
                  
                  이광철이 Offline
                  이광철이 Offline
                  이광철
                  Contributor
                  wrote on last edited by
                  #8

                  @Alex-Kushleyev

                  First of all thank you for your advice.
                  build_mount/lu.um.1.2.1/apps_proc/poky/meta-voxl2-bsp/recipes-kernel/linux-msm/files/dts/m0104/m0104-modalai-qupv3.dtsi

                  /* M0104 - J10 - GPIO 40-44 */
                  &qupv3_se14_spi {
                  status = "ok";
                  };

                  /* M0104 - J10 JST connector */
                  &qupv3_se14_2uart {
                  status = "disabled";
                  };

                  Modified as above.

                  After building the kernel, the contents of /dev are as follows.
                  Why doesn't spidev14.0 exist?
                  What am I doing wrong?

                  voxl2-mini:/dev$ ls spidev*
                  spidev0.0 spidev3.0

                  voxl2-mini:/dev$ ls tty*
                  tty tty10 tty13 tty16 tty19 tty21 tty24 tty27 tty3 tty32 tty35 tty38 tty40 tty43 tty46 tty49 tty51 tty54 tty57 tty6 tty62 tty8 ttyprintk
                  tty0 tty11 tty14 tty17 tty2 tty22 tty25 tty28 tty30 tty33 tty36 tty39 tty41 tty44 tty47 tty5 tty52 tty55 tty58 tty60 tty63 tty9
                  tty1 tty12 tty15 tty18 tty20 tty23 tty26 tty29 tty31 tty34 tty37 tty4 tty42 tty45 tty48 tty50 tty53 tty56 tty59 tty61 tty7 ttyMSM0

                  Alex KushleyevA 1 Reply Last reply
                  0
                  • 이광철이 이광철

                    @Alex-Kushleyev

                    First of all thank you for your advice.
                    build_mount/lu.um.1.2.1/apps_proc/poky/meta-voxl2-bsp/recipes-kernel/linux-msm/files/dts/m0104/m0104-modalai-qupv3.dtsi

                    /* M0104 - J10 - GPIO 40-44 */
                    &qupv3_se14_spi {
                    status = "ok";
                    };

                    /* M0104 - J10 JST connector */
                    &qupv3_se14_2uart {
                    status = "disabled";
                    };

                    Modified as above.

                    After building the kernel, the contents of /dev are as follows.
                    Why doesn't spidev14.0 exist?
                    What am I doing wrong?

                    voxl2-mini:/dev$ ls spidev*
                    spidev0.0 spidev3.0

                    voxl2-mini:/dev$ ls tty*
                    tty tty10 tty13 tty16 tty19 tty21 tty24 tty27 tty3 tty32 tty35 tty38 tty40 tty43 tty46 tty49 tty51 tty54 tty57 tty6 tty62 tty8 ttyprintk
                    tty0 tty11 tty14 tty17 tty2 tty22 tty25 tty28 tty30 tty33 tty36 tty39 tty41 tty44 tty47 tty5 tty52 tty55 tty58 tty60 tty63 tty9
                    tty1 tty12 tty15 tty18 tty20 tty23 tty26 tty29 tty31 tty34 tty37 tty4 tty42 tty45 tty48 tty50 tty53 tty56 tty59 tty61 tty7 ttyMSM0

                    Alex KushleyevA Offline
                    Alex KushleyevA Offline
                    Alex Kushleyev
                    ModalAI Team
                    wrote on last edited by
                    #9

                    @이광철 , just to double check.. after building the kernel, did you install it to voxl2 mini?

                    If all else fails, you can test (without overwriting) the kernel from SDK 1.1.1 like this :

                    voxl2-mini_SDK_1.1.1/system-image$ adb reboot bootloader
                    voxl2-mini_SDK_1.1.1/system-image$ fastboot boot qti-ubuntu-robotics-image-m0104-boot.img
                    Sending 'boot.img' (17552 KB)                      OKAY [  0.509s]
                    Booting                                            OKAY [  0.033s]
                    Finished. Total time: 0.553s
                    

                    then adb into the device and check spi port in /dev/

                    이광철이 2 Replies Last reply
                    0
                    • Alex KushleyevA Alex Kushleyev

                      @이광철 , just to double check.. after building the kernel, did you install it to voxl2 mini?

                      If all else fails, you can test (without overwriting) the kernel from SDK 1.1.1 like this :

                      voxl2-mini_SDK_1.1.1/system-image$ adb reboot bootloader
                      voxl2-mini_SDK_1.1.1/system-image$ fastboot boot qti-ubuntu-robotics-image-m0104-boot.img
                      Sending 'boot.img' (17552 KB)                      OKAY [  0.509s]
                      Booting                                            OKAY [  0.033s]
                      Finished. Total time: 0.553s
                      

                      then adb into the device and check spi port in /dev/

                      이광철이 Offline
                      이광철이 Offline
                      이광철
                      Contributor
                      wrote on last edited by
                      #10

                      @Alex-Kushleyev

                      just to double check.. after building the kernel, did you install it to voxl2 mini?
                      Yes
                      I built the kernel and installed it on voxl2-mini.
                      The process is as follows.
                      C:\Users\User\Desktop\OpenSDP\platform-tools_r33.0.3-windows\platform-tools>adb reboot bootloader
                      C:\Users\User\Desktop\OpenSDP\platform-tools_r33.0.3-windows\platform-tools>fastboot flash boot_a qti-ubuntu-robotics-image-m0104-boot.img
                      Sending 'boot_a' (20088 KB) OKAY [ 0.458s]
                      Writing 'boot_a' OKAY [ 0.026s]
                      Finished. Total time: 0.637s
                      C:\Users\User\Desktop\OpenSDP\platform-tools_r33.0.3-windows\platform-tools>fastboot flash boot_b qti-ubuntu-robotics-image-m0104-boot.img
                      Sending 'boot_b' (20088 KB) OKAY [ 0.463s]
                      Writing 'boot_b' OKAY [ 0.032s]
                      Finished. Total time: 0.654s
                      C:\Users\User\Desktop\OpenSDP\platform-tools_r33.0.3-windows\platform-tools>fastboot reboot
                      Rebooting OKAY [ 0.001s]
                      Finished. Total time: 0.006s
                      C:\Users\User\Desktop\OpenSDP\platform-tools_r33.0.3-windows\platform-tools>adb wait-for-device
                      C:\Users\User\Desktop\OpenSDP\platform-tools_r33.0.3-windows\platform-tools>adb shell
                      ▂▂▂▂▂▂▂▂▂▂▂▂▂
                      ▂▄▆▆██▛▀▀▀▀▀▀▀▀▜████▆▆▄▂
                      ███╗ ███╗ ██████╗ ██████╗ █████╗ ██╗ ▗▆████▀▔ ▔▔▀▀▀▀▚▄
                      ████╗ ████║██╔═══██╗██╔══██╗██╔══██╗██║ ▗▟████▀ ▗██▖ ▐█ ▝▀▆▄▄▄
                      ██╔████╔██║██║ ██║██║ ██║███████║██║ ▟████▀ ▗█▘▝█▖ ▐█ ▜█▀█▄
                      ██║╚██╔╝██║██║ ██║██║ ██║██╔══██║██║ █▌ ▐█▌ ▗█▘ ▝█▖ ▐█ ▐▄ ▄█
                      ██║ ╚═╝ ██║╚██████╔╝██████╔╝██║ ██║███████╗ ▀████ ▗█▘ ▝█▖ ▐█ ▂▄███▀
                      ╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝ ▀▀██▄▄ ▂▆███▀
                      ▀▀██▄▄ ▀▀▆▄▄▄▄▆██▀▀▀▘


                      system-image: 1.7.1-M0104-14.1a-perf-nightly-20231025
                      kernel: #1 SMP PREEMPT Wed Mar 27 02:44:30 UTC 2024 4.19.125

                      hw version: M0104

                      voxl-suite: 1.1.2

                      no current network connection

                      1 Reply Last reply
                      0
                      • Alex KushleyevA Alex Kushleyev

                        @이광철 , just to double check.. after building the kernel, did you install it to voxl2 mini?

                        If all else fails, you can test (without overwriting) the kernel from SDK 1.1.1 like this :

                        voxl2-mini_SDK_1.1.1/system-image$ adb reboot bootloader
                        voxl2-mini_SDK_1.1.1/system-image$ fastboot boot qti-ubuntu-robotics-image-m0104-boot.img
                        Sending 'boot.img' (17552 KB)                      OKAY [  0.509s]
                        Booting                                            OKAY [  0.033s]
                        Finished. Total time: 0.553s
                        

                        then adb into the device and check spi port in /dev/

                        이광철이 Offline
                        이광철이 Offline
                        이광철
                        Contributor
                        wrote on last edited by
                        #11

                        @Alex-Kushleyev

                        I downloaded voxl2-mini_SDK_1.1.1.tar.gz from https://developer.modalai.com/asset/eula-download/141

                        It was tested as follows.
                        C:\Users\User\Desktop\OpenSDP\platform-tools_r33.0.3-windows\platform-tools>adb reboot bootloader
                        C:\Users\User\Desktop\OpenSDP\platform-tools_r33.0.3-windows\platform-tools>fastboot boot qti-ubuntu-robotics-image-m0104-boot.img
                        Sending 'boot.img' (17548 KB) OKAY [ 0.382s]
                        Booting OKAY [ 0.034s]
                        Finished. Total time: 0.471s
                        C:\Users\User\Desktop\OpenSDP\platform-tools_r33.0.3-windows\platform-tools>adb shell

                                                                             ▂▂▂▂▂▂▂▂▂▂▂▂▂
                                                                        ▂▄▆▆██▛▀▀▀▀▀▀▀▀▜████▆▆▄▂
                        

                        ███╗ ███╗ ██████╗ ██████╗ █████╗ ██╗ ▗▆████▀▔ ▔▔▀▀▀▀▚▄
                        ████╗ ████║██╔═══██╗██╔══██╗██╔══██╗██║ ▗▟████▀ ▗██▖ ▐█ ▝▀▆▄▄▄
                        ██╔████╔██║██║ ██║██║ ██║███████║██║ ▟████▀ ▗█▘▝█▖ ▐█ ▜█▀█▄
                        ██║╚██╔╝██║██║ ██║██║ ██║██╔══██║██║ █▌ ▐█▌ ▗█▘ ▝█▖ ▐█ ▐▄ ▄█
                        ██║ ╚═╝ ██║╚██████╔╝██████╔╝██║ ██║███████╗ ▀████ ▗█▘ ▝█▖ ▐█ ▂▄███▀
                        ╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝ ▀▀██▄▄ ▂▆███▀
                        ▀▀██▄▄ ▀▀▆▄▄▄▄▆██▀▀▀▘


                        system-image: 1.7.1-M0104-14.1a-perf-nightly-20231025
                        kernel: #1 SMP PREEMPT Thu Oct 26 04:23:26 UTC 2023 4.19.125

                        hw version: M0104

                        voxl-suite: 1.1.2

                        no current network connection

                        spidev14.0 still does not exist.
                        There is something strange.
                        Why voxl-suite: 1.1.2?
                        voxl-suite: 1.1.1 Isn't that correct?

                        Alex KushleyevA 1 Reply Last reply
                        0
                        • 이광철이 이광철

                          @Alex-Kushleyev

                          I downloaded voxl2-mini_SDK_1.1.1.tar.gz from https://developer.modalai.com/asset/eula-download/141

                          It was tested as follows.
                          C:\Users\User\Desktop\OpenSDP\platform-tools_r33.0.3-windows\platform-tools>adb reboot bootloader
                          C:\Users\User\Desktop\OpenSDP\platform-tools_r33.0.3-windows\platform-tools>fastboot boot qti-ubuntu-robotics-image-m0104-boot.img
                          Sending 'boot.img' (17548 KB) OKAY [ 0.382s]
                          Booting OKAY [ 0.034s]
                          Finished. Total time: 0.471s
                          C:\Users\User\Desktop\OpenSDP\platform-tools_r33.0.3-windows\platform-tools>adb shell

                                                                               ▂▂▂▂▂▂▂▂▂▂▂▂▂
                                                                          ▂▄▆▆██▛▀▀▀▀▀▀▀▀▜████▆▆▄▂
                          

                          ███╗ ███╗ ██████╗ ██████╗ █████╗ ██╗ ▗▆████▀▔ ▔▔▀▀▀▀▚▄
                          ████╗ ████║██╔═══██╗██╔══██╗██╔══██╗██║ ▗▟████▀ ▗██▖ ▐█ ▝▀▆▄▄▄
                          ██╔████╔██║██║ ██║██║ ██║███████║██║ ▟████▀ ▗█▘▝█▖ ▐█ ▜█▀█▄
                          ██║╚██╔╝██║██║ ██║██║ ██║██╔══██║██║ █▌ ▐█▌ ▗█▘ ▝█▖ ▐█ ▐▄ ▄█
                          ██║ ╚═╝ ██║╚██████╔╝██████╔╝██║ ██║███████╗ ▀████ ▗█▘ ▝█▖ ▐█ ▂▄███▀
                          ╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝ ▀▀██▄▄ ▂▆███▀
                          ▀▀██▄▄ ▀▀▆▄▄▄▄▆██▀▀▀▘


                          system-image: 1.7.1-M0104-14.1a-perf-nightly-20231025
                          kernel: #1 SMP PREEMPT Thu Oct 26 04:23:26 UTC 2023 4.19.125

                          hw version: M0104

                          voxl-suite: 1.1.2

                          no current network connection

                          spidev14.0 still does not exist.
                          There is something strange.
                          Why voxl-suite: 1.1.2?
                          voxl-suite: 1.1.1 Isn't that correct?

                          Alex KushleyevA Offline
                          Alex KushleyevA Offline
                          Alex Kushleyev
                          ModalAI Team
                          wrote on last edited by
                          #12

                          @이광철 , if you update just the kernel (or boot using a temporary one), the rest of the file system is unaffected, so voxl suite will remain the same. You can look at the kernel build dates to see the difference (it is also printed when you start adb shell).

                          I am not sure why spi is not showing up, will need to ask @admin

                          Alex KushleyevA 1 Reply Last reply
                          0
                          • Alex KushleyevA Alex Kushleyev

                            @이광철 , if you update just the kernel (or boot using a temporary one), the rest of the file system is unaffected, so voxl suite will remain the same. You can look at the kernel build dates to see the difference (it is also printed when you start adb shell).

                            I am not sure why spi is not showing up, will need to ask @admin

                            Alex KushleyevA Offline
                            Alex KushleyevA Offline
                            Alex Kushleyev
                            ModalAI Team
                            wrote on last edited by
                            #13

                            Maybe the change spi ->uart was actually made before sdk 1.1.1. We will need to double check that.

                            Alex KushleyevA 1 Reply Last reply
                            0
                            • Alex KushleyevA Alex Kushleyev

                              Maybe the change spi ->uart was actually made before sdk 1.1.1. We will need to double check that.

                              Alex KushleyevA Offline
                              Alex KushleyevA Offline
                              Alex Kushleyev
                              ModalAI Team
                              wrote on last edited by Alex Kushleyev
                              #14

                              I confirmed that kernel from SDK 1.1.1 does not have the spi mapped. So i tried the kernel from SDK 1.0.0 and it does. In this case my board has SDK 1.1.1 installed, but i am booting into kernel from SDK 1.0.0.

                              voxl2/builds/voxl2-mini_SDK_1.0.0/system-image$ adb reboot bootloader
                              voxl2/builds/voxl2-mini_SDK_1.0.0/system-image$ fastboot boot qti-ubuntu-robotics-image-m0104-boot.img
                              Sending 'boot.img' (17552 KB)                      OKAY [  0.508s]
                              Booting                                            OKAY [  0.034s]
                              Finished. Total time: 0.573s
                              
                              ...
                              adb shell
                              
                              system-image: 1.7.1-M0104-14.1a-perf-nightly-20231025
                              kernel:       #1 SMP PREEMPT Fri May 19 22:53:15 UTC 2023 4.19.125
                              --------------------------------------------------------------------------------
                              hw version:   M0104
                              --------------------------------------------------------------------------------
                              voxl-suite:   1.1.1
                              --------------------------------------------------------------------------------
                              no current network connection
                              --------------------------------------------------------------------------------
                              
                              
                              voxl2-mini:/$ ls /dev/spidev*
                              /dev/spidev0.0  /dev/spidev11.0  /dev/spidev14.0  /dev/spidev3.0
                              

                              Now, i am not sure why your manual kernel build did not work. if you still cannot get it to work, let us know, we can build it with spi enabled and test it for you.

                              이광철이 1 Reply Last reply
                              0
                              • Alex KushleyevA Alex Kushleyev

                                I confirmed that kernel from SDK 1.1.1 does not have the spi mapped. So i tried the kernel from SDK 1.0.0 and it does. In this case my board has SDK 1.1.1 installed, but i am booting into kernel from SDK 1.0.0.

                                voxl2/builds/voxl2-mini_SDK_1.0.0/system-image$ adb reboot bootloader
                                voxl2/builds/voxl2-mini_SDK_1.0.0/system-image$ fastboot boot qti-ubuntu-robotics-image-m0104-boot.img
                                Sending 'boot.img' (17552 KB)                      OKAY [  0.508s]
                                Booting                                            OKAY [  0.034s]
                                Finished. Total time: 0.573s
                                
                                ...
                                adb shell
                                
                                system-image: 1.7.1-M0104-14.1a-perf-nightly-20231025
                                kernel:       #1 SMP PREEMPT Fri May 19 22:53:15 UTC 2023 4.19.125
                                --------------------------------------------------------------------------------
                                hw version:   M0104
                                --------------------------------------------------------------------------------
                                voxl-suite:   1.1.1
                                --------------------------------------------------------------------------------
                                no current network connection
                                --------------------------------------------------------------------------------
                                
                                
                                voxl2-mini:/$ ls /dev/spidev*
                                /dev/spidev0.0  /dev/spidev11.0  /dev/spidev14.0  /dev/spidev3.0
                                

                                Now, i am not sure why your manual kernel build did not work. if you still cannot get it to work, let us know, we can build it with spi enabled and test it for you.

                                이광철이 Offline
                                이광철이 Offline
                                이광철
                                Contributor
                                wrote on last edited by
                                #15

                                @Alex-Kushleyev

                                I downloaded voxl2-mini_SDK_1.0.0.tar.gz from https://developer.modalai.com/asset/eula-download/127

                                It was tested as follows.

                                C:\Users\User\Desktop\OpenSDP\platform-tools_r33.0.3-windows\platform-tools>adb reboot bootloader
                                C:\Users\User\Desktop\OpenSDP\platform-tools_r33.0.3-windows\platform-tools>fastboot flash boot_a qti-ubuntu-robotics-image-m0104-boot.img
                                Sending 'boot_a' (17552 KB) OKAY [ 0.399s]
                                Writing 'boot_a' OKAY [ 0.023s]
                                Finished. Total time: 0.565s
                                C:\Users\User\Desktop\OpenSDP\platform-tools_r33.0.3-windows\platform-tools>fastboot flash boot_b qti-ubuntu-robotics-image-m0104-boot.img
                                Sending 'boot_b' (17552 KB) OKAY [ 0.397s]
                                Writing 'boot_b' OKAY [ 0.019s]
                                Finished. Total time: 0.561s
                                C:\Users\User\Desktop\OpenSDP\platform-tools_r33.0.3-windows\platform-tools>fastboot reboot
                                Rebooting OKAY [ 0.000s]
                                Finished. Total time: 0.005s
                                C:\Users\User\Desktop\OpenSDP\platform-tools_r33.0.3-windows\platform-tools>adb shell

                                system-image: 1.7.1-M0104-14.1a-perf-nightly-20231025
                                kernel: #1 SMP PREEMPT Fri May 19 22:53:15 UTC 2023 4.19.125

                                hw version: M0104

                                voxl-suite: 1.1.2

                                no current network connection

                                voxl2-mini:/dev$ ls spi*
                                spidev0.0 spidev11.0 spidev14.0 spidev3.0

                                OK!
                                The spidev14.0 file exists.

                                I tested it as below:
                                voxl2-mini:/dev$ qrb5165io-spi-test -d 0
                                failed to ping icm42688p IMU

                                voxl2-mini:/dev$ qrb5165io-spi-test -d 11
                                failed to ping icm42688p IMU

                                voxl2-mini:/dev$ qrb5165io-spi-test -d 3
                                [INFO] success! ICM42688 Detected

                                voxl2-mini:/dev$ qrb5165io-spi-test -d 14

                                There is no response to the qrb5165io-spi-test -d 14 command.
                                is this right?
                                Is spidev14.0 not working?

                                Alex KushleyevA 1 Reply Last reply
                                0
                                • 이광철이 이광철

                                  @Alex-Kushleyev

                                  I downloaded voxl2-mini_SDK_1.0.0.tar.gz from https://developer.modalai.com/asset/eula-download/127

                                  It was tested as follows.

                                  C:\Users\User\Desktop\OpenSDP\platform-tools_r33.0.3-windows\platform-tools>adb reboot bootloader
                                  C:\Users\User\Desktop\OpenSDP\platform-tools_r33.0.3-windows\platform-tools>fastboot flash boot_a qti-ubuntu-robotics-image-m0104-boot.img
                                  Sending 'boot_a' (17552 KB) OKAY [ 0.399s]
                                  Writing 'boot_a' OKAY [ 0.023s]
                                  Finished. Total time: 0.565s
                                  C:\Users\User\Desktop\OpenSDP\platform-tools_r33.0.3-windows\platform-tools>fastboot flash boot_b qti-ubuntu-robotics-image-m0104-boot.img
                                  Sending 'boot_b' (17552 KB) OKAY [ 0.397s]
                                  Writing 'boot_b' OKAY [ 0.019s]
                                  Finished. Total time: 0.561s
                                  C:\Users\User\Desktop\OpenSDP\platform-tools_r33.0.3-windows\platform-tools>fastboot reboot
                                  Rebooting OKAY [ 0.000s]
                                  Finished. Total time: 0.005s
                                  C:\Users\User\Desktop\OpenSDP\platform-tools_r33.0.3-windows\platform-tools>adb shell

                                  system-image: 1.7.1-M0104-14.1a-perf-nightly-20231025
                                  kernel: #1 SMP PREEMPT Fri May 19 22:53:15 UTC 2023 4.19.125

                                  hw version: M0104

                                  voxl-suite: 1.1.2

                                  no current network connection

                                  voxl2-mini:/dev$ ls spi*
                                  spidev0.0 spidev11.0 spidev14.0 spidev3.0

                                  OK!
                                  The spidev14.0 file exists.

                                  I tested it as below:
                                  voxl2-mini:/dev$ qrb5165io-spi-test -d 0
                                  failed to ping icm42688p IMU

                                  voxl2-mini:/dev$ qrb5165io-spi-test -d 11
                                  failed to ping icm42688p IMU

                                  voxl2-mini:/dev$ qrb5165io-spi-test -d 3
                                  [INFO] success! ICM42688 Detected

                                  voxl2-mini:/dev$ qrb5165io-spi-test -d 14

                                  There is no response to the qrb5165io-spi-test -d 14 command.
                                  is this right?
                                  Is spidev14.0 not working?

                                  Alex KushleyevA Offline
                                  Alex KushleyevA Offline
                                  Alex Kushleyev
                                  ModalAI Team
                                  wrote on last edited by
                                  #16

                                  @이광철 , do you have anything connected to spidev14.0 ? You need a device connected to the spi port.

                                  If you look at the source code for this test app, it simply tries to ping a specific IMU device, which happens to be installed on board on SPI3 (ICM42688 IMU) : https://gitlab.com/voxl-public/voxl-sdk/core-libs/libqrb5165-io/-/blob/master/apps/examples/qrb5165io-spi-test.c

                                  So, you should connect your desired device to J10 and modify the example to communicate with your device.

                                  Also, based on this documentation, https://docs.modalai.com/voxl2-mini-connectors/#j10-pin-out-spi-mode-gpio_67--low-kernel-rebuild-required-to-use, you need to set the GPIO before using:

                                  voxl-gpio -w 67 1
                                  

                                  I hope that helps

                                  Alex KushleyevA 이광철이 2 Replies Last reply
                                  0
                                  • Alex KushleyevA Alex Kushleyev

                                    @이광철 , do you have anything connected to spidev14.0 ? You need a device connected to the spi port.

                                    If you look at the source code for this test app, it simply tries to ping a specific IMU device, which happens to be installed on board on SPI3 (ICM42688 IMU) : https://gitlab.com/voxl-public/voxl-sdk/core-libs/libqrb5165-io/-/blob/master/apps/examples/qrb5165io-spi-test.c

                                    So, you should connect your desired device to J10 and modify the example to communicate with your device.

                                    Also, based on this documentation, https://docs.modalai.com/voxl2-mini-connectors/#j10-pin-out-spi-mode-gpio_67--low-kernel-rebuild-required-to-use, you need to set the GPIO before using:

                                    voxl-gpio -w 67 1
                                    

                                    I hope that helps

                                    Alex KushleyevA Offline
                                    Alex KushleyevA Offline
                                    Alex Kushleyev
                                    ModalAI Team
                                    wrote on last edited by
                                    #17

                                    Another quick tip for testing SPI stuff. I found this useful:

                                    Link Preview Image
                                    spidev-test/spidev_test.c at master · rm-hull/spidev-test

                                    Contribute to rm-hull/spidev-test development by creating an account on GitHub.

                                    favicon

                                    GitHub (github.com)

                                    You can download this file to VOXL2, build it using

                                    gcc -O2 spidev_test.c -o spidev_test
                                    

                                    and then you can actually query the IMU on spi 3:

                                    voxl2-mini:~$ ./spidev_test -D /dev/spidev3.0 -p "\x76\x00\xF5\x00"
                                    spi mode: 0x0
                                    bits per word: 8
                                    max speed: 500000 Hz (500 KHz)
                                    RX | 00 00 00 47 ...
                                    

                                    and from here we know that 0x47 is actually the value WHOAMI register of ICM42688 IMU 🙂

                                    The data i am sending to the device is 4 bytes used to query the imu, as done here . the value 0xF5 = 0x75 | 0x80 which tells the IMU to send back the value of register 0x75

                                    이광철이 2 Replies Last reply
                                    0
                                    • Alex KushleyevA Alex Kushleyev

                                      @이광철 , do you have anything connected to spidev14.0 ? You need a device connected to the spi port.

                                      If you look at the source code for this test app, it simply tries to ping a specific IMU device, which happens to be installed on board on SPI3 (ICM42688 IMU) : https://gitlab.com/voxl-public/voxl-sdk/core-libs/libqrb5165-io/-/blob/master/apps/examples/qrb5165io-spi-test.c

                                      So, you should connect your desired device to J10 and modify the example to communicate with your device.

                                      Also, based on this documentation, https://docs.modalai.com/voxl2-mini-connectors/#j10-pin-out-spi-mode-gpio_67--low-kernel-rebuild-required-to-use, you need to set the GPIO before using:

                                      voxl-gpio -w 67 1
                                      

                                      I hope that helps

                                      이광철이 Offline
                                      이광철이 Offline
                                      이광철
                                      Contributor
                                      wrote on last edited by
                                      #18

                                      @Alex-Kushleyev

                                      I will connect my spi device and let you know the results after testing.
                                      Thanks for your help.

                                      1 Reply Last reply
                                      0
                                      • Alex KushleyevA Alex Kushleyev

                                        Another quick tip for testing SPI stuff. I found this useful:

                                        Link Preview Image
                                        spidev-test/spidev_test.c at master · rm-hull/spidev-test

                                        Contribute to rm-hull/spidev-test development by creating an account on GitHub.

                                        favicon

                                        GitHub (github.com)

                                        You can download this file to VOXL2, build it using

                                        gcc -O2 spidev_test.c -o spidev_test
                                        

                                        and then you can actually query the IMU on spi 3:

                                        voxl2-mini:~$ ./spidev_test -D /dev/spidev3.0 -p "\x76\x00\xF5\x00"
                                        spi mode: 0x0
                                        bits per word: 8
                                        max speed: 500000 Hz (500 KHz)
                                        RX | 00 00 00 47 ...
                                        

                                        and from here we know that 0x47 is actually the value WHOAMI register of ICM42688 IMU 🙂

                                        The data i am sending to the device is 4 bytes used to query the imu, as done here . the value 0xF5 = 0x75 | 0x80 which tells the IMU to send back the value of register 0x75

                                        이광철이 Offline
                                        이광철이 Offline
                                        이광철
                                        Contributor
                                        wrote on last edited by
                                        #19

                                        @Alex-Kushleyev

                                        Hi.

                                        I tested it by connecting my spi device to j10.
                                        This spi device is working normally in voxl2.
                                        My program for testing also operates normally with this spi device in voxl2.
                                        However, when I test the spi device and test program on voxl mini, there is no response to the voxl_spi_write function.

                                        Also, the test below is the same as before.
                                        voxl2-mini:/dev$ qrb5165io-spi-test -d 14
                                        There is no response to the qrb5165io-spi-test -d 14 command.

                                        I need your help and thanks in advance.

                                        1 Reply Last reply
                                        0
                                        • Alex KushleyevA Alex Kushleyev

                                          Another quick tip for testing SPI stuff. I found this useful:

                                          Link Preview Image
                                          spidev-test/spidev_test.c at master · rm-hull/spidev-test

                                          Contribute to rm-hull/spidev-test development by creating an account on GitHub.

                                          favicon

                                          GitHub (github.com)

                                          You can download this file to VOXL2, build it using

                                          gcc -O2 spidev_test.c -o spidev_test
                                          

                                          and then you can actually query the IMU on spi 3:

                                          voxl2-mini:~$ ./spidev_test -D /dev/spidev3.0 -p "\x76\x00\xF5\x00"
                                          spi mode: 0x0
                                          bits per word: 8
                                          max speed: 500000 Hz (500 KHz)
                                          RX | 00 00 00 47 ...
                                          

                                          and from here we know that 0x47 is actually the value WHOAMI register of ICM42688 IMU 🙂

                                          The data i am sending to the device is 4 bytes used to query the imu, as done here . the value 0xF5 = 0x75 | 0x80 which tells the IMU to send back the value of register 0x75

                                          이광철이 Offline
                                          이광철이 Offline
                                          이광철
                                          Contributor
                                          wrote on last edited by
                                          #20

                                          @Alex-Kushleyev

                                          I tested according to your advice.
                                          This is the result of testing on my mini.

                                          voxl2-mini:~$ cd /usr/bin
                                          voxl2-mini:/usr/bin$ spidev_test -D /dev/spidev3.0 -p "\x76\x00\xF5\x00"
                                          spi mode: 0x0
                                          bits per word: 8
                                          max speed: 500000 Hz (500 KHz)
                                          can't send spi message: Invalid argument
                                          Aborted

                                          이광철이 1 Reply Last reply
                                          0

                                          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                                          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                                          With your input, this post could be even better 💗

                                          Register Login
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          ModalAI
                                          Categories Recent Tags ModalAI.com Docs
                                          © 2026 ModalAI® · Accelerating autonomy for smaller, smarter, safer drones · Powered by NodeBB
                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • Users
                                          • Groups