Content

Page tree



Here are the most common tools for troubleshooting Minibrowser applications on Snom Deskphones:



The minibrowser.htm page

The Snom Deskphones that support the Minibrowser feature also provide a troubleshooting page called minibrowser.htm. To access this page:

  1. Login as admin to the phone's web interface
  2. Change the address in the browser to point to https://IP_or_host/minibrowser.htm. Example: https://192.168.137.132/minibrowser.htm
  3. If no Minibrowser pages are open, this page will show:
    No active minibrowser instance.
  4. Otherwise, you will see some links pointing to the troubleshooting pages:

To illustrate the minibrowser.htm pages, we will use a simple Minibrowser example containing a Repeat tag, If/Else tags, a variable and the set callback. The example checks if the variable "testvar" was set, in which case it generates two MenuItems via Repeat.

<?xml version="1.0" encoding="UTF-8"?>
<SnomIPPhoneMenu>
	<If condition="$(is_set:$(var:testvar))">
		<Repeat token="/__NAME__/__URL__/" values="|foo|http://foo.com|bar|http://bar.com|">
        		<MenuItem name="__NAME__ - $(set:user_realname2)">
            			<Url>__URL__</Url>
        		</MenuItem>
    		</Repeat>
	</If>
	<Else>
		<MenuItem name="Variable 'testvar' not set"></MenuItem>
	</Else>
</SnomIPPhoneMenu>

State

This page will show general information such as the number of Minibrowser instances, URL used to access the Minibrowser page, the value of the existing set variables etc.

Here is how the State page would look like for the above example on a Snom D375 with version 10.1.64.14, if we add a variable value to the link that we used to access the XML (Link used: http://10.110.16.61/xml/minibrowser/tests.xml#var:testvar=testvalue). Note at the bottom the variable value:


The current history is also displayed in the State page. If you open the Settings menu of the phone (which is in itself a Minibrowser page) and then this example Minibrowser page on top of it, you will see two Minibrowser instances. Also see the go_back fragment and the track attribute for more information related to history:

Minibrowser Statistics
######################

Number of instances: 2

Minibrowser instance #0
-----------------------
Id: Minibrowser.2021-01-21T12:49:29Z.306
...
History: 1
##Url: file://xml/gui/state_settings.xml#var:vision_pairing_token=&var:dfks=true
...

Selection list: 6
-----------------
## Preferences
data: _xpath:/*
_id_attr:id
_id:preferences
_url:file://xml/gui/preferences.xml
_track:
_id_attr:id
## Call Features
data: _xpath:/*
_id_attr:id
_id:call_features
_url:file://xml/gui/call_features.xml
_track:
_id_attr:id
...

Minibrowser instance #1
-----------------------
Id: Minibrowser.2021-01-21T12:49:30Z.197
...
History: 1
##Url: http://10.110.16.61:80/xml/minibrowser/tests.xml#var:testvar=testvalue
...

Selection list: 2
-----------------
## foo - 103
data: _xpath:/*
_url:http://foo.com
_track:
_id_attr:name
_id:foo - $(set:user_realname2)
## bar - 103
data: _xpath:/*
_url:http://bar.com
_track:
_id_attr:name
_id:bar - $(set:user_realname2)

Callbacks: 2
-------------
$.current_path
$.module_id_of_current_line

Minibrowser vars: 2
---------------------
testvar: testvalue
cur_pkey:


Xml

This page shows the initial XML code. Note that your browser might do some additional XML parsing when showing the code. To see the exact source code, many browsers allow the option to right-click the page and select "View page source".

Parsed xml

This page shows the parsed XML code. As you can see, the If tag has been handled and the Repeat tag has been replaced with the actual elements that it generated:

Rendered xml

This page displays the final rendered XML, after all the recognized callbacks (in our example $(set:user_realname2) ), variables and fragments have been replaced with their actual values:




Phone log

The phone Log (with Log Level 9 DEBUG2) can also be useful for troubleshooting. Here are some relevant log lines for our example:

...
Jan 21 13:29:17.362 [NOTICE] PHN: Sending post request http://10.110.16.61:80/xml/minibrowser/tests.xml#var:testvar=testvalue
Jan 21 13:29:17.362 [NOTICE] PHN: Fetching URL: http://10.110.16.61:80/xml/minibrowser/tests.xml#...
...
Jan 21 13:29:17.364 [DEBUG2] PHN: gui_keys: on key event (P7, 0), from_hardware 0, is_longpressed 0, State Idle (27), time 2077622
...
Jan 21 13:29:17.576 [INFO ] PHN: entering gui_object::display_on_minibrowser() state=1, force_redraw=0
...
Jan 21 13:29:17.577 [DEBUG0] PHN: MbParser:: found tree = SnomIPPhoneMenu
Jan 21 13:29:17.577 [DEBUG0] PHN: MbParserMainTag:: tree = SnomIPPhoneMenu
Jan 21 13:29:17.578 [DEBUG1] PHN: Goto State 'Minibrowser' (29) from' Idle' (27), MB 0, blocked 0 caller:MbParseCommon-2051
Jan 21 13:29:17.604 [DEBUG0] UXM: Request backlight for module -1 with value 15
Jan 21 13:29:17.605 [INFO ] PHN: Xpath applies: /*
Jan 21 13:29:17.605 [DEBUG2] PHN: Xpath matched element node SnomIPPhoneMenu
...


For example, if the phone detected a typo - see line 2 below:

<?xml version="1.0" encoding="UTF-8"?>
<TYPOIPPhoneMenu>
    <Repeat token="/__NAME__/__URL__/" values="|foo|http://foo.com|bar|http://bar.com|">
        <MenuItem name="__NAME__ - $(set:user_realname2)">
            <Url>__URL__</Url>
        </MenuItem>
    </Repeat>
</SnomIPPhoneMenu>


you would see this information in the log:

...
Jan 20 13:11:19.435 [ERROR ] PHN: xml_tree::StripLeadingClosureIfPresent() expected: </TYPOIPPhoneMenu[optional whitespace]> but closing tag was: </SnomIPPhoneMenu>
...



The state_of_gui.htm page

The Snom Deskphones provide a page called state_of_gui.htm which shows a text representation of what is rendered on the phone(display, lights, LEDs etc). To access this page:

  1. Login as admin to the phone's web interface
  2. Change the address in the browser to point to https://IP_or_host/state_of_gui.htm. Example: https://192.168.137.132/state_of_gui.htm
  3. For the above example the page would show the following:

    ##############################################################################
    | STATE                                                                      |
       Minibrowser
    ##############################################################################
    | TEXTS                                                                      |
       12 45 foo - 103
       12 90 bar - 103
       5 5 snomD375
       432 5 12:51
    ##############################################################################
    | IMAGES                                                                     |
    ##############################################################################
    | BACKLIGHT                                                                  |
       constant_on
    ##############################################################################
    | BRIGHTNESS                                                                 |
       15
    ##############################################################################
    | CONTRAST                                                                   |
       12
    ##############################################################################
    | SELECTION LIST [Label:]Name |SubText |ExtraText |ExtraText2                |
       →foo - 103 | | |
        bar - 103 | | |
    ##############################################################################
    # LEDS                                                                       #
    # led_id frequency color type(physical/virtual)
    0	Off	Red	p
    1	Off	Red	p
    2	Off	Red	p
    ...