Topic: chumby One composite TV out

The CPU used in the chumby One has a lot of stuff on the die.  Including a composite-out TV encoder, which while not connected by default, is not hard to get access to at all.  Today, bunnie posted instructions on how to add a video connector.  He noted that modding the firmware is an "exercise to the reader".  Well, I do enjoy exercises wink

You need to do three things, and you too can have Pandora on your TV!

  • Perform the video mod

  • Install new kernel (using the scripts below)

  • Switch video modes (using switch_output)

I'm hoping the new kernel will make it into a future firmware release, but for now you'll have to install one yourself.

The utility to switch modes just does an ioctl() on one of the framebuffer devices to set the resolution to 720x480x32.  This should automatically enable TV mode.  If you're in a PAL country, it's a slightly different resolution, but the call ought to be the same.  I have a small program that just does this.

Unfortunately, there isn't any hardware support for image-scaling, so I need to run the flashplayer at 720x480.  Fortunately, while the TV encoder wants video in 32-bit, there is a colorspace converter that everything goes through, so a recompiled flashplayer isn't required.

Another drawback is that it doesn't appear possible to drive the LCD and the TV at the same time.  As a result, the LCD goes into a "self-test" mode and just continuously draws a red/green/blue/black/white sequence.

Because of this, you pretty much have to use the touchscreen blind.  Fortunately, you don't have to recalibrate it, so it shouldn't be too difficult to navigate.

Note that this is only composite video.  There's no component or digital video circuitry onboard.

Also, because it's pushing a whole lot more pixels, it's going to run widgets slower.  Still, pong-clock-on-TV is always cool.

I've posted the kernel on files.chumby.com.  You can use this script to download and install it.

#!/bin/sh
KRN=krnB
if grep -q mmcblk0p2 /proc/cmdline; then KRN=krnA; fi
cd /mnt/storage
rm -f c1-k1-video switch_output
wget http://files.chumby.com/hacks/c1-k1-video
wget http://files.chumby.com/hacks/switch_output
chmod a+x switch_output
if [ "$(md5sum c1-k1-video | awk '{print $1}')" != "932523d6458abdfc2e7546bcb1c49587" ]
then
    echo "MD5 error.  Cannot continue."
    exit
fi
config_util --cmd=putblock --dev=/dev/mmcblk0p1 --block=${KRN} < /mnt/storage/c1-k1-video
echo "Kernel updated.  Reboot to use it."

Put this into a script and run it, then reboot.

Hook up a TV, then connect via SSH.  Run the following commands to switch to NTSC and restart the flashplayer:

stop_control_panel
/mnt/storage/switch_output -n
chumbyflashplayer.x -x 720 -y 480 -i /tmp/controlpanel.swf

Files.  The following files are relevant in case you want to dig deeper.  Note that I did need to modify arch/arm/mach-stmp378x/include/mach/memory. to define CONSISTENT_DMA_SIZE as SZ_8M to be able to allocate the additional screen size.  If you're playing around with it and your screen boots up all white, you've probably run out of DMA memory and need to up this value.

Re: chumby One composite TV out

Didnt i see some mention of using a USB to video adapter somewhere in the forums.. if so, would that *not* disable the internal screen or allow it to be set to black but have the touchpanel still active?

Re: chumby One composite TV out

The SiS USB2VGA adapter does work, though I've only succeeded in sending it jpeg images using a special program, and in using it as a VGA console.  I don't know that it has the necessary framebuffer drivers to work with the flashplayer.  And you can use both displays at the same time.

That said, when using the TV out the touchscreen isn't disabled, only the LCD display.  Which can be a bit hard to use.

Re: chumby One composite TV out

Having performed this mod over the weekend it is not very complicated with the above instructions (although it would be nice if you could switch it directly from the Chumby without having to SSH in each time).
However, has anyone else had this result:
I am sending the video to a LCD HDTV (1080p) and the main image (what I would have expected on the Chumby LCD) is displayed in the upper left corner, with a small portion slightly outside the visible area. In addition the majority of the screen is now filled with a blue background (I think it is the widget background color), which is not totally unexpected. However the image never updates, the widget appears  "frozen". Switching it back the Chumby works normally without any issue.

Re: chumby One composite TV out

Mine is working with no issues.  Can you try another display?  I'm not sure what the symptom would be if the ground is open, or if the two signals are swapped.

I automated my startup.  In start_control_panel, I changed:

if [ "$FP_QUIT" -eq "1" ]; then
    CP_ARGS=$CP_ARGS" -Q"
fi



to:

if [ "$FP_QUIT" -eq "1" ]; then
    CP_ARGS=$CP_ARGS" -Q"
fi

if [ -e /psp/ntsc ]; then
echo Switching to NTSC video
CP_ARGS=$CP_ARGS" -x 720 -y 480"
/mnt/storage/switch_output -n
else
echo Using Chumby LCD for video
fi




If there is a file /psp/ntsc, then video will turn on during the boot process.  SSH in to add or delete the file, and reboot.

I believe start_control_panel is in /usr/chumby/scripts.  The file is write protected, so I have two scripts:

script 'rw' to access:

echo Setting file system to Read/Write.
mount -oremount,rw /



and script 'ro' to put it back:

echo Setting file system to Read Only.
mount -oremount,ro /


I use the nano editor to make changes.  You can search for install instruction.  I was very unproductive with vi.


Good luck.

Re: chumby One composite TV out

WARNING: The above procedure caused my Chumby to lose access to its WiFi adaptor!

Here's what happened: From a working Chumby with up-to-date firmware (as of March 5th 2010), I ran the script from ChumbyLurker and the script ran fine... it downloaded the files, ran config_util correctly and echoed me to reboot...

I then rebooted (several times including power cycling), and since then, my Chumby no longer detects its WiFi adaptor.  in other words... I can no longer SSH into Chumby to try to fix things!

Digging deeper, I was successful in connecting to Chumby via its internal serial port, so I could interact with the shell, see the boot messages and run commands.  Below is what I get when I remove the WiFi adaptor and re-insert it back in…

As you can see below, From messages such as “disagrees about version of symbol skb_put”, it appears that the kernel changes have caused a version change causing the Linux WiFi cfg80211 stack to abort the probing process because of incompatible versions.

I could unbrick my Chumby, but I really need to fix the Chumby’s video framebuffer so I can get Qt to run on the device.
Please advise on how I can fix this procedure to get the framebuffer to be compatible with Qt and reinstant working WiFi access!

Thanks

   Jeepster

-----------------------------------
/ $ iwconfig
lo        no wireless extensions.

sit0      no wireless extensions.

ip6tnl0   no wireless extensions.

/ $ ifconfig
lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:82 errors:0 dropped:0 overruns:0 frame:0
          TX packets:82 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:6020 (5.8 KiB)  TX bytes:6020 (5.8 KiB)

/ $ [ 1525.930000] usb 1-1.2: USB disconnect, address 4
[ 1534.620000] usb 1-1.2: new high speed USB device using fsl-ehci and address 5
[ 1534.890000] usb 1-1.2: configuration #1 chosen from 1 choice
[ 1535.110000] cfg80211: disagrees about version of symbol skb_put
[ 1535.110000] cfg80211: Unknown symbol skb_put
[ 1535.120000] cfg80211: disagrees about version of symbol genl_register_ops
[ 1535.130000] cfg80211: Unknown symbol genl_register_ops
[ 1535.140000] cfg80211: disagrees about version of symbol pskb_expand_head
[ 1535.150000] cfg80211: Unknown symbol pskb_expand_head
[ 1535.160000] cfg80211: disagrees about version of symbol kfree_skb
[ 1535.160000] cfg80211: Unknown symbol kfree_skb
[ 1535.170000] cfg80211: disagrees about version of symbol netlink_broadcast
[ 1535.180000] cfg80211: Unknown symbol netlink_broadcast
[ 1535.190000] cfg80211: disagrees about version of symbol __alloc_skb
[ 1535.200000] cfg80211: Unknown symbol __alloc_skb
[ 1535.210000] cfg80211: disagrees about version of symbol __dev_get_by_index
[ 1535.220000] cfg80211: Unknown symbol __dev_get_by_index
[ 1535.230000] cfg80211: disagrees about version of symbol skb_pull
[ 1535.230000] cfg80211: Unknown symbol skb_pull
[ 1535.240000] cfg80211: disagrees about version of symbol netlink_unicast
[ 1535.250000] cfg80211: Unknown symbol netlink_unicast
[ 1535.260000] cfg80211: disagrees about version of symbol dev_get_by_index
[ 1535.260000] cfg80211: Unknown symbol dev_get_by_index
[ 1535.270000] cfg80211: disagrees about version of symbol dev_close
[ 1535.280000] cfg80211: Unknown symbol dev_close
[ 1535.290000] cfg80211: disagrees about version of symbol skb_push
[ 1535.290000] cfg80211: Unknown symbol skb_push
[ 1535.300000] cfg80211: disagrees about version of symbol wireless_send_event
[ 1535.310000] cfg80211: Unknown symbol wireless_send_event
[ 1535.310000] cfg80211: disagrees about version of symbol nla_put
[ 1535.320000] cfg80211: Unknown symbol nla_put
[ 1535.330000] cfg80211: disagrees about version of symbol ethtool_op_get_link
[ 1535.340000] cfg80211: Unknown symbol ethtool_op_get_link
[ 1535.350000] cfg80211: disagrees about version of symbol skb_trim
[ 1535.360000] cfg80211: Unknown symbol skb_trim
[ 1535.380000] cfg80211: disagrees about version of symbol genl_sock
[ 1535.380000] cfg80211: Unknown symbol genl_sock
[ 1535.420000] cfg80211: disagrees about version of symbol skb_put
[ 1535.420000] cfg80211: Unknown symbol skb_put
[ 1535.430000] cfg80211: disagrees about version of symbol genl_register_ops
[ 1535.440000] cfg80211: Unknown symbol genl_register_ops
[ 1535.460000] cfg80211: disagrees about version of symbol pskb_expand_head
[ 1535.460000] cfg80211: Unknown symbol pskb_expand_head
[ 1535.470000] cfg80211: disagrees about version of symbol kfree_skb
[ 1535.480000] cfg80211: Unknown symbol kfree_skb
[ 1535.490000] cfg80211: disagrees about version of symbol netlink_broadcast
[ 1535.490000] cfg80211: Unknown symbol netlink_broadcast
[ 1535.500000] cfg80211: disagrees about version of symbol __alloc_skb
[ 1535.510000] cfg80211: Unknown symbol __alloc_skb
[ 1535.520000] cfg80211: disagrees about version of symbol __dev_get_by_index
[ 1535.530000] cfg80211: Unknown symbol __dev_get_by_index
[ 1535.540000] cfg80211: disagrees about version of symbol skb_pull
[ 1535.550000] cfg80211: Unknown symbol skb_pull
[ 1535.560000] cfg80211: disagrees about version of symbol netlink_unicast
[ 1535.560000] cfg80211: Unknown symbol netlink_unicast
[ 1535.570000] cfg80211: disagrees about version of symbol dev_get_by_index
[ 1535.580000] cfg80211: Unknown symbol dev_get_by_index
[ 1535.580000] cfg80211: disagrees about version of symbol dev_close
[ 1535.590000] cfg80211: Unknown symbol dev_close
[ 1535.600000] cfg80211: disagrees about version of symbol skb_push
[ 1535.600000] cfg80211: Unknown symbol skb_push
[ 1535.610000] cfg80211: disagrees about version of symbol wireless_send_event
[ 1535.620000] cfg80211: Unknown symbol wireless_send_event
[ 1535.630000] cfg80211: disagrees about version of symbol nla_put
[ 1535.630000] cfg80211: Unknown symbol nla_put
[ 1535.640000] cfg80211: disagrees about version of symbol ethtool_op_get_link
[ 1535.650000] cfg80211: Unknown symbol ethtool_op_get_link
[ 1535.660000] cfg80211: disagrees about version of symbol skb_trim
[ 1535.670000] cfg80211: Unknown symbol skb_trim
[ 1535.690000] cfg80211: disagrees about version of symbol genl_sock
[ 1535.700000] cfg80211: Unknown symbol genl_sock

