Re: Web Browser

Note sure if the issue I am having is exactly mentioned here but when booting off of the usb (silvermoon) I get the browser that fills the upper left corner of my infocast, probably slightly less then half the screen. But my touch does not work correctly. Sounds like the calibration screen is suppose to launch? It does not. The vertical is backwards and mouse tracks about 4" away from the actual touch. I am not a linux person so I am really lost on what if anything I can try. Any help would be appreciated.... THANKS

Re: Web Browser

johnnybwis wrote:

The vertical is backwards and mouse tracks about 4" away from the actual touch.

That's exactly the same problem I'm experiencing.  I have tried a couple different versions of the executable referenced earlier in this thread but all have the same result regardless of whether touchscreen calibration runs or not.  Hopefully one of the experts will steer us in the right direction soon.

Scott

128 (edited by clay_shooter 2011-01-05 18:38:17)

Re: Web Browser

I got this working in /mnt/storage/ , in my case /mnt/storage/browser.  I renamed debugchumby to startbrowser.sh and changed the contents.  I had to set a couple extra variables and I moved all of the etc type directories into the /mnt/storage/browser directory so the root of /mnt/storage wouldn't get clogged up.

The chumby web site doesn't display correctly, all shifted off to the right, but other sites like yahoo look fine.

#!/bin/sh

CHUMBY_BROWSER_ROOT=/mnt/storage/browser
export LD_LIBRARY_PATH=$CHUMBY_BROWSER_ROOT/lib:$LD_LIBRARY_PATH
export QT_QWS_FONTDIR=$CHUMBY_BROWSER_ROOT/lib/fonts

stop_control_panel
rmmod silvermoon_tsb
insmod $CHUMBY_BROWSER_ROOT/silvermoon-tsb.ko scaled_touchscreen=1
switch_fb.sh 0

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

mkdir -p $CHUMBY_BROWSER_ROOT/root
mount -t loop -o bind $CHUMBY_BROWSER_ROOT/root /root

export TSLIB_CONFFILE=$CHUMBY_BROWSER_ROOT/etc/ts.conf
export TSLIB_CALIBFILE=/etc/pointercal
export TSLIB_TSDEVICE=/dev/input/by-id/soc-noserial-event-ts
export TSLIB_PLUGINDIR=$CHUMBY_BROWSER_ROOT/lib/ts
export QWS_MOUSE_PROTO=Tslib

if [ ! -e /etc/pointercal ]; then
    $CHUMBY_BROWSER_ROOT/bin/ts_calibrate
    sync
fi

while [ 1 ] ; do
#  regular browser
#  $CHUMBY_BROWSER_ROOT/demos/browser/browser -qws 'www.chumby.com'
#  fulscreen browser
#  $CHUMBY_BROWSER_ROOT/demos/browser/browser_qt-4.6.3-fullscreen -qws 'http://www.yahoo.com'
#  no URL browser
  $CHUMBY_BROWSER_ROOT/demos/browser/wv -qws 'http://www.yahoo.com'
done

129 (edited by clay_shooter 2011-01-05 08:19:02)

Re: Web Browser

So how could someone set it up to terminate the browser and restart the control panel?  Would it be possible to write a program that senses the button on top of the 3.5 devices or maybe shaking via the accelerometer?  I don't know that the 8" has any type of physical button or shake sensor.  Maybe some kind of multi-finger gesture on the touch pad?

Re: Web Browser

First, my thanks to those who have adapted a web browser for Chumby-enabled devices like my BB8; I know it's just a demo now and look forward to what more may come in 2011.  [I'm a huge fan of modest-power computing, and am composing this message on my OLPC XO-1 laptop.]

Knowing such capabilities as this browser are in development, together with some great sale prices, brought me into the Chumby fold over the recent holidays; I had the browser up and running within an hour of first powering it up.

My next observations and questions are written in gratitude for what's been done, and knowledge I'm trying out a beta.  All the same, I am curious:

1.  Flash, plainly, isn't enabled at present.  Is this something to hope for down the line, or is there some fundamental impediment to adding flash support?  Or is this perhaps a licensing matter in that Flash is not open source?

