ModalAI Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    custom uart usage

    VOXL SDK
    2
    5
    180
    Loading More Posts
    • 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.
    • G
      giladWDS
      last edited by

      Hi,
      I wanted to add a custom sensor to my voxel-2 through j19 UART.
      now I see that this UART is reserved to RC-inputs. but even when I disabled those in /etc/modalai/voxl-px4.conf, I still can't access the port.
      I looked a bit and found this:
      https://gitlab.com/voxl-public/voxl-sdk/core-libs/libqrb5165-io/-/tree/master/python?ref_type=heads
      and tried using it with port 7.
      when I tried to write it gave me the following:
      ERROR: voxl_uart_write: Bus '17' is not initialized
      and on init, it gave:
      Sending library name request: libslpi_qrb5165_io.so
      Sending initialization request
      Received standard error event SNS_STD_ERROR_NOT_SUPPORTED
      Couldn't configure flight_controller sensor
      ERROR: fc_sensor_initialize failed
      ERROR: Failed to initialize slpi
      ERROR: Encountered error while initializing bus 17

      so it looks like it is still looking for some RC sensor.
      I guess my real question is how can I access SLPI UART as a user since I don't see them in /dev/tty*
      Thank you

      G 1 Reply Last reply Reply Quote 0
      • G
        giladWDS @giladWDS
        last edited by

        @giladWDS To specify. my sensor is connected to a microcontroller. so also I prefer UART I can do i2c(I have tried and it didn't work as well) and I can do SPI if it works better.

        Eric KatzfeyE 1 Reply Last reply Reply Quote 0
        • Eric KatzfeyE
          Eric Katzfey ModalAI Team @giladWDS
          last edited by Eric Katzfey

          @giladWDS The I/O on J19 is only for use with the DSP, not the Linux processor. If you are running PX4 then you would need to write a custom PX4 driver for your sensor. The libqrb5165-io library would allow access to the UART but only if PX4 is not already running on the DSP. It's either PX4 or libqrb5165-io, you cannot use both at the same time. You can get an applications processor (Linux processor) UART via some of our add-on boards but there isn't one available directly from any of the I/O connectors on VOXL 2.

          G 1 Reply Last reply Reply Quote 0
          • G
            giladWDS @Eric Katzfey
            last edited by giladWDS

            @Eric-Katzfey
            Thank you for the reply
            The only board I have no for testing is:
            MCCA-M0151-1
            I use the USB portion for the wifi and see that it exposes a uart port- HS1 for the external USB board.
            I can't seem to communicate with this HS0 port as a standalone port.
            Is it only for external Flight controllers?

            I looked into this:
            https://docs.modalai.com/usb2-type-a-breakout-add-on/
            but it seems to expose the same uart I can not talk to.
            Can you please recommend me a board that won't affect the wifi capability but would add uart ports that I desperately need?

            • EDIT:
              also if push comes to shove I would appreciate sources on how to write and compile a px4 driver that reads from the uart on j19.

            Thank you and best regards,
            Gilad

            Eric KatzfeyE 1 Reply Last reply Reply Quote 0
            • Eric KatzfeyE
              Eric Katzfey ModalAI Team @giladWDS
              last edited by

              @giladWDS M0151 should expose /dev/ttyHS1 for use. It's just a UART so it isn't specific to external flight controllers.

              1 Reply Last reply Reply Quote 0
              • First post
                Last post
              Powered by NodeBB | Contributors