Re: chumby One composite TV out

Hi all,

I've tried restoring the Chumby to its factory defaults and the problem persists... (I guess it didn't replace the modded kernel back to the original)

What would be the best way to unbrick my Chumby and restore the original kernel?

Help!

   Jean-Pierre

Re: chumby One composite TV out

Hi all,

If the problem I've had happens to anyone else, you can fix it by going throught the "updating chumby with a USB flash drive" procedure at http://www.chumby.com/pages/latest_software

Now... I still need Qt to run on this box... I'll try learning more about the patch to see how I can mode switch the framebuffer to be compatible with Qt.

Any hints on how to proceed?

  Jeepster

Re: chumby One composite TV out

Hi all,

For those of you trying to just get the framebuffer working with Qt and other fb-based user apps, you don't need to apply all of this patch...  Here is the procedure:

wget http://files.chumby.com/hacks/switch_output
chmod +x switch_output

stop_control_panel
switch_output -l
switch_fb.sh 0
... and then launch your Qt app / sample with '-qws' suffix appended.

Good luck!

  Jeepster

Re: chumby One composite TV out

Hi,
I have some problem´s. I wanted to install the new kernel but if reboot my Chumby, it breaks off my boot and the Chumby begins to start over again and again.
I used the script from ChumbyLurker and run it and putty showed me this:

login as: root
                                                    ,.....,
                                          .rchERQQQQQQQQQQQQQQp:
                                .fQQQQQQQQQQQQQQQQQQQQQRQQQQQQQQQR
                             hQQQQQQQRRRRMMZDEEbb00009999000bEZRQQQ
                           QQQQRDb09ppppPPPPXXXXXXXXXXXXXXXXPPPpbZQ:
                          QQMbpPXSSSPpppPXXSSSXXXXXXXP99PPXXSSSXP0QQ
                         QQ0XSSSShbQQMMQQZPXXXXXXXXPQQRRQQ9PXXXXXpZQ
                        :Q9XSSXXhRF      EQpXXXXXXPR     .Q0PXXXXP0Q
                        tQPXXXXSZr   ,    tQPXXXXSR        QpXXXXX9Q
                        JQPXXXXXQ  7QQQQ,  Q9XXXSPQ   QQ   Q9XXXXX0Q
                        :QpXXXSPQ   QQQQ   Q9XXXSpQ:      7QPXXXXXbQ
                         Q0XXXS9QR        QRPXXXX0MQZ   ,QQpXXXXXXDZ
                         RMPXSX9DQQ:    LQQPXXXXXpERQQQQQQ0PXXXXXXQr
                         .QpXSXP0ZRQQQQQQZpXXXXXXPp0DMRZ0pXXXXXXSXQ
                          QpXXXXP9EMRRRD9PXXXXXXXXXPPPPXXSXXXXXXSPQ
                          QpXXXSXPPpppPXSSXXXXXXXXSSSSSSSXXXXXXXSER
                         .QPXXXXXSSSSSSSSXXXXXXXXXXXXXXXXXXXXXXXXZR
                         RDXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXSX0Q.
             r9QQQQQQQQQQZpXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX0RQQY
        .EQQQQQQQQQRRRRZ0PXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXPPPP9ERQQQD
     .QQQQQQQRQQRQQQRM9PXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXhQQQZ990EMQQQ0
   9QQQQQQQQMPtYLrirrrpPXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXSD:  .9QQE99bMRQQ:
  hb.                 ZpXXXXXXbQMPXXXXXXXXXXXXXXXXSpEPXXXXX9Q     .QQR00EMQQZ
                    DQ9XXSXPRQP  ZPXXXXSPQEPXXXXXS9b2RPXXSX9Qf       FQQEbDRQQ
                  iQQ9PXXPQQ:   1ZXXXXhZQ iMXXXXSXQ  pQpXXX0MQ         :QQQRRQh
                 2QR9XXXQQ,    QQPXXXhRF  rQPXXXSQ    QDPXXPbQZ           7RQQQ
                .QEPXhbQ:     QQpXXXhQ7   QEXXXS9b     QpXXX9MQ
                QRPSXQD      QQpXXXhQ7    Q9XXXSQ,     2QPXXPbQr
                Q0XpQi      1QpXXSSQL    jQPXXSXQ       QQPXX9QM
                QpMQ        QbXSSPQi     QMXSXS0Q        RQpPpRQ
                QQU        tQpSSEQ       QbXSSSQU         YQD9RM
                Q          QRPpQ0        QbXSSSQ            QQQr
                           QMQQ          QMPShQF             :Q
                           QQ.           :QpPQb
                                          QQQr
                                           i
