N
nem

  • Jul 30, 2023
  • Joined Apr 16, 2023
  • 0 best answers
  • Hi there,

    Following the UART script node example here all works well on the OAK-FFC-4P.

    To make this useful in my pipeline I need a high baud rate. Trying to change the baud rate seems to not work. If changing to a non-standard baud the example errors out as expected in-line with the pySerial docs.

    When trying to set a standard baud rate above 115200, like 230400, 460800, 576000 or 921600, the example runs implying these baud rates are supported by the platform, however, there is nothing on the data line. When the pipeline starts I see some activity on RX, however looking at the TX line on a logic analyser the TX just sits high at 1.8V.

    Is a higher baud rate supported with UART? How can I configure this?

    I assume I need to change the speed of a UART clock somewhere?

    115200 Bauds: ser = serial.Serial("/dev/ttyS0", baudrate=115200)

    230400 Bauds: ser = serial.Serial("/dev/ttyS0", baudrate=230400)

    EDIT: Also tried with tty with no luck:

    script.setScript("""
        import os, tty
        import time
    
        # time.sleep(50)
    
        msg = 'hello world from tty'
        node.warn(f'Sending message to UART: {msg}')
    
        # Open UART0 port, set raw and baudrate
        fd = os.open("/dev/ttyS0", os.O_RDWR | os.O_NOCTTY)
        tty.setraw(fd)
        mode = tty.tcgetattr(fd)
        mode[tty.ISPEED] = mode[tty.OSPEED] = tty.B460800
        tty.tcsetattr(fd, tty.TCSANOW, mode)
    
        while True:
            # Send hello message and print back received message
            os.write(fd, msg.encode())
            #node.warn(f'Read: {os.read(fd, 16)}')
            time.sleep(1)
    
    """)
    • erik replied to this.
    • nem likes this.
    • I'd like to use the OAK-SoM-Pro for an industrial computer vision application and I need to be able to update the model, depth AI pipeline and config from an ESP32 over SPI. The reason I need to do OTA updates is because it's not practical/affordable for us to remove the device and connect it to a host computer over USB each time we want to deploy an improved model, or tweak the pipeline config. I can see that there were plans to add support for updates over SPI, but i couldn't find anywhere in the documentation for the bootloader, integration guide or SoM-Pro that explained how to do it. Could someone please explain how / give an example? It would also be nice if we could use the dap format for these updates so that we don't need a lot of bandwidth to push minor updates.

      • erik replied to this.
      • nem likes this.