Pico-uart-bridge - Raspberry Pi Pico UART-USB bridge

Raspberry Pi Pico USB-UART Bridge

This program bridges the Raspberry Pi Pico HW UARTs to two independent USB CDC serial devices in order to behave like any other USB-to-UART Bridge controllers.

Disclaimer

This software is provided without warranty, according to the MIT License, and should therefore not be used where it may endanger life, financial stakes, or cause discomfort and inconvenience to others.

Raspberry Pi Pico Pinout

Raspberry Pi Pico GPIO Function
GPIO0 (Pin 1) UART0 TX
GPIO1 (Pin 2) UART0 RX
GPIO4 (Pin 6) UART1 TX
GPIO5 (Pin 7) UART1 RX
Owner
Comments
  • Charters missing when using teraterm to send file using a physical loopback

    Charters missing when using teraterm to send file using a physical loopback

    Test procedure:

    1. Use a jumper header to shortcut pin 6 and pin 7 to physically loopback the TX/RX on UART1
    2. Press and hold the key on the Raspberry PI PICO and plug in the USB cable. Send the "pico-uart-bridge-v3.0.uf2" file to the USB drive
    3. Start Teraterm, "New Connection" and select the port with the loopback and set baudrate to be 115200 BPS and no flow control Make sure when you type, you can see echo in the window, which indicates the physical loopback is working. If not, choose the other USB uart port
    4. In the Teraterm, "File->Send File..."->Select the file "wait_regex.ttl" from the default path (from Teraterm installation place). You will see character missing as listed below.
    5. I tested using a CP2102 USB UART using same loopback test procedure and did not see any character missing

    Original File sent by Teraterm (no line/character delay)

    ; sample macro of Tera Term ; ; File: wait_regex.ttl ; Description: wait command with regular expression ; Environment: generic ; Update: 2005/10/15 ; Author: Yutaka Hirata

    connect '192.168.1.2 /2 /ssh /auth=password /user=yutaka /passwd=yutaka'

    while 1

    sendln 'uptime'
    

    ; waitregex 'Longhorn' '.@sai' 'Pentium\d+' 'TeraTermX{3}' waitregex '(You).(log\w+).*(this)'

    int2str s result
    messagebox s 'result'
    messagebox inputstr 'inputstr'
    messagebox matchstr 'matchstr'
    messagebox groupmatchstr1 'groupmatchstr1'
    messagebox groupmatchstr2 'groupmatchstr2'
    messagebox groupmatchstr3 'groupmatchstr3'
    messagebox groupmatchstr4 'groupmatchstr4'
    
    sendln 'cal'
    wait 'yutaka'
    
    pause 3
    

    endwhile

    Actual shown in the window and you will see quite a lot of characters are missing. If in the "Setup->Serial" and put 1ms delay on each line, then no character missing happens. It might be (my ) some issues in the FIFO management or some code is blocking the execution for too long and causes the FIFO overflow.

    ; sample macro of Tera Term ; ; File: wait_regex.ttl ; Descripion: wait command with regular e ; Update: 2005/10/15 ; Author: Yutaka Hirata

    connect '192.168.r=yutaka /passwd=yutaka'

    while 1

        sendln 'uptime'
    

    ; waitregex' 'TeraTermX{3}' waitregex '(Yo).(log\w+).(this)'

        int2str smessagebox inputstr 'inputstr'
        messagebox matchstr 'matchstr'
        matchstr1'
        messagebox groupmatctr2 'groupmatchstr2'
        messagebox
        messagebox groupmatchstr4 'groupmatchstr4'
    
        sendln 'cal'
        wait 'yutaka'
    
        pause 3
    

    endwhile

  • Data overflow ?

    Data overflow ?

    Hello, thanks for this project, it helped me going on my project where I need USB to UART bridge. One issue I found - when I put a physical loopback on the UART, send a byte buffer of some 100 bytes or so, I receive less bytes back on the USB CDC device. I have now tried the sending in Windows in Python script, and on a dedicated device with native C++ code - in both cases this loopback test looses data. While I dive into the troubleshooting, do you have any advice on what might be causing this ? Thanks, Paul.

  • Custom Baud Rates

    Custom Baud Rates

    Hi,

    Thanks for this great piece of work. One thing I want to use it for requires communication at some odd baud rates.. 518400bps is one, 1036800bps is another.

    However, when I try to use these baud rates with the Pico, minicom defaults back to 9600. I have tested 115200/230400/460800 & 921600bps successfully.

    Is there anything that can be done to allow these strange speeds to work? Tested with the lastest version of pico-uart-bridge on Linux Mint 20.1 (AMD64).

    Looking a little into it, it seems this may be due to the clock being used?

  • Does not recognize in Windows after unplugging and replugging.

    Does not recognize in Windows after unplugging and replugging.

    Title. Need to hold down BOOTSEL to get it to recognize as a USB device. Then requires reflashing. After flashing, unplugging and replugging doesn't even make the Windows USB insert noise, and device manager shows no changes.

  • retrieve serial from flash ID

    retrieve serial from flash ID

    Currently the serial number "000000000000" is hard-coded. This will lead to problems when two RPico uart bridges are attached to the same computer because their device node are ambiguous. With this commit the unique 8 byte ID of the flash chip is used as serial number encoded as hex. Thus two bridges can be safely attached to same computer by using /dev/serial/by-id/usb-Raspberry_Pi_Pico_... device nodes or appropriate udev rules.

  • DTR and RTS

    DTR and RTS

    Hello, do you see a simple way to provide DTR and/or RTS.

    There are projects which could use a DTR. One example could be Chinese diesel heaters or programmer adapters for VHF radios.

    They have in common that they use a trick to multiplex RX/TX on one line with the DTR line and 2 transistors.

    If the RPi pico would simulate this behavior and would switch TX to high impedance if DTR is set this would become the perfect programming adapter as no additional hardware would be needed.

    DTR and RTS could be useful anyway if 2 GPIOs would be used.

  • Flashing ESP Device through ESPtool

    Flashing ESP Device through ESPtool

    Looking for some assistance using your pico-uart-bridge to flash an ESP device via esptool.

    I currently keep getting timeouts through ESPtool. When I connect to minicom and look at the ttyACM0 device and power cycle the ESP chip on UART0, i do see activity, but can't seem to get flashing via ESPtool to work.

    Any advice on getting this to work with esptool?

    Thanks!

  • Waits for Serial monitor?

    Waits for Serial monitor?

    I'm trying to program a CC1352 via pico-uart-bridge and using the SmartRF programmer (The official software for programming that chip) but nothing happens. I use an osciloscope to see the TX port output. When I click the "program" button, TX don't send anything, but when I open the serial monitor of Arduino, TX sends what is suppose to send when I clicked the "program" button.

    Is there any instruction that makes the Pi Pico waits for the command of Serial Monitor open?

  • Add hardware flow and line control

    Add hardware flow and line control

    Thanks for the software !

    I tested HWFC with an FTDI cable @ 1Mbits and it seems to work alright. Also added DTR functionality (useful for e.g. programming an arduino board).

USB host implementation using PIO of raspberry pi pico (RP2040).

Pico-PIO-USB USB host implementation using PIO of raspberry pi pico (RP2040). You can add additional USB port to RP2040. ?? This library is WIP. API m

Dec 30, 2022
Prueba del Raspberry PI PICO con un display Raspberry PI TFT 3.5"

Raspberry-PI-PICO-display-RPI35 Prueba del Raspberry PI PICO con un display Raspberry PI TFT 3.5" Con ayuda de la libreria https://github.com/khoih-pr

Nov 10, 2021
Tetris on a Raspberry Pi Pico mounted on a Pimoroni Pico Explorer

PicoTetris Classic Tetris game running on a Raspberry Pi Pico microcontroller. Pico C port by Richard Birkby Original JavaScript implementation - Jake

Dec 3, 2022
Breakout game for Raspberry Pi Pico with Pimoroni Pico Display pack
Breakout game for Raspberry Pi Pico with Pimoroni Pico Display pack

breakout_rpi_pico Breakout game for Raspberry Pi Pico with Pimoroni Pico Display pack Prebuilt binary (breakout.uf2) is here. To build your own binary

Oct 15, 2022
Digital rain animation gif with glow squeezed into a raspberry pi pico and pimoroni pico-display
Digital rain animation gif with glow squeezed into a raspberry pi pico and pimoroni pico-display

pico-display-matrix Digital rain animation gif with glow squeezed into a raspberry pi pico and pimoroni pico-display or how to actually use all Flash

Sep 10, 2022
ESP32 software USB host through general IO pins. We can connect up to 4 USB-LS HID (keyboard mouse joystick) devices simultaneously.

