-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Raspberry Pi Pico platform #817
Conversation
PR missing one of the required labels: {'bug', 'new feature', 'dependencies', 'breaking-change', 'enhancement', 'internal', 'documentation'} |
7a7e68b
to
7de8bff
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since you are relying on FreeRTOS for this port, any specific reason for not using (and maybe extending) the existing freertos_plus_tcp
port?
It was my original idea, but, unfortunately, freertos_plus_tcp don't support this Wi-Fi module yet. |
Thank you! It would be very, very nice to have an example or two of how to reconnect to the zenoh router if something goes wrong: either during initial connection attempts, and also during the established session. |
7576194
to
006ae4d
Compare
I am so pleased to see to see the serial port support added for my lovely RPI Pico boards. Thank you so much! |
It is currently expected behavior that Zenoh does not support serial port reconnection if the link is dropped. We are actively working on a fix. |
Great idea, thanks! |
And so far I haven't figured out how to best solve the startup problem. While Pico is not running, the /dev/ttyACM0 is missing and Zenoh cannot open it, but as soon as it appears, zenoh-pico tries to open a session, but cannot, since Zenoh has not yet been launched. At the moment, I have made a stub in the form of a 10s timeout between enabling the port and the start of opening the session (to start the router at this moment). I'll think about it with a fresh mind. |
Thank you! What I mean here is an example of how to handle a case when, for instance, the zenoh router has not been started yet but the microcontroller is already active. All existing examples just print an error message and halt. It should be demonstrated how to handle this case to get connected to the router ASAP. Another real-time situation is when the router shuts down or reboots. What exactly should the microcontroller do? |
Definitely, with better support of serial ports in zenoh, people will get attracted to use CDC. Most boards which are already supported by zenoh-pico already have a USB link. |
Thank you! Please take a look at handling of the serial ports in the terminal window of the Arduino environment. Unlike traditional terminals, this one was specifically designed for handling of serial ports which can can suddenly disappear from the system. Obviously, this happens very often when the user is debugging a program :-) The terminal window automatically activates when the selected port appears in the system, and gets deactivated if the port disappears. As you see, this is all not a magic and the proper serial port handling can be added to the zenoh router, as well. I can think of a scenario when, on the startup of the RPI, a script collects information about all serial ports in the system, select the ones we are interested in (for example, by specific VID/PID combination) and then configures zenoh to use these ports: -l "serial//dev/ttyACM0#baudrate=115200" -l "serial//dev/ttyACM1#baudrate=115200" There is another interesting issue with serial ports naming, which you can check yourself. Suppose a program opens /dev/ttyACM0, then the microcontroller resets, then the port re-appears in the system under a different name, such as /dev/ttyACM1. This is because the program still holds the port's file handle. I can imagine how to handle this in a good way:
-l "serial//dev/ttyACM0#baudrate=115200" we can open a serial port by location - -l "serial//dev/serial/by-path/pci-0000:00:14.0-usbv2-0:1:1.1#baudrate=115200" I hope this info will be usefil. P.S. Please take a look at a new proposed "H" byte in the serial protocol, I think it does not make sense. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see that you based the system implementation on the FreeRTOS port which I wrote and you added condition variable support. Hope you don't mind me using it in #821 .
a02e57d
to
cb9dc75
Compare
@bjsowa There is a lot of duplicate code in many platforms now, I have plans to move it into common modules, this will be done later. At the moment, using code from one platform for another would be breaking the current architecture. |
cb9dc75
to
dda3cdd
Compare
dda3cdd
to
5c38cb8
Compare
This pull request adds support for the Raspberry Pi Pico series to Zenoh-Pico, enhancing compatibility with a wider range of embedded platforms. The main changes include:
These additions extend Zenoh-Pico’s capabilities, enabling efficient, scalable communication for IoT and edge computing applications on popular microcontroller platforms.