Page 1 of 2

Console Boot with 2.8" LCD TFT USB Robopeak? Possible ?

Posted: Thu Sep 18, 2014 6:05 am
by TwinyTwice
Hi everybody,

I'm Newbies in RPi World, i've a little problem with my Raspberry Pi B+ and my Robopeak 2.8" USB TFT LCD Display.

I would like to be able to boot directly from the console, not with X login window.

I try many things, like turning on the doc Robopeak.

Code: Select all

sudo nano /boot/cmdline.txt
and then add

Code: Select all

fbcon=font:ProFont6x11 fbcon=map:1

Code: Select all

sudo nano /etc/init.d/launch_desktop.sh

and comment this

Code: Select all

#su -c startx pi &
So, the "launch_desktop..sh" file doesn't exist, i've create it, but no change!

I also contact support DFRobot (Supplier of the screen) and Robopeak (Manufacturer of the screen)

This is their response:
Sorry there is some difference between the ROM of legacy raspberry-pi and the one of B+ model.

The new release of the firmware image integrated a script to switch between hdmi and usb display automatically, which will launch X when display is connected to or disconnected from pi.

What else you need to do to make the console work is just comment out the following line from the /etc/rc.local:
/etc/init.d/rpusbdispd start
So i try their solutions, but impossible to boot the console.

Here screenshot from what i obtain at boot :

Robopeak on the screen 2.8 "TFT LCD USB​​ :

HDMI screen after boot :
IMG_0791.JPG
HDMI screen after boot
IMG_0791.JPG (46.25 KiB) Viewed 8743 times
Robopeak 2.8" TFT LCD USB​​ after boot :
IMG_0792.JPG
Robopeak 2.8" TFT LCD USB​​ after boot
IMG_0792.JPG (56.05 KiB) Viewed 8743 times

No way to have the console.

Re: Console Boot with 2.8" LCD TFT USB Robopeak? Possible ?

Posted: Fri Sep 19, 2014 4:52 pm
by TwinyTwice
Strange ! No one to help me?

Re: Console Boot with 2.8" LCD TFT USB Robopeak? Possible ?

Posted: Fri Sep 19, 2014 4:55 pm
by DougieLawson
There's a option in raspi-config for boot to console, boot to desktop or boot to desktop with scratch.

Re: Console Boot with 2.8" LCD TFT USB Robopeak? Possible ?

Posted: Fri Sep 19, 2014 5:06 pm
by TwinyTwice
Thanks for ur help DougieLawson, already try this but no change !

Re: Console Boot with 2.8" LCD TFT USB Robopeak? Possible ?

Posted: Fri Sep 19, 2014 11:34 pm
by DougieLawson
What do you have in /etc/profile.d?
What do you have in /etc/inittab?
What do you have in /etc/rc.local?

Re: Console Boot with 2.8" LCD TFT USB Robopeak? Possible ?

Posted: Sat Sep 20, 2014 5:37 am
by TwinyTwice
Hi,

So :

In "/etc/profile.d", this file is fully empty.

In "/etc/inittab" :

Code: Select all

# /etc/inittab: init(8) configuration.
# $Id: inittab,v 1.91 2002/01/25 13:35:21 miquels Exp $

# The default runlevel.
id:2:initdefault:

# Boot-time system configuration/initialization script.
# This is run first except when booting in emergency (-b) mode.
si::sysinit:/etc/init.d/rcS

# What to do in single-user mode.
~~:S:wait:/sbin/sulogin

# /etc/init.d executes the S and K scripts upon change
# of runlevel.
#
# Runlevel 0 is halt.
# Runlevel 1 is single-user.
# Runlevels 2-5 are multi-user.
# Runlevel 6 is reboot.

l0:0:wait:/etc/init.d/rc 0
l1:1:wait:/etc/init.d/rc 1
l2:2:wait:/etc/init.d/rc 2
l3:3:wait:/etc/init.d/rc 3
l4:4:wait:/etc/init.d/rc 4
l5:5:wait:/etc/init.d/rc 5
l6:6:wait:/etc/init.d/rc 6
# Normally not reached, but fallthrough in case of emergency.
z6:6:respawn:/sbin/sulogin

# What to do when CTRL-ALT-DEL is pressed.
ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now

# Action on special keypress (ALT-UpArrow).
#kb::kbrequest:/bin/echo "Keyboard Request--edit /etc/inittab to let this work."

