Topic: Web Browser

I've posted instructions for building a Qt 4.6.3 / Webkit based web browser for the Silvermoon platform (AKA Insignia Infocast Internet Media Device), complete with touch screen and SSL support, on the chumby wiki.

If you'd prefer not to build it yourself, I've provided a USB image capable of running the web browser.  To run the USB image, simply download and extract the zip file to the root of a USB drive, insert it into your Silvermoon device and reboot.

Note that while the touch screen works for basic navigation and window management, you will need to use a USB keyboard for any textual input.

Re: Web Browser

I've found various bits and pieces regarding a Qt browser build for Chumby One, but haven't been able to locate a definitive description of its status. 

Can anyone update on this?  Thanks.

Re: Web Browser

Most of the same steps used to build the Silvermoon browser would also apply to a Falconwing/Chumby One browser, with most of the changes being related to the touchscreen support.

The main reason that you don't see much activity around browsers for the smaller devices is that they're too small to be much more than a "talking dog"-type novelty.

Re: Web Browser

Thanks.  I tend to disagree regarding "novelty-only" applicability.  Even a small screen browser opens up access to a variety of control and access functions, even if those need to be configured with a smaller screen in mind.  The widespread use of browsers on very small screen mobile phones is an obvious example.

It would be even nicer if a full-blown Android port were available, but it seems that activity in that area for Chumby has stalled?

Re: Web Browser

Y000 wrote:

I've found various bits and pieces regarding a Qt browser build for Chumby One, but haven't been able to locate a definitive description of its status. 

Can anyone update on this?  Thanks.

You can use the prebuilt Silvermoon web browser USB image mentioned above, with the following modifications to get the browser running on Chumby One.

1. download http://files.chumby.com/hacks/switch_output to the USB drive
2. Use the following debugchumby instead:

#!/bin/sh

stop_control_panel
switch_fb.sh 0
/mnt/usb/switch_output -l

if [ ! -e /mnt/storage/browser_etc ]; then
    cp -rP /etc /mnt/storage/browser_etc
fi
mount -t loop -o bind /mnt/storage/browser_etc /etc

mkdir -p /mnt/usb/root
mount -t loop -o bind /mnt/usb/root /root

export TSLIB_CONFFILE=/mnt/usb/etc/ts.conf
export TSLIB_CALIBFILE=/etc/pointercal
export TSLIB_TSDEVICE=/dev/input/by-id/soc-noserial-event-ts
export QWS_MOUSE_PROTO=Tslib

if [ ! -e /etc/pointercal ]; then
    /mnt/usb/bin/ts_calibrate
    sync
fi
               
while [ 1 ] ; do
  /mnt/usb/demos/browser/browser -qws 'www.chumby.com'
done

The fonts will be very small and colors may be off, but it works.

Re: Web Browser

Excellent.  Thanks!

7 (edited by dydimos 2010-09-04 12:28:38)

Re: Web Browser

Hello,

thanks for that discription. Now my question - what have I to do to get the touchscreen on a Chumby Classic working. :-)

If I use the silvermoon script, I see the browser, but the touchscreen is not working. If I use the chumby one script, even the browser is not working, I see only a destructed picture.

If I use this description (its very old) http://www.jespersaur.com/drupal/node/30 and start ./ts_calibrate I get only the error "ts_open: No such file or directory"...

Some ideas?

Thanks,
dydimos

Re: Web Browser