2.  I'm finding that the return key on USB keyboards (I've tried two) doesn't register in the browser, so for instance if I'm composing a Gmail message I can't start a second paragraph.  Is this an anomaly on my device or the state of the beta, and if it's the beta, is this on the list of issues to remedy in the future?

3.  I gather from reviewing this thread that some people use a USB mouse as well as a keyboard.  After booting into the web browser, I;ve tried swapping out the flash drive for a couple of USB mice, but in neither case did the browser respond  to mouse movements or clicks.  Are there instructions on how to enable mouse support?

Again, amazing work.  Thanks and keep it coming!!!

Re: Web Browser

Anybody can help building qt?  I am getting errors when running configure about failed testing tslib but I am pretty sure I included the proper paths for the headers and libs.

132 (edited by datamon 2011-01-08 11:19:48)

Re: Web Browser

It works fine for me using the pre-built bootable USB, but i can't connect to my network.

This is a problem I am having with my Infocast 8" running the regular software too.  When I create a new connection, all works fine.  When I reboot, using the "existing connection" never works.  I always have to create a new connection.

UPDATE:
Did some experimenting and found that it loses the network on reboot when using WEP security. Switched to WAP-Personal and it works fine (as does no Security).

Re: Web Browser

guyofsound wrote:
johnnybwis wrote:

The vertical is backwards and mouse tracks about 4" away from the actual touch.

That's exactly the same problem I'm experiencing.  I have tried a couple different versions of the executable referenced earlier in this thread but all have the same result regardless of whether touchscreen calibration runs or not.  Hopefully one of the experts will steer us in the right direction soon.

Scott

No one seems to have any thoughts on this. I was hoping to use this to run my home automation software via web browser. I'll see if I can return my Infocast.

Re: Web Browser

No one seems to have any thoughts on this. I was hoping to use this to run my home automation software via web browser. I'll see if I can return my Infocast.

I haven't installed on a thumb drive as /mnt/usb but I have been able to install in /mnt/storage/browser on two 8" and one 3.5" Infocast devices.  None of them displayed the touch screen issues you talked about.

I'm running SW:1.0.5 cp: 3.121 FW: 1.0.3548  on the silvermoon/8".  Are you on the latest version?

Re: Web Browser

clay_shooter wrote:

No one seems to have any thoughts on this. I was hoping to use this to run my home automation software via web browser. I'll see if I can return my Infocast.

I haven't installed on a thumb drive as /mnt/usb but I have been able to install in /mnt/storage/browser on two 8" and one 3.5" Infocast devices.  None of them displayed the touch screen issues you talked about.

I'm running SW:1.0.5 cp: 3.121 FW: 1.0.3548  on the silvermoon/8".  Are you on the latest version?

Thanks

Yes, my version numbers match what you have. Not sure on the silvermoon/8"? Is that just the 8" Infocast? I would like to try mounting it to the hard drive but am clueless when it comes to linux.

Re: Web Browser

johnnybwis wrote:

No one seems to have any thoughts on this. I was hoping to use this to run my home automation software via web browser. I'll see if I can return my Infocast.

Actually I was able to get mine to work!  I haven't had a chance to post about it yet.  I'll try to get to it tomorrow.  There are a couple of steps I had to take in order to both enable tslib and get it to talk Qt to use Tslib as its mouse inputs.

Scott

Re: Web Browser

Hello all,

I have been able to get the browser to run succesfully on my Best Buy 3.5 inch from onboard storage (no USB disc required -- in fact it probably won't work on one).  This also resolved my inverted touchscreen and scaling problems.

Here's instructions as to how I got it to cooperate.  I think I've got the script set up below so that it will go download any scripts it needs but your mileage may vary.  Here goes:

1) Download http://files.chumby.com/browser/chumby_ … er-1.0.zip to your device and unzip it to /mnt/storage/web

   - SSH into your Chumby and type the following commands

   cd /mnt/storage
   mkdir web
   cd web
   wget http://files.chumby.com/browser/chumby_silvermoon_browser-1.0.zip
   unzip chumby_silvermoon_browser-1.0.zip

