aliok
Posts: 3
Joined: Mon Oct 28, 2013 11:27 pm

VNC over serial

Mon Oct 28, 2013 11:33 pm

Hi everyone,

As I often be in no-network locations, I would like to set up VNC over serial connection.

I am able to connect:
1. Console via serial cable
2. Console via SSH in a network environment
3. X session via VNC in a network environment

What I really like to have is just connect my Raspberry Pi with the cable and use some kind of magic to see X session also.
Does anyone think that it is possible?
Searched but found nothing.

SacredRose
Posts: 25
Joined: Mon Sep 02, 2013 8:39 am

Re: VNC over serial

Tue Oct 29, 2013 10:31 am

i assume you are using a laptop to connect to your pi in these situations.
wouldn't it be easier to just use a small ethernet cable. directly between your laptop and pi. and set up static IP's on both or run a simple dhcp server from your laptop to provide the pi with an IP address. this way you can just have it behave in the same way as if it is connected to a normal network without internet.

FM81
Posts: 518
Joined: Wed Apr 17, 2013 4:33 pm

Re: VNC over serial

Tue Oct 29, 2013 11:54 am

I assume, you will not be happy about the speed, if you're transmitting the complete graphical screen via VNC!
Serial speed is 115200 baud at maximum, this means 14400 Byte per second ...
Value over network can reach in theory 12500000 Byte per second - you see the difference? (in practice ~10 MByte)

Serial is made for console, and can be a very good solution, but only in this case. :)

MfG, FM_81
A: What does the command 'cat /dev/urandom', can you tell me please?
B: Yeah, that's very simple: It feeds your cat with radioactive material!

karlkiste
Posts: 189
Joined: Tue Jan 22, 2013 8:50 am
Location: berlin, germany

Re: VNC over serial

Tue Oct 29, 2013 2:01 pm

FM81 wrote: Serial speed is 115200 baud at maximum, [...]
Not always. If you're using something like a MAX232 you're right, the slew rate with those level converters is limited, so 115200 is often a limit. You can however connect one pi to another, and transmit 1MBaud, or even 4MBaud (but the latter surely not without hardware handshake).

Then, you can use "ppp", or the older "slip" which both can be used to transmit IP packets over serial lines. That is, you're in fact setting up a network using the serial line. That way you will be able to use VNC or any network-based software over serial connection.

FM81
Posts: 518
Joined: Wed Apr 17, 2013 4:33 pm

Re: VNC over serial

Tue Oct 29, 2013 4:29 pm

karlkiste wrote:You can however connect one pi to another, and transmit 1MBaud, or even 4MBaud (but the latter surely not without hardware handshake).
OK, 1 MBaud may give us around one percent of "normal raspberry-network speed"!
Not sure if this is speed enough to transmit a complete X-session in a way, which makes the thread-opener happy?
He should decide by himself ...

MfG, FM_81
A: What does the command 'cat /dev/urandom', can you tell me please?
B: Yeah, that's very simple: It feeds your cat with radioactive material!

karlkiste
Posts: 189
Joined: Tue Jan 22, 2013 8:50 am
Location: berlin, germany

Re: VNC over serial

Tue Oct 29, 2013 5:16 pm

FM81 wrote:OK, 1 MBaud may give us around one percent of "normal raspberry-network speed"!
Well, let's say "nominal network speed". The pi is about able to send a copy of /dev/zero as udp packets at 100MBit, but this uses up all the CPU. I doubt the pi can send useful data at 100MBit and do anything else in parallel.

Anyway, the answer might be helpful. Perhaps for a model A which has no network, or if the network is in some special use.

I've been using VNC some years ago via ISDN, i.e. 64kBit. It's far better than having no access.

Return to “Advanced users”