# What to do when the power fails/returns.
pf::powerwait:/etc/init.d/powerfail start
pn::powerfailnow:/etc/init.d/powerfail now
po::powerokwait:/etc/init.d/powerfail stop

# /sbin/getty invocations for the runlevels.
#
# The "id" field MUST be the same as the last
# characters of the device (after "tty").
#
# Format:
#  <id>:<runlevels>:<action>:<process>
#
# Note that on most Debian systems tty7 is used by the X Window System,
# so if you want to add more getty's go ahead but skip tty7 if you run X.
#
#1:2345:respawn:/sbin/getty --noclear 38400 tty1
1:2345:respawn:/bin/login -f pi tty1 </dev/tty1 >/dev/tty1 2>&1
2:23:respawn:/sbin/getty 38400 tty2
3:23:respawn:/sbin/getty 38400 tty3
4:23:respawn:/sbin/getty 38400 tty4
5:23:respawn:/sbin/getty 38400 tty5
6:23:respawn:/sbin/getty 38400 tty6

# Example how to put a getty on a serial line (for a terminal)
#
#T0:23:respawn:/sbin/getty -L ttyS0 9600 vt100
#T1:23:respawn:/sbin/getty -L ttyS1 9600 vt100

# Example how to put a getty on a modem line.
#
#T3:23:respawn:/sbin/mgetty -x0 -s 57600 ttyS3

#Spawn a getty on Raspberry Pi serial line
T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100
In this file, i've just modified this line "1:2345:respawn:/bin/login -f pi tty1 </dev/tty1 >/dev/tty1 2>&1" for auto-login (but no work at this time).

In "/etc/rc.local" :

Code: Select all

#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

# Print the IP address
_IP=$(hostname -I) || true
if [ "$_IP" ]; then
  printf "My IP address is %s\n" "$_IP"
fi

/etc/init.d/rpusbdispd start

exit 0
In this file, i've tried to comment "/etc/init.d/rpusbdispd start" same as indicated by Robopeak support but, no boot (rainbow screen on my HDMI screen and white snow in my 2.8" TFT USB LCD Robopeak).


Voila, you know all now !

Re: Console Boot with 2.8" LCD TFT USB Robopeak? Possible ?

Posted: Sat Sep 20, 2014 12:08 pm
by DougieLawson
Why is that /etc/init.d/rpusbdispd start line in rc.local. That's entirely the WRONG way to do it.

With a script in /etc/init.d you'd use update-rc.d rpusbdispd defaults && update-rc.d rpusbdispd enable to get that started at boot time. And update-rc.d rpusbdispd disable to turn it off again.

What you need to look at is what rpusbdispd is doing, it's probably the script that is starting X-windows after it gets the screen driver loaded and running.

Re: Console Boot with 2.8" LCD TFT USB Robopeak? Possible ?

Posted: Sat Sep 20, 2014 11:32 pm
by TwinyTwice
Hi @DougieLawson
I've never modified this file.
This is the Robopeak Team who did this.
I've send an email to Robopeak support for ask them for help to install drivers of this screen (2.8" TFT USB) and they send me the link to download the latest img disk which had created.

I've installed the new img disk on a fresh SD card and that's all I did!


So, what I should do:

Code: Select all

sudo nano /etc/init.d
and add this :

Code: Select all

update-rc.d rpusbdispd defaults &&
update-rc.d rpusbdispd enable

Right @DougieLawson ?

Re: Console Boot with 2.8" LCD TFT USB Robopeak? Possible ?

Posted: Sat Sep 20, 2014 11:58 pm
by DougieLawson
WRONG!

Re-read what I wrote.

Re: Console Boot with 2.8" LCD TFT USB Robopeak? Possible ?

Posted: Sun Sep 21, 2014 12:19 am
by TwinyTwice
Sorry @DougieDawson I'm French and i've a little trouble understanding the translation!

Re: Console Boot with 2.8" LCD TFT USB Robopeak? Possible ?

Posted: Sun Sep 21, 2014 1:01 am
by TwinyTwice
Sorry, I really try to understand what I should do, but I do not understand anything

Re: Console Boot with 2.8" LCD TFT USB Robopeak? Possible ?

Posted: Sun Sep 21, 2014 6:15 am
by DrCarrots
I'm having the exact same problem as TwinyTwice. I've had my RPi all of two weeks - very new to this - and took the "easy" route of using Robopeak's prebuilt firmware of Raspbian dated 9 September 2014.

The additional info I can add to the above is that when you run sudo raspi-config and attempt to change to boot to console, the following error is given:
update-rc.d: using dependency based boot sequencing
insserv: warning: current start runlevel(s) (3 4 5) of script `lightdm' overrides LSB defaults (2 3 4 5).
insserv: warning: current stop runlevel(s) (0 1 2 6) of script `lightdm' overrides LSB defaults (0 1 6).
insserv: warning: script 'rpusbdispd' missing LSB tags and overrides
The contents of /etc/init.d/rpusbdispd are:

Code: Select all

#! /bin/sh -e
# upstart-job

case "$1" in
	start)
		/etc/rpusbdisp/rpusbdispd.sh start &
		;;
	stop)
		/etc/rpusbdisp/rpusbdispd.sh stop &
		;;
	restart)
		start
		stop
		;;
esac
I can look at other files if wanted, but it looks to me like the problem is with Robopeak's files, which Robopeak should address.

It seems like such a simple ask to get the console, but it doesn't matter what option you choose at the login window, or even if you logout - you just keep going on a loop back into the GUI. Hugely frustrating! :cry:

Re: Console Boot with 2.8" LCD TFT USB Robopeak? Possible ?

Posted: Sun Sep 21, 2014 8:28 am
by DougieLawson
TwinyTwice wrote:Sorry @DougieDawson I'm French and i've a little trouble understanding the translation!
You should have said. Or you should update your forum profile with a location.

Take a look here: https://github.com/robopeak/rpusbdisp/b ... sbdispd.sh
If we update line 52 from

Code: Select all

ensure_lightdm_running
to

Code: Select all

# ensure_lightdm_running
and it should run without starting the lightweight desktop manager. That script should have been installed on your system as part of getting rpusbdisp running.

Re: Console Boot with 2.8" LCD TFT USB Robopeak? Possible ?

Posted: Sun Sep 21, 2014 9:51 am
by TwinyTwice
Hi DougieDawson,

My profile is updated ;-)

I'd do this :

Code: Select all

find / rpusbdispd.sh

Code: Select all

find / lightdm
And no file or folder exist

Re: Console Boot with 2.8" LCD TFT USB Robopeak? Possible ?

Posted: Sun Sep 21, 2014 10:00 am
by DougieLawson
find . -name "rpusbd*"

Re: Console Boot with 2.8" LCD TFT USB Robopeak? Possible ?

Posted: Sun Sep 21, 2014 10:06 am
by TwinyTwice
Ok good, i fin des and i'd do this :

Line 52:

Code: Select all

#ensure_lightdm_running
Save and reboot

And result is :

Console with this bip message :

Code: Select all

Rp usb display detected: 1
Rp usb display detected: 1
Rp usb display detected: 1
Rp usb display detected: 1
Rp usb display detected: 1
... 
Again and Again this message

Re: Console Boot with 2.8" LCD TFT USB Robopeak? Possible ?

Posted: Sun Sep 21, 2014 10:42 am
by TwinyTwice
Just remove this blink message "Rp display detected: 1" and all goes on!

Re: Console Boot with 2.8" LCD TFT USB Robopeak? Possible ?

Posted: Sun Sep 21, 2014 10:54 am
by DougieLawson
change line 71

Code: Select all

daemon
to

Code: Select all

# daemon

Re: Console Boot with 2.8" LCD TFT USB Robopeak? Possible ?

Posted: Sun Sep 21, 2014 11:02 am
by TwinyTwice
AMAZING !!! Thank u so much @DougieLawson

Re: Console Boot with 2.8" LCD TFT USB Robopeak? Possible ?

Posted: Sun Sep 21, 2014 11:21 am
by DougieLawson
TwinyTwice wrote:AMAZING !!! Thank u so much @DougieLawson
De rien.

Re: Console Boot with 2.8" LCD TFT USB Robopeak? Possible ?

Posted: Sun Sep 21, 2014 11:48 am
by DrCarrots
Hmpf. 4 hours to be moderated (up 8 posts). My fault for living on the far side of the planet...

Thanks Dougie, I'll give your instructions a try tomorrow. My RPi is busy doing a night time lapse right now.

Re: Console Boot with 2.8" LCD TFT USB Robopeak? Possible ?

Posted: Sun Sep 21, 2014 6:43 pm
by TwinyTwice
@DougieDawson Good French language ;-) Thanks Again !

