Home of the Squeezebox™ & Transporter® network music players.
Page 2 of 4 FirstFirst 1234 LastLast
Results 11 to 20 of 37
  1. #11
    Senior Member
    Join Date
    Jan 2022
    Location
    Switzerland
    Posts
    146
    Sorry bpa, I'm fully lost!

    Should I download pyserial. If yes how ?

    I tried:
    nc 192.168.1.120 9090 </dev/ttyUSB1 >/dev/ttyUSB1
    -sh: can't open /dev/ttyUSB1: no such file

    probably the USB name is not the same. How to get the right name?

    Sorry for the basic questions... Thanks!

  2. #12
    Senior Member paul-'s Avatar
    Join Date
    Jan 2013
    Posts
    4,973
    Usb serial drivers are not included in pCP by default.

    Install the extension usb-serial-KERNEL.tcz. Where kernel matches the kernel you are running.
    piCorePlayer a small player for the Raspberry Pi in RAM.
    Homepage: https://www.picoreplayer.org

    Please donate if you like the piCorePlayer

  3. #13
    Senior Member
    Join Date
    Oct 2005
    Location
    Ireland
    Posts
    21,898
    Quote Originally Posted by PaulH View Post
    Sorry bpa, I'm fully lost!

    Should I download pyserial. If yes how ?
    No.
    Try the simpler suggestion first.


    I tried:
    nc 192.168.1.120 9090 </dev/ttyUSB1 >/dev/ttyUSB1
    -sh: can't open /dev/ttyUSB1: no such file

    probably the USB name is not the same. How to get the right name?

    Sorry for the basic questions... Thanks!
    Get back to basics.

    In the thread you started - you asked about Raspi and UART https://forums.slimdevices.com/showt...=1#post1043487

    There are two choices
    (i) use Pi some GPIO as serial (https://forums.raspberrypi.com/viewtopic.php?t=17360 )
    or
    (ii) use a USB serial adaptor.

    I stated all examples I give are tested on Ubuntu.
    I can't help you about serial port on PCP except for the general advice about USB serial port. I don't know if GPIO serial works under PCP nor how it can be setup.

    You need to get a serial port setup and working under PCP before you trying any of the solutions I suggested.

  4. #14
    Senior Member
    Join Date
    Jan 2022
    Location
    Switzerland
    Posts
    146
    Quote Originally Posted by bpa View Post
    N

    There are two choices
    (i) use Pi some GPIO as serial (https://forums.raspberrypi.com/viewtopic.php?t=17360 )
    or
    (ii) use a USB serial adaptor.
    it seems more logical using the embedded GPIO TxD/RxD instead of a USB-Serial adapter; no ?

  5. #15
    Senior Member
    Join Date
    Oct 2005
    Location
    Ireland
    Posts
    21,898
    Quote Originally Posted by PaulH View Post
    it seems more logical using the embedded GPIO TxD/RxD instead of a USB-Serial adapter; no ?
    Not logical, perhaps more cost effective - maybe.

    Using onboard UARTs will be more complicated to setup unless you know someone has the specific knowledge of UIARTs and PCP.

    AFAICT RPi3/4 have 4 UARTs but normally only UART0/1 are enabled from config.txt. So for Raspbian systems, changes are needed to config.txt and the device tree overlay and also need to disable spawning of getty on the enabled UART0 port (usually called /dev/ttyACM0).

    You need to check what needs to be done for PCP.

  6. #16
    Senior Member
    Join Date
    Jan 2022
    Location
    Switzerland
    Posts
    146
    Quote Originally Posted by bpa View Post
    Not logical, perhaps more cost effective - maybe.

    Using onboard UARTs will be more complicated to setup unless you know someone has the specific knowledge of UIARTs and PCP.

    AFAICT RPi3/4 have 4 UARTs but normally only UART0/1 are enabled from config.txt. So for Raspbian systems, changes are needed to config.txt and the device tree overlay and also need to disable spawning of getty on the enabled UART0 port (usually called /dev/ttyACM0).

    You need to check what needs to be done for PCP.
    I don't care. As long as I can get serial control... ;-)

    Tried from Terminal:

    Code:
    stty -F /dev/ttyAMA0 9600
    echo "hello" > /dev/ttyAMA0
    I see on the serial line "hello"
    Last edited by PaulH; 2022-01-23 at 09:32.

  7. #17
    Senior Member paul-'s Avatar
    Join Date
    Jan 2013
    Posts
    4,973
    Quote Originally Posted by bpa View Post
    Not logical, perhaps more cost effective - maybe.
    Using onboard UARTs will be more complicated to setup unless you know someone has the specific knowledge of UIARTs and PCP.
    The onboard serial port is often used for serial console on the RPI, but we don't enable that by default. ttyAMA0 is pretty safe to use, provided you never enable the RPI bluetooth (It is disabled by default in pCP) If you want bluetooth, then use a USB serial device.....or use a bluetooth usb device.
    piCorePlayer a small player for the Raspberry Pi in RAM.
    Homepage: https://www.picoreplayer.org

    Please donate if you like the piCorePlayer

  8. #18
    Senior Member
    Join Date
    Jan 2022
    Location
    Switzerland
    Posts
    146
    Quote Originally Posted by paul- View Post
    The onboard serial port is often used for serial console on the RPI, but we don't enable that by default. ttyAMA0 is pretty safe to use, provided you never enable the RPI bluetooth (It is disabled by default in pCP) If you want bluetooth, then use a USB serial device.....or use a bluetooth usb device.
    I'll not using Bluetooth !

  9. #19
    Senior Member
    Join Date
    Oct 2005
    Location
    Ireland
    Posts
    21,898
    Quote Originally Posted by PaulH View Post
    I don't care. As long as I can get serial control... ;-)

    Tried from Terminal:

    Code:
    stty -F /dev/ttyAMA0 9600
    echo "hello" > /dev/ttyAMA0
    I see on the serial line "hello"
    Good news.
    First try the command
    Code:
    nc 192.168.1.120 9090 </dev/ttyAMA0 >/dev/ttyAMA0
    If nc manages to connected your LMS CLI on port 9090 - no error.

    Make sure a player is connected to LMS. Example commands to send. Each command is ended by a <LF> CTRL/J which will tell CLI to process chars up to CTRL/J. Nothing will appear on screen as CLI does not echo char by char - only response to commands.

    player count ?<LF>
    player name 0 ?<LF>

  10. #20
    Senior Member
    Join Date
    Jan 2022
    Location
    Switzerland
    Posts
    146
    Quote Originally Posted by bpa View Post
    First try the command
    Code:
    nc 192.168.1.120 9090 </dev/ttyAMA0 >/dev/ttyAMA0
    If nc manages to connected your LMS CLI on port 9090 - no error.
    Command seems to be accepted!
    Code:
    tc@pCP:~$ nc 192.168.1.120 9090 </dev/ttyAMA0 >/dev/ttyAMA0
    Quote Originally Posted by bpa View Post
    Make sure a player is connected to LMS. Example commands to send. Each command is ended by a <LF> CTRL/J which will tell CLI to process chars up to CTRL/J. Nothing will appear on screen as CLI does not echo char by char - only response to commands.

    player count ?<LF>
    player name 0 ?<LF>
    Not sure what I'm doing.
    After nc...
    I write:
    player count?
    And enter (Terminal send probably <CR><LF>

    But I see neither answer on Terminal nor on RS232 side.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •