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!
Results 11 to 20 of 37
-
2022-01-23, 06:48 #11
- Join Date
- Jan 2022
- Location
- Switzerland
- Posts
- 146
-
2022-01-23, 06:59 #12
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
-
2022-01-23, 07:11 #13
- Join Date
- Oct 2005
- Location
- Ireland
- Posts
- 21,631
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!
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.
-
2022-01-23, 07:49 #14
- Join Date
- Jan 2022
- Location
- Switzerland
- Posts
- 146
-
2022-01-23, 07:54 #15
- Join Date
- Oct 2005
- Location
- Ireland
- Posts
- 21,631
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.
-
2022-01-23, 09:28 #16
- Join Date
- Jan 2022
- Location
- Switzerland
- Posts
- 146
-
2022-01-23, 09:58 #17
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
-
2022-01-23, 11:46 #18
- Join Date
- Jan 2022
- Location
- Switzerland
- Posts
- 146
-
2022-01-23, 12:05 #19
- Join Date
- Oct 2005
- Location
- Ireland
- Posts
- 21,631
Good news.
First try the command
Code:nc 192.168.1.120 9090 </dev/ttyAMA0 >/dev/ttyAMA0
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>
-
2022-01-23, 12:49 #20
- Join Date
- Jan 2022
- Location
- Switzerland
- Posts
- 146
Command seems to be accepted!
Code:tc@pCP:~$ nc 192.168.1.120 9090 </dev/ttyAMA0 >/dev/ttyAMA0
After nc...
I write:
player count?
And enter (Terminal send probably <CR><LF>
But I see neither answer on Terminal nor on RS232 side.