esp32_usb_soft_host esp32 USB-LS pure software host thru general IO pins. Up to 4 HID devices simultaneously. board ~$3 :https://www.aliexpress.com/pr

Jan 1, 2023
ESP8266 software USB host through general IO pins. We can connect up to 2 USB-LS HID (keyboard mouse joystick) devices simultaneously.
ESP8266 software USB host through general IO pins. We can connect up to 2 USB-LS HID (keyboard mouse joystick) devices simultaneously.

esp8266_usb_soft_host Test for esp8266 usb host . Works with ESP-IDF v3.4 80MHz and 160MHz. WorkInProgress Test run with mouse & combined mouse & keyb

Sep 1, 2022
Tiny and portable usb host and device stack for mcu with usb ip

Tiny and portable usb host and device stack for mcu with usb ip

Jan 2, 2023
USB-C_PCB_experiments - USB-C ports made from a flex PCB and an ATtiny84A
USB-C_PCB_experiments - USB-C ports made from a flex PCB and an ATtiny84A

USB-C PCB Experiments This is part of an ongoing series of projects involving creative interpretations of the USB mechanical standards. You've probabl

Sep 5, 2022
Anotter USB temperature logger that can record up to four channels with thermocouple or NTCs connected via CDC directly or SCPI to USB.
Anotter USB temperature logger that can record up to four channels with thermocouple or NTCs connected via CDC directly or SCPI to USB.

temperature-logger Anotter USB temperature logger that can record up to four channels with thermocouple or NTCs connected via CDC directly or SCPI to

Nov 24, 2022
A C++ bare metal environment for Raspberry Pi with USB (32 and 64 bit)

A C++ bare metal environment for Raspberry Pi with USB (32 and 64 bit)

Jan 2, 2023
Enables Permanent UART output across boots. Supports PS4 version 6.72 only for now

Enables Permanent UART for PS4. Requires a 5.05/6.72/7.02 Jailbroken PS4. To build, you require ps4-sdk from Scene-Collective/ps4-payload-sdk In the t

May 12, 2022
RV-Debugger-BL702 is an opensource project that implement a JTAG+UART debugger with BL702C-A0.
RV-Debugger-BL702 is an opensource project that implement a JTAG+UART debugger with BL702C-A0.

BL702 is highly integrated BLE and Zigbee combo chipset for IoT applications, contains 32-bit RISC-V CPU with FPU, frequency up to 144MHz, with 132KB RAM and 192 KB ROM, 1Kb eFuse, 512KB embedded Flash, USB2.0 FS device interface, and many other features.

Jan 1, 2023
An OLED gauge for the Speeduino ECU. Uses UART (secondary serial) for communication.
An OLED gauge for the Speeduino ECU. Uses UART (secondary serial) for communication.

speeduino-ardugauge An OLED gauge for the Speeduino ECU. Uses UART (secondary serial) for communication. See demo video. See screenshots. NOTE: The ga

Dec 18, 2022
This repository gives an idea about how to use UART/SPI/I2C communication using HAL APIs

STM32-UART-SPI-I2C communication with Arduino board using HAL APIs This repository gives an idea about how to use UART/SPI/I2C communication using HAL

Nov 1, 2021
Using D2XX driver to capture UART data to a binary file

What is it This is the sample code to read UART data using any baud rate that FTDI supports and save them to a binary file. How to use Usage: ./larger

Nov 24, 2021
Raspberry Pi Pico (RP2040) and Micro-ROS (ROS 2) Integration

The Pico is an amazing microcontroller and I couldn't wait for ROS 2 support or Arduino Core, so here is my approach. Once the Arduino Core for RP2040 is out it will be easier to use micro_ros_arduino.

Jun 19, 2022
built-in CMSIS-DAP debugger tailored especially for the RP2040 “Raspberry Pi Pico”

RP2040 has two ARM Cortex-M0+ cores, and the second core normally remains dormant. pico-debug runs on one core in a RP2040 and provides a USB CMSIS-DAP interface to debug the other core. No hardware is added; it is as if there were a virtual debug pod built-in.

Dec 30, 2022
🦠 µnix is a UNIX-like operating system for the raspberry pi pico.
🦠 µnix is a UNIX-like operating system for the raspberry pi pico.

The µnix Operating System "µnix", "munix" or, "micro unix" aims to be a micro kernel based operating system targeting the Raspberry Pi Pico. "µnix" is

Dec 11, 2022