benkuper / Chataigne

Artist-friendly Modular Machine for Art and Technology
https://benjamin.kuperberg.fr/chataigne
GNU General Public License v3.0
1.22k stars 58 forks source link

Raspberry Pi hardware serial is not seen by the serial module #246

Closed siteswapjuggler closed 1 month ago

siteswapjuggler commented 3 months ago

Environment

Describe the bug It's beetween a bug and feature request actually. I try to connect with a teensy via GPIO14/GPIO15 UART. I'm sure of the setting as it works perfectly with a python script but the serial port doesn't appear in Chataigne.

To Reproduce Steps to reproduce the behavior:

  1. setup the RPi serial port
  2. run Chataigne
  3. create a serial port object
  4. the serial port doesn't appear in the dropdown menu

Expected behavior Get the serial port in the dropdown menu either the dynamic link '/dev/serial0' or the device tree adress '/dev/ttyAMA0'

Additional context Actually I suspect that the filter, filters out those result because I can see '/dev/ttyS0' (wich is the serial path when used for the terminal) it can also see the Teensy USB (with the teensy descriptor) but it cannot the hardware port as specified above.

This will be used in an installation by october, I can work on it if and suggest a push request if you point me the file to work on with. Anyhow no urgency as I can use USB as a replacement ;)

Have a nice day

benkuper commented 3 months ago

Hey sylvain, long time no see ;) You will find the code in the Juce_serial repository. It's using wjwood's serial code but it's fully integrated in the repo so you can check that there. There is a Linux specific file there.

Let me know how it goes! Cheers

siteswapjuggler commented 3 months ago

Hi Ben, long time no see indeed :) I'll have a look as soon as possible. Thanks a lot for this quick answer :)

Cheers

siteswapjuggler commented 3 months ago

Evening,

so as far as I can tell the answer would be in this file : https://github.com/benkuper/juce_serial/blob/398c9b30c463c4547ca0b47bc5bc116f36fb5466/lib/serial/impl/list_ports/list_ports_linux.cc#L2

after line 302, we can add : search_globs.push_back("/dev/serial"); search_globs.push_back("/dev/ttyAMA");

By the way I think I can hack the system without even recompiling anything just by adding a dynamic link which math one of the patterns already present in the code :)

Thanks a lot for your help.

siteswapjuggler commented 3 months ago

Tell me if you prefer for me to transfer or complete an issue on the jusce_serial. By the way I choose not to mess with a pull request as long as I don't have the full compilation workflow to test the modification.

benkuper commented 1 month ago

Sorry for the delay, I updated the serial module to detect them. But I won't release a new beta soon as I'm working towards Chataigne 2 which will take time and won't be in beta soon. I'd suggest you try and compile it yourself or wait for the next version

siteswapjuggler commented 1 month ago

Hi Ben thanks for you answer there is no urge on my side I did a dynamic link in order to match the existing search path and it works like a charm. Happy to see that Chataigne 2 is on the way, wich you all the best for this new release :)