chumby:~# #!/bin/sh
chumby:~# KRN=krnB
chumby:~# if grep -q mmcblk0p2 /proc/cmdline; then KRN=krnA; fi
if [ "$(md5sum c1-k1-video | awk '{print $1}')" != "932523d6458abdfc2e7546bcb1c49587" ]
then
    echo "MD5 error.  Cannot continue."
    exit
fi
config_util --cmd=putblock --dev=/dev/mmcblk0p1 --block=${KRN} < /mnt/storage/c1-k1-video
echo "Kernel updated.  Reboot to use it."chumby:~# cd /mnt/storage
chumby:/mnt/storage# rm -f c1-k1-video switch_output
chumby:/mnt/storage# wget http://files.chumby.com/hacks/c1-k1-video
--05:21:11--  http://files.chumby.com/hacks/c1-k1-video
           => `c1-k1-video'
Resolving files.chumby.com... 69.43.206.56
Connecting to files.chumby.com|69.43.206.56|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2,152,276 (2.1M) [text/plain]

100%[====================================>] 2,152,276    166.15K/s    ETA 00:00

05:21:25 (161.81 KB/s) - `c1-k1-video' saved [2152276/2152276]

chumby:/mnt/storage# wget http://files.chumby.com/hacks/switch_output
--05:21:25--  http://files.chumby.com/hacks/switch_output
           => `switch_output'
Resolving files.chumby.com... 69.43.206.56
Connecting to files.chumby.com|69.43.206.56|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 6,674 (6.5K) [text/plain]

100%[====================================>] 6,674         37.38K/s

05:21:25 (37.24 KB/s) - `switch_output' saved [6674/6674]

chumby:/mnt/storage# chmod a+x switch_output
chumby:/mnt/storage# if [ "$(md5sum c1-k1-video | awk '{print $1}')" != "932523d
6458abdfc2e7546bcb1c49587" ]
> then
>     echo "MD5 error.  Cannot continue."
>     exit
> fi
chumby:/mnt/storage# config_util --cmd=putblock --dev=/dev/mmcblk0p1 --block=${K
RN} < /mnt/storage/c1-k1-video
config_util v0.23
Finished write with total of 2152276 bytes written (block size 4194304)
chumby:/mnt/storage# echo "Kernel updated.  Reboot to use it."
Kernel updated.  Reboot to use it.
chumby:/mnt/storage# reboot
chumby:/mnt/storage#

After this I reboot it and my chumby don´t start until I have reinstalled the old kernel.
Help!
full-hd