-
Notifications
You must be signed in to change notification settings - Fork 75
ccgx serial console
The serial console (ttyO0) of the ccgx is available on the VE.Direct port 1 at the back of the device. It has a double function: it can be used to access the serial console, and can also be used to connect a VE.Direct product. This double function wasn't the best decision in hindsight. But it is what it is.
During a normal boot-up, only SPL/MLO writes one line of data to the serial console:
U-Boot SPL 2013.01.01 (Feb 18 2015 - 09:13:12)
The kernel boot messages are not available on the serial console by default, as it normally expects a VE.Direct device to be connected. (See "Enable kernel boot messages" below)
Once initialization is completed, there are two options:
- (default) The port is used as a normal VE.Direct port. serialstarter.sh runs all VE.Direct applications against that port until one sticks: a (crude) plug-and-play implementation.
- vegetty is started for that port, to be the serial console.
In case interested in the CCGX serial console, I assume you are also interested in its special button functions.
You need to enable the Serial Console on VE.Direct Port 1
option on the CCGX menu. That function is hidden, to get it, first set the access level to Superuser, as described here.
The gui is the application that looks at the setting, and enables and starts vegetty as a daemon service when required.
VE.Direct Port 1 is an isolated port. To make it work, the isolated side needs to be powered externally with anything between 3 to 5V. Normally, when used as a VE.Direct port, it is powered by the connected VE.Direct device.
When powered with 3V3, the RX and TX pins are 3V3 too. When powered with 5V, the RX and TX pins are 5V.
Baud rate is 115200
pin 1 is the one on the left-hand side, when having the keying slot at the top like on this image):
PIN | Function |
---|---|
pin 1 (at the left) | V- |
pin 2 | RX or TX |
pin 3 | TX or RX |
pin 4 | V+ |
At Victron we modify our standard VE.Direct USB cables for that.
Kernel boot messages can be printed though the serial console by adding console=ttyO0,115200
to the U-Boot miscargs
environmental variable.
Steps:
- Enter U-Boot. See Buttons that modify the boot process
setenv miscargs 'omapdss.def_disp=lcd omapfb.vram=0:2M@0x8fe00000 fbskip fbcon=vc:64 console=ttyO0,115200'
run bootcmd