Just a little question,
Is it possible to have both screen at once (Robopeak USB TFT Display and my HDMi 21" Display)?
I've already tried FBCP - http://github.com/tasanakorn/rpi-fbcp , but i failed!


@DrCarrots , just saw your message :roll:
Just to be sure, my installation is based on the new disk img provided by Robopeak support and for RPi B+ model.
Available here : http://pan.baidu.com/s/1c01qKCS

Re: Console Boot with 2.8" LCD TFT USB Robopeak? Possible ?

Posted: Mon Sep 22, 2014 8:14 am
by DrCarrots
Yes, I'm using the same image.

I made the changes to /etc/rpusbdisp/rpusbdispd.sh and successfully booted to the console with my HDMI display connected. But when I boot with the Robopeak display, I get a blank screen at the end of the boot process (looking at the centre of the too large display output rather than the top left corner?). I probably have to go back and make the other changes to cmdline.txt and /etc/init.d/launch_desktop.sh but I had taken those out because of the rainbow screen on the HDMI display (and at one point something broke the camera - I can't remember what now).

I found the way I had it set up yesterday between my first and second posts worked best - if the HDMI display was connected on boot, I had the HDMI working with the GUI (just not console); if the Robopeak display was connected, the HDMI goes to a cursor on a blank screen at the end of the booting sequence and the GUI login appears on the Robopeak. By putting the Terminal icon in the top left of the GUI, I could access it on the GUI and get to a console that way (getting the Terminal icon to stay where I put it was annoying). And if the HDMI was connected and I took a photo, the camera preview went to the HDMI display. This suits my needs for now.

I have other problems, which may be my SD card - when I received the RPi B+ I had also purchased the SD card with Raspian which I thought would be the latest distribution. It wasn't (January!), so it didn't work on the B+. But as this was the first time I did anything RPi, it took quite a few attempts at booting before I worked out the problem and I think I corrupted the SD card by not shutting down the RPi correctly. The card seemed okay, so I eventually reformatted and imaged the Robopeak distribution onto it. I have another card I imaged a 'normal' Raspian onto, and that one is working perfectly (and I don't want to mess with it right now). I probably need to get another card and start over with the Robopeak distribution and see if it still breaks the camera and a few other annoyances.

Re: Console Boot with 2.8" LCD TFT USB Robopeak? Possible ?

Posted: Mon Sep 22, 2014 10:25 am
by DougieLawson
With a good copy of Raspbian and an SDCard reader you can update an out-of-date image to work with a B+.

You need to copy bootcode.bin and start*.elf files from Raspbian to the FAT partitions on the out-of-date card.

Re: Console Boot with 2.8" LCD TFT USB Robopeak? Possible ?

Posted: Wed Sep 24, 2014 5:58 pm
by TwinyTwice
Hi, i've an "Errors" with my X Server when execute startx, very strange !

Code: Select all

X.Org X Server 1.12.4
Release Date: 2012-08-27
X Protocol Version 11, Revision 0
Build Operating System: Linux 3.2.0-2-mx5 armv7l Debian
Current Operating System: Linux bullzRPi 3.12.28+ #1 PREEMPT Mon Sep 15 23:46:59 PDT 2014 armv6l
Kernel command line: dma.dmachans=0x7f35 bcm2708_fb.fbwidth=656 bcm2708_fb.fbheight=416 bcm2708.boardrev=0x10 bcm2708.serial=0xa87f99b8 smsc95xx.macaddr=B8:27:EB:7F:99:B8 bcm2708.disk_led_gpio=47 bcm2708.disk_led_active_low=0 sdhci-bcm2708.emmc_clock_freq=250000000 vc_mem.mem_base=0x1ec00000 vc_mem.mem_size=0x20000000  dwc_otg.lpm_enable=0 console=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait fbcon=map:1 fbcon=font:ProFont6x11
Build Date: 18 December 2013  05:20:52PM
xorg-server 2:1.12.4-6+deb7u2 (Julien Cristau <[email protected]>) 
Current version of pixman: 0.33.1
	Before reporting problems, check http://wiki.x.org
	to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
	(++) from command line, (!!) notice, (II) informational,
	(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Wed Sep 24 17:46:32 2014
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
The XKEYBOARD keymap compiler (xkbcomp) reports:
> Warning:          Type "ONE_LEVEL" has 1 levels, but <RALT> has 2 symbols
>                   Ignoring extra symbols
Errors from xkbcomp are not fatal to the X server

an idea to fix this?