2) Create browser.sh
   

vi browser.sh

   - Press 'i' to enter insert mode
   - Copy the code from this post below
   - in your terminal / vi paste the code with CTRL+v, CTRL+SHIFT+v or whatever is appropriate for your OS
   - Press ESC to exit insert mode
   - type :wq to write changes and quit vi

3) Make browser.sh executable
   

chmod +x browser.sh

4) Run browser.sh
   

./browser.sh

Once you've done this then you can launch the browser in the future by SSH into your chumby and typing

cd /mnt/storage/web
./browser.sh

Other notes:
You can change the "homepage" by editing browser.sh, changing http://www.chumby.com with your preferred homepage

If you prefer a chrome-less browsing experience then you'll need to download wv_falconwing by doing

wget http://files.chumby.com/browser/wv_falconwing

and uncommenting line 63 (remove the # sign) and commenting line 60 (add a # sign)


Scott

browser.sh

    #!/bin/sh

    # Stop the control panel
    stop_control_panel
    
    # Select framebuffer 0
    switch_fb.sh 0
    
    # Download the script if neccesary, then select the LCD as output
    if [ ! -e /mnt/storage/web/switch_output ]; then
        wget http://files.chumby.com/hacks/switch_output
    fi
    /mnt/storage/web/switch_output -l

    # Disable the stock touchscreen driver
    rmmod stmp3xxx_ts
    
    # Activate the scaled touchscreen driver
    modprobe stmp3xxx_ts scaled_touchscreen=1

    # Append the library path environment variable where we've installed everything
    export LD_LIBRARY_PATH=/mnt/storage/web/lib:$LD_LIBRARY_PATH
    
    # If /mnt/storage/browser_etc doesn't exist, create it by copying /etc
    if [ ! -e /mnt/storage/browser_etc ]; then
        cp -rP /etc /mnt/storage/browser_etc
    fi
    
    # One of the files expects to find fonts on the USB stick and I couldn't find an environment variable to specify a new location.
    # This creates a directory where it expects and copies the files there.    
    if [ ! -e /mnt/usb/lib/fonts ]; then
        mkdir /mnt/usb
        mkdir /mnt/usb/lib
        mkdir /mnt/usb/lib/fonts
        cp -r /mnt/storage/web/lib/fonts/* /mnt/usb/lib/fonts
    fi
    
    # Make /mnt/storage/browser_etc look like /etc
    mount -t loop -o bind /mnt/storage/browser_etc /etc

    # Create /mnt/storage/web/root and make it look like /root
    mkdir -p /mnt/storage/web/root
    mount -t loop -o bind /mnt/storage/web/root /root

    # Set environment variables so TSLIB and QT can find things and play nicely together
    export TSLIB_CONFFILE=/mnt/storage/web/etc/ts.conf                # Where the touchscreen configuration file is
    export TSLIB_CALIBFILE=/etc/pointercal                    # Where the calibration file is
    export POINTERCAL_FILE=/etc/pointercal                    # Where the calibration file is
    export TSLIB_TSDEVICE=/dev/input/by-id/soc-noserial-event-ts        # Where TSLIB should look for the touchscreen device
    export TSLIB_PLUGINDIR=/mnt/storage/web/lib/ts                # Where TSLIB can find touchscreen plugins
    export QWS_MOUSE_PROTO=Tslib:$TSLIB_TSDEVICE                # Make QT use TSLIB as the pointer device

    # If there is no calibration file, run ts_calibrate
    if [ ! -e /etc/pointercal ]; then
        /mnt/storage/web/bin/ts_calibrate
        sync
    fi

    # Launch a browser (with chrome) starting at the address specified inside quotes
    /mnt/storage/web/demos/browser/browser -qws 'http://www.chumby.com'
    
    # Comment out the above line and uncomment the line below to use a webview instead of a browser (AKA full-screen browsing of the specified address)
#    /mnt/storage/web/demos/browser/wv_falconwing -qws 'http://www.chumby.com' 

    # Uncomment the last 3 lines to automatically relaunch the browser on a crash or accidental exit.
#    while [ 1 ] ; do
#      /mnt/storage/web/demos/browser/browser -qws 'www.chumby.com'
#    done

138 (edited by johnnybwis 2011-01-09 10:20:16)

Re: Web Browser

guyofsound,

I seem to get hung up on the paste part of your instructions. I am using windows so I should enter "i" and the ctr+v? I don't see anything going in and my end result is "./browser.sh: line 1: : not found" Any thoughts on what I am doing wrong? Sorry for the trouble but this is my first attempt at anything linux.

Edit.....
I think by right clicking the paste gets done, but I may have hosed the contents of that web directory as it shut down my chumby with error statements.

I'll try you instructions over from the start, otherwise how would I delete the web directory

Re: Web Browser

johnnybwis,

You're also on an 8 inch, I don't have any hardware to test on for that.  I thought you were using a 3.5"  Sorry, I'm not sure how much help I'm going to be able to be...

Scott

Re: Web Browser

us035976 wrote:
MattDog wrote:

nope i just ovewrote one of the scripts to launch it fb_cgi.sh launches it for me!
i don't use it so i figured what the hell!

Could you detail how to do this?

Thanks!!


BUMP

Re: Web Browser

us035976 wrote:
us035976 wrote:
MattDog wrote:

nope i just ovewrote one of the scripts to launch it fb_cgi.sh launches it for me!
i don't use it so i figured what the hell!

Could you detail how to do this?

Thanks!!


BUMP


Figured out what MattDog was doing. Under the hidden menu (in control panel, press "Insignia in the upper left" and then "pi" in the upper right), there is a FBCGI button. It calls the script /usr/chumby/scripts/fb_cgi.sh. Simply replace the contents of this script with that of startbrowser.sh (aka copy startbrowser.sh to this directory and rename it fb_cgi.sh). You will now have a way to start the browser within the control panel.

Anyone working on a method to monitor the snooze button to allow it to kill the QT/Webkit browser and restart the control panel?

John

Re: Web Browser

I think monitoring the snooze button would have to be done in the QT / C++ program.  The wiki notes that the snooze button looks like a keyboard to applications so the browser software itself would have to monitor for whatever keystroke(s) the snooze button produces.  It might actually be easier to attempt to capture the volume control (which registers as a joystick according to the wiki) and use that to terminate the browser process.

I shall see what I can discover on this.

143 (edited by guyofsound 2011-01-13 01:58:49)

Re: Web Browser

Success!  I have been able to modify browser.sh so that turning the encoder (volume control) "a few" clicks will exit the browser and restart the control panel.  Here's how I did it in 3 easy steps:

Step 1

Create a file called browserkill.sh in the same directory as your startbrowser or debugchumby script

#! /bin/ash

hexdump /dev/input/event2 -n 64 >/dev/null
kill $1

All this little script does is open the encoder device, wait for 64 bytes of data, and return.  Redirecting the output to /dev/null throws out anything that hexdump decides to print (what its actually designed for).  Once hexdump returns the script executes the kill command with the 1st command line argument.  Now we have to modify browser.sh

Step 2

Modify browser.sh (or debugchumby or whatever your start browser script is) in the following manner:
locate the line near the bottom of the script that actually launches the browser

    # Launch a browser (with chrome) starting at the address specified...
    /mnt/storage/web/demos/browser/browser -qws 'http://www.chumby.com'

Directly above the line noted above add a new line with ./browserkill.sh $$ &
Next, add "exec " to the front of the browser launching line

    # Launch a browser (with chrome) starting at the address specified...
    ./browserkill.sh $$ &                                                       
    exec /mnt/storage/web/demos/browser/browser -qws 'http://www.chumby.com'

So here what we're doing is calling our browserkill script created in step 1, passing it the system variable $$ (which expands to the PID of the current process), and telling it to run in the background (the & sign at the end).  Adding exec to the front of the browser line makes the browser replace the current process (the one that we gave to the browserkill script).

So at this point we have browserkill.sh running in the background (just waiting for input -- the encoder wheel), and the browser running normally.  When you turn the encoder "a few" clicks the browserkill script will execute the kill command and the browser will shut down.  So what to do next?  ON TO STEP 3

STEP 3

Last modification.  Wherever you call your browser.sh script (or whatever you called it), add ;start_control_panel or ;reboot to the end.  So if your script is called browser.sh it will look like

browser.sh;start_control_panel

The semicolon just says "this is a new command" so its the same as typing it on two lines at the console.  As soon as browser.sh exits (killed by our browserkill.sh process) the 2nd command will run.  start_control_panel will be faster, but reboot will make sure that any memory leaks are cleaned up (since the unit is rebooting).

Hope this helps!
Scott

Re: Web Browser

Ken,
Any news or timeline for news?

Ken wrote:
Shi wrote:

Can any expert can put the things into the device rather then in USB so that the machine can run web browser as an appl?

In its current implementation, the web browser hack and the control panel are mutually exclusive.  As I've mentioned before, we're working on some interesting things with the web browser, so stay tuned...

145

Re: Web Browser

FULL SCREEN MODE

I did the USB toggle download and am able to run the web browser.  I see from a post above it is possible to start the browser in full screen..

        Additionally, if you would like to remove the window chrome (min/max/close buttons and   bar), you can do so by calling browser->showFullScreen() in the same function:
BrowserMainWindow *BrowserApplication::newMainWindow()
{
    BrowserMainWindow *browser = new BrowserMainWindow();
    m_mainWindows.prepend(browser);
    browser->resize( 800, 600 );
    browser->showFullScreen();
    browser->show();
    return browser;
}


How do I do this?  Is there a file on the USB that needs to be modified/replaced? 

Any help is greatly appreciated.

THANKS

Re: Web Browser

I've been running the web browser quite successfully, but am seeing an issue where occassionally on powerup the contents of the USB drive get corrupted. It's been suggested to me that this is a weakness of the FAT format.

Will debugchumby work with other format types? I've trying using ext2 and ext3 but no joy so far.

Thanks.

147

Re: Web Browser

Hmmm, the USB drive should not get corrupted.  Can you try another USB drive and confirm that behavior?

Re: Web Browser

I'm afraid it happens with sufficient regularilty (and with multiple drives) to be annoying. They detailed symptoms:

1) debugchumby does not appear to execute
2) if the drive is plugged into a windows system the files are perfectly readable, but it will show errors on a filesystem  check
3) the errors can be 'repaired' with a windows filesystem repair operation
4) after windows repair it works fine on the infocast again

Re: Web Browser

one other symptom - file system becomes read-only on infocast

Re: Web Browser

Ken & Duane - you guys ROCK!  After picking up a number of 8" models on clearance pricing, I managed to use Ken's "wv" application to turn one of my units into an 8" touch screen player for my SqueezeCenter system.  It's like an 8" Squeezebox Touch (which is only 4.3" but still $250!).  All I had to do for others that may be interested...

Follow Ken's instructions on page 3 of this topic to get his "wv" application running.

While modifying the startup script per his instructions, changed the "http://www.chumby.com" to my server's SqueezeCenter address of "http://192.168.1.20:9000".

Right before the do/while loop that calls "wv", I inserted the following two lines to start btplayd and then use btplay to connect to my squeezecenter server's stream.mp3...

btplayd
btplay http://192.168.1.20:9000/stream.mp3


Obviously if you're trying this at home, just replace "192.168.1.20" with the IP of your squeezecenter server.

I'm working on playing with the different web interface skins at the moment.  The default works, but a lot of the buttons are very small making for an annoying interface on the Infocast.  The "touch" skin isn't bad, but sadly it seems that this server-side setting is global - I can't set different IP's to receive a different skin (since I would like my laptop to get the default and the Infocast to get the touch).

Thanks again guys - looking forward to what the future holds for this marvelous little device!