I got it working at one point using tslib by setting the "Format" to either Collie or Corgi (one of the Zaurus touchscreens, can't remember which) and setting the input file to /dev/ts.  I think it's Collie.

You'll need to modify the startup script to set TSLIB_TSDEVICE=/dev/ts, and modify ts.conf to say "module_raw collie".  Then try rerunning ts_calibrate and seeing if that works.  If not, set it to "corgi" and try again.

Re: Web Browser

i wish we could just ditch the control panel/flash and just set th browser full screen as a kiosk device. chumby please rewrite a javascript/cgi control panel and ditch this stupid flash thing already.

Re: Web Browser

Zurk, You can...

Re: Web Browser

I must be missing a step here...

I'm trying to get the browser running on a Falconwing.  Downloaded the Silvermoon USB image, extracted it to the root of a USB drive, changed debugchumby to the correct commands for Falconwing, and added the switch_output file to the drive.  Plugged the drive into the Chumby and rebooted.

Unfortunately, it freezes on the "Chumby" screen that comes up on boot right before the control panel is downloaded.  What am I missing?

12

Re: Web Browser

Obnates wrote:

I must be missing a step here...

I'm trying to get the browser running on a Falconwing.  Downloaded the Silvermoon USB image, extracted it to the root of a USB drive, changed debugchumby to the correct commands for Falconwing, and added the switch_output file to the drive.  Plugged the drive into the Chumby and rebooted.

Unfortunately, it freezes on the "Chumby" screen that comes up on boot right before the control panel is downloaded.  What am I missing?

I'm not sure which step you're missing, but I've created a Chumby One Browser USB Image that should work for you...

Re: Web Browser

Thanks, Ken.  Unfortunately that gets me the same result:  the device boots up, the Chumby hexapus winks at me, then freezes in place.  The drive is active for a second -- it has a light on it, so I know it's being read -- but then ceases activity and nothing happens again.  I let it sit for 10 minutes before taking the drive out and rebooting.

Don't know if it could be the actual drive I'm using or not -- there's plenty of space (1 GB) and it's not formatted in any special type other than the usual.

14

Re: Web Browser

Try booting the device up normally, enabling sshd (settings -> chumby info -> pi -> SSHD), inserting the USB drive and running:

/mnt/usb/debugchumby

If that still doesn't work, modifying the debugchumby script to launch the browser using strace might shed some light on the problem:

strace /mnt/usb/demos/browser/browser -qws 'www.chumby.com'

Note that the first time the browser launches it will write a bunch of data to /mnt/usb/root/.  If you have a slow USB drive/hub (USB 1.1), it may take a while before the browser actually starts up.  10 minutes should be more than sufficient, but I'm just putting it out there as a possibility.

Re: Web Browser

Thanks Ken for the files for the USB stick, it worked great.  I took a few pictures of my home control software running on the infocast in the browser.

I now have bedside control smile
Any chance that this could become an app?

Thanks again!!!

16 (edited by Obnates 2010-09-08 11:52:53)

Re: Web Browser

Hi Ken, thanks again for the suggestions.

Haven't had time to try the strace option yet, but I did try to SSH into it.  I got this upon running your command:

*** stopping control panel
btplay client v1.3.1.32.39
btplayd not running and --start-daemon not specified, cannot continue!
Switching to fb0
/usr/chumby/scripts/switch_fb.sh: line 76: cannot create /proc/driver/chumbyfwfb/enable: nonexistent directory
current x and y res is: 320 240
current bits per pixel: 16
current width and height defined as : 320 240
/mnt/usb/debugchumby: line 23: /mnt/usb/bin/ts_calibrate: not found
/mnt/usb/debugchumby: line 27: /mnt/usb/demos/browser/browser: not found
/mnt/usb/debugchumby: line 27: /mnt/usb/demos/browser/browser: not found


And then it goes into an endless loop.  I must admit, I am no programmer, so this makes little to no sense to me, but I'm willing to try things and can usually figure them out.  This one is stumping me now though.

(I should add that I tried to just run it again by rebooting the chumby with the USB device in it last year while I was making dinner to verify that it was frozen and not just slow -- 1 hr later, it was still stuck on the Chumby bootup screen.)

17

Re: Web Browser

It looks like you've unpacked the zip file to the wrong location.  It's possible that when you unzipped the image, your unzip utility created it's own directory.  The root of the USB drive should look like this:

chumby:~# ls -l /mnt/usb/
total 23232
drwxr-xr-x    2 root     root         16384 Sep  8 13:37 bin
-rwxr-xr-x    1 root     root           623 Sep  8 13:37 debugchumby
drwxr-xr-x    3 root     root         16384 Sep  8 13:37 demos
drwxr-xr-x    2 root     root         16384 Sep  8 13:37 etc
drwxr-xr-x    5 root     root         16384 Sep  8 13:37 lib
drwxr-xr-x    6 root     root         16384 Sep  8 13:37 plugins
drwxr-xr-x    5 root     root         16384 Sep  8 13:37 ssl
-rwxr-xr-x    1 root     root          6674 Sep  8 13:37 switch_output

Try starting with a freshly formatted (FAT32) USB drive, insert it into your Falconwing, ssh into the device and do:

cd /mnt/usb
wget http://files.chumby.com/browser/chumby_falconwing_browser-1.0.zip
unzip chumby_falconwing_browser-1.0.zip
sync

Then simply run:

/mnt/usb/debugchumby

or reboot the device.

Re: Web Browser

Ken,

Awesome.  That worked perfectly.  Don't know what was wrong with the USB drive -- I made sure everything was in the root of the drive -- but it doesn't really matter now.  Just need to get a USB keyboard hooked up to it.

Thanks for your help and patience!

Re: Web Browser

Javascript keyboard:
http://www.greywyvern.com/code/javascript/keyboard

Re: Web Browser

I know this can be at least linked to an input field and button to redirect, what would be interesting would be if it would work more like an onscreen keyboard if properly massaged...

Re: Web Browser

Ken,

Awesome job! I downloaded the USB image and tried it on my Infocast. Works like a charm. I was surprised how fast it runs. Glad I had a spare USB keyboard and an old Palm Pilot stylus around. Is there a way a non-coder could save their own bookmarks?

Thanks!

Tar, feathers, congress. Some assembly required.

22

Re: Web Browser

I just took a quick look at this - it appears that bookmarks are indeed saved to /mnt/usb/root/.qws/share/data/Qt/demobrowser/bookmarks.xbel but they aren't loaded by the browser when it's restarted.

Re: Web Browser

Ken wrote:

I just took a quick look at this - it appears that bookmarks are indeed saved to /mnt/usb/root/.qws/share/data/Qt/demobrowser/bookmarks.xbel but they aren't loaded by the browser when it's restarted.


Thanks for the answer. I was hoping for something simple as editing the bookmarks file.

Tar, feathers, congress. Some assembly required.

24 (edited by xantus 2010-10-12 07:16:28)

Re: Web Browser

Why doesn't this build have video tag support?

Re: Web Browser

Unfortunately, there's currently no such thing as "HTML5 video", there's just a video tag defined.

The HTML 5 standard, which is still at least two years from ratification, does not currently specify any standard video codecs, so there's no way to be compliant, despite the marketing claims of various companies.  The most common video codec used, H.264, is patent encumbered and requires a license, and a compatible plugin would have to be created.  Some folks are advocating the use of unencumbered codecs, but several of the larger commercial interests are very resistant.

In any case, the browser is based on WebKit and is part of the Qt distribution, so your question is best addressed to the Qt folks.