Skip to content

Can I use PI4J to create and use virtual serial ports on Raspberry Pi? #97

Discussion options

You must be logged in to vote

When you say "virtual" serial ports, do you mean "bit-banged" serial ports? (The ability to emulate serial communication, signaling and timing via software over arbitrary GPIO pins). The underlying PiGpio library does support bit-banded serial ports using custom GPIO pins to some degree. I don't think this is exposed via Pi4J however at this time.

If you are just looking for expandability, like @FDelporte mentioned, you can easily add USB to serial port adapters to expand the serial capability of the RaspberryPi.

If by "virtual" serial port you mean a serial port exposed over the network, then I would suggest using the ser2net utility:
https://linux.die.net/man/8/ser2net#:~:text=The%20ser…

Replies: 4 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@Conmi-WhiteJoker
Comment options

Comment options

You must be logged in to vote
1 reply
@Conmi-WhiteJoker
Comment options

Answer selected by FDelporte
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants