User Tools

Site Tools


wiki:wirmaroadhd

This is an old revision of the document!


Wirma Road HD

Brief Description

Wirma Road HD

La Wirma Road HD est vraiment superbe.

Ce serait bien d'ajouter à ce paragraphe une brève description ainsi qu'un ou deux cas d'utilisation.


Technical Documents

[n/a: No match]

Hardware Description

Front Panel

Back Panel

Features Capabilities

Audio

Audio Path

wirmaaudio

We have developed wirmaaudio script in order to help you to use the audio functionalities of the Wirma Road-HD.

If you need more information about the usage of audio in the Wirma Road-HD, you can open and read the script /usr/local/bin/wirmaaudio.

[root@WirmaV3_05FFFF /root]# wirmaaudio [command] [argument]

command list :

  • output : to select an output audio path
  • input : to choose an input audio path
  • volume : to set the output volume
  • mic_in : to choose with which microphone you will record or measure ambient noise

argument list :

  • for output command, you must choose between right, left, both, mute or lineout :
    • both : the sound will be played in left and right channel of the amplifier.
    • left : the sound will be played in left channel of the amplifier.
    • right : the sound will be played in right channel of the amplifier.
    • lineout : the sound will be played in the lineout output.
    • mute : no sound will be played.
  • for input command, you must choose between codec and aux :
    • codec : play sounds from OS.
    • aux : play sounds from AuxIN.
  • for volume command, the argument must be an integer between 0 and 100 or auto if you choose to adjust automatically your volume.
  • fo mic_in command, the argument must be mic or hp.
Notes
  • When you play a sound from AuxIN, it always play on LineOUT.
  • It is not possible to change the volume of the sounds coming from AuxIN.
  • When you record a sound with HP, it is the left HP.
  • When you want to adjust automatically the volume, you must :
    1. select input mic,
    2. adjust volume before each play,
    3. play your track.

Video

X server

 

Output

The output resolution is 1280×768 24-bit color. The connector is a DVI-I in order to use analog or digital signals.

Playzilla

Launch Playzilla
To run playzilla, RTC and system date must be set.

Recommanded by Innes :

[root@WirmaV3_05000007 /root]# cd /usr/root
[root@WirmaV3_05000007 root]# HOME=/root DISPLAY=:0.0 /usr/bin/playzilla/playzilla

The composition must be copied (for instance by FTP) in the /usr/playzilla/playout directory.

Currently, Innes recommends to monitor playzilla and X11 server with a watchdog. If a problem occurs, it is highly recommended to reboot the board.
Test pattern

In order to calibrate your display, you can use a test picture. To display it you must set to true the innes.player.mire flag in this file :

/usr/playzilla/profile/prefs.js

# Mozilla User Preferences

/* Do not edit this file.
 *
 * If you make changes to this file while the application is running,
 * the changes will be overwritten when the application exits.
 *
 * To make a manual change to preferences, you can visit the URL about:config
 * For more information, see http://www.mozilla.org/unix/customizing.html#prefs
 */

user_pref("extensions.blocklist.pingCountVersion", 0);
user_pref("extensions.databaseSchema", 5);
user_pref("extensions.lastAppVersion", "3.10.10");
user_pref("extensions.lastPlatformVersion", "7.0");
user_pref("innes.player.mire", false);

license key

Your license key is in file :

/usr/playzilla/profile/preferences/license-key.js

pref("innes.appli.license-key", "ABCDE-1234-FGHI-5678-JKLMN");

CAN

 

I/O

IO connector description

connector description

PIN affectation on the IO connector

PinSoftware affectation
6 digital/counter = 0
5 digital/counter = 1
7 digital/counter = 2
18 digital/counter = 3
8 digital/counter = 4
19 digital/counter = 5
9 digital/counter = 6
20 digital/counter = 7

This software description is done in /knet/knetd.xml configuration file in the component part corresponding to pca9555 product:

<COMPONENT type="i2c" address="0x41" int="/dev/gpi_09" product="pca9555">
  <IO digital="0" subid="0" />
  <IO digital="1" subid="1" />
  <IO digital="2" subid="2" />
  <IO digital="3" subid="3" />
  <IO digital="4" subid="4" />
  <IO digital="5" subid="5" />
  <IO digital="6" subid="6" />
  <IO digital="7" subid="7" />
</COMPONENT>

IO modes

  • digital mode : to be able to manage a PIN in IO mode (read/set high, set low), the type of the PIN in the configuration file must be “digital” (see previous example).
  • counter mode : to enable a pin in counter mode, modify the /knet/knetd.xml file to set the type of the PIN to “counter” and restart the board. Example, to set the PIN 8 (SW id 4) in counter mode, modify the configuration file as follow :

<COMPONENT type="i2c" address="0x41" int="/dev/gpi_09" product="pca9555">
  <IO digital="0" subid="0" />
  <IO digital="1" subid="1" />
  <IO digital="2" subid="2" />
  <IO digital="3" subid="3" />
  <IO counter="4" subid="4" />
  <IO digital="5" subid="5" />
  <IO digital="6" subid="6" />
  <IO digital="7" subid="7" />
</COMPONENT>

RTC

 

Serial

software ports match

Front panel name Software affectation
UART1 /dev/ttyRoad0
UART2 /dev/ttyRoad1
UART3 /dev/ttyRoad2
UART4 /dev/ttyRoad3

speed and flow control

Serial speed can be set up to 460.8kbits/s.
Flow control (CTS/RTS) signals are available in RS232.

configuration

Serial ports can be configured to work as RS232 or RS485. The pocedure to change configuration is :

  • modify /etc/ftdiroad.cfg with the requested settings.
    For example, to enable RS485 mode on UART1, the file content should be as this:

/etc/ftdiroad.cfg

# 
# USB FTDI devices configuration
# This configuration is sourced by ftdiroad script
# 
# Format:
# UARTX={device_name},{serial_type}
# 
# ex: UART1=ttyRoad0,485
#

UART1=ttyRoad0,485
UART2=ttyRoad1,232
UART3=ttyRoad2,232
UART4=ttyRoad3,232

  • execute following command to load configuration in the component :

[root@WirmaV3_05000007 /root]# ftdiroad start

  • reboot system to apply new configuration.

serial write operation

After a write operation, it is advised to perform a tcdrain operation to wait for the end of transmission.

ADC

ADC affectation on the IO connector

Pin Software affectation
6 adc = 0
5 adc = 1
7 adc = 2
18 adc = 3
8 adc = 4
19 adc = 5
9 adc = 6
20 adc = 7

This software description is done in /knet/knetd.xml configuration file in the component part corrresponding to ad7998 product :

<COMPONENT type="i2c" address="0x21" product="ad7998">
  <IO adc="0" subid="0" />
  <IO adc="1" subid="1" />
  <IO adc="2" subid="2" />
  <IO adc="3" subid="3" />
  <IO adc="4" subid="4" />
  <IO adc="5" subid="5" />
  <IO adc="6" subid="6" />
  <IO adc="7" subid="7" />
</COMPONENT>

Note that ADC7 is internally reserved.

internal ADC

Some internal ADCs are available to get boards statistic. The description is done in /knet/knetd.xml configuration file in the cpu part :

<COMPONENT type="cpu" >
  <IO apc="0" address="/dev/gpio_23" />
  <IO adc="12" address="in2_input"   /> <!-- gyro             -->
  <IO adc="13" address="in3_input"   /> <!-- adc_3v3          -->
  <IO adc="14" address="in4_input"   /> <!-- adc_3v3_video    -->
  <IO adc="15" address="in5_input"   /> <!-- adc_5v           -->
  <IO adc="16" address="in6_input"   /> <!-- adc_backup_power -->
  <IO adc="17" address="in7_input"   /> <!-- adc_main_power   -->
  <IO adc="18" address="temp1_input" /> <!-- module_temp      -->
</COMPONENT>

Read values are in mV, you need formulas to convert it in real measure :

Road name default KMS number Conversion formula
gyro 12 value * 2
adc_3v3 13 value * 2
adc_3v3_video 14 value * 2
adc_5v 15 value * 2
adc_backup_power 16 value * 16
adc_main_power 17 value * 16
module_temp 18 value

Network

 

Power Management

 

Dead Reckoning

The device doesn't provide any Dead Reckoning algorithm.
Anyway user can implement this feature using a specific XML command to get synchronized data which can be used to feed a Dead Reckoning algorithm. These data are :

  • GPS position (acquisition period is 1 second)
  • odometer value (acquisition period is 1 second)
  • Accelerometer on the 3 axis (acquisition period is 200ms)
  • Gyroscope information (acquisition period is 200ms)

Configuration

The only configuration to be done is to define the odometer input where the vehicule odometer is connected.
Modify the /knet/knetd.xml file to set the corresponding input to “counter” mode as descibed here : PIN affectation on the IO connector.

API

To request the periodic synchronized data, send the following command the M2M agent (in this example, odometer is connected to input 2) :

<positionext odo="2" gyro="7" name="pos"/>

Then, one frame is send per second to the application with the following format:

<positionext date="2009-12-04 16:49:16" fix="1" lat="4812536" long="-162898" alt="66" course="0" speed="0" nsat="6" hdop="1">
<sensor id="1" acc_x="113" acc_y="121" acc_z="191" gyro="2041" odo="242"/>
<sensor id="2" acc_x="112" acc_y="119" acc_z="190" gyro="2040" odo="245"/>
<sensor id="3" acc_x="112" acc_y="120" acc_z="190" gyro="2040" odo="250"/>
<sensor id="4" acc_x="112" acc_y="119" acc_z="190" gyro="2040" odo="253"/>
<sensor id="5" acc_x="111" acc_y="120" acc_z="191" gyro="2040" odo="260"/>
</positionext>
5 sensor acquisitions (every 200ms) are gathered with on GPS acquisition, so, for this frame, time stamping are :
sensor id="1" => 2009-12-04 16:49:15 and 200 milliseconds
sensor id="2" => 2009-12-04 16:49:15 and 400 milliseconds
sensor id="3" => 2009-12-04 16:49:15 and 600 milliseconds
sensor id="4" => 2009-12-04 16:49:15 and 800 milliseconds
sensor id="5" => 2009-12-04 16:49:16
gps position  => 2009-12-04 16:49:16

Debug Tools

 

Examples

How to connect Wirma Road-HD with other Wirma product family

with a Wirma HUB

connect HUB to RoadHD

with a Wirma MMI

MMI Example

Use case

The Wirma MMI displays information read throught KMS link of the Wirma Road. However this application is also connected to the local agent in Wirma MMI. It is necessary in order to drive the power management.

The application in Wirma MMI must know the IP address of the remote agent.

Global architecture

description of the installation

This schematic is the more complete example. However it could also work with a Wirma RS to the place of Wirma Road (in this case you don't have access to the network because Wirma RS has not an ethernet switch) ; we could also replace Wirma MMI extension by a Wirma MMI (for information : MMIextension = MMI + antennas + audio).
We use VLAN to find easily the remote agent. With this interface we are “normally” alone (Wirma MMI + Wirma Road) on this network.

Software architecture

software architecture

  • KMS link.
  • knetd monitors application.
Description of the graphical application

This GTK application provides MMI to the user. It is connected to knetd on Wirma Road and on Wirma MMI.

Its features are :

  • display GPS position ;
  • manage GSM call accept/release of Wirma Road/RS ;
  • increase/decrease the backlight of the LCD ;
  • drive power management of Wirma MMI.

It is the local agent that manage/monitor the graphical application (start, stop, application ping, …). Thus on the Wirma MMI we can find the directory /mnt/fsuser-1/test-graphical/ where we have the binary of the application and the manifest.xml file.

Power management

Power ON

WIRMA ROAD is firstly powered by main power supply, during the boot, it raised power supply signal to the MMI device which starts booting.

Standby

When a request of standby mode is transmitted to the agent of the Wirma Road, it send this information to all connected applications (including our graphical application). The graphical application read this message and also request to the local MMI agent to enter standby mode.

Wakeup

When APC is rising, the ROAD is automatically waked up from standby mode and the MMI is then woken up by a control pin.

Power OFF

The agent of the Wirma Road (or RS) monitor the APC signal. When this signal is falling down, before shutting down it broadcast this information to all connected applications. The graphical application catch this message and also request to the local MMI agent to power-off.

Source code & Documentation

Source package : test-graphical-sources.tar.gz. FTP access login is “wirmav2” and password is “rennes35”.

Doxygen documentation of the source code is here.

Wirma HUB configuration example

The Wirma Hub is a simple solution to extend interface capabilities of any product of WIRMA family.

There are 2 main ways to use it, depending on wanted interfaces.

Nominal use

The Hub is controlled by a Wirma product through USB cable (male A-Type, male B-Type).
It is powered (11-36V) by the 22-pins µFit cable.
In this mode, all interfaces are enabled.

Degraded use

The Hub is controlled and powered by a Wirma product through USB cable. In this mode,

  • serial ports can be used (RS-232/485)
  • IO can be used as inputs or ADCs but can not be controlled as output
  • USB host ports are disabled
  • A Wirma MMI can not be powered through 6-pins µFit connector

software ports match for ROAD

Front panel nameSoftware affectation
UART1 /dev/ttyHub0
UART2 /dev/ttyHub1
UART3 /dev/ttyHub2
UART4 /dev/ttyHub3

Configuration

System

Serial ports can be configured to work as RS232 or RS485. The procedure to change configuration is :

  • modify /etc/ftdihub.cfg with the requested settings.
    For example, to enable RS485 mode on UART1, the file content should be as this:

    /etc/ftdihub.cfg

    # 
    # USB FTDI devices configuration
    # This configuration is sourced by ftdihub script
    # 
    # Format:
    # UARTX={device_name},{serial_type}
    # 
    # ex: UART1=ttyHub0,485
    #
    
    UART1=ttyHub0,485
    UART2=ttyHub1,232
    UART3=ttyHub2,232
    UART4=ttyHub3,232
  • execute following command to load configuration in the component :
    [root@WirmaV3_05000007 /root]# ftdihub start
  • reboot system to apply new configuration.
M2M Agent

IO and ADC declaration need to be done in M2M agent configuration file. Two declaration blocks need to be added for ADC and digital I/O components.

  • add the blocks in /knet/knetd.xml
    <COMPONENT type="i2c" address="0x21" bus="3" product="ad7998">
      <IO adc="20" subid="0" />
      <IO adc="21" subid="1" />
      <IO adc="22" subid="2" />
      <IO adc="23" subid="3" />
      <IO adc="24" subid="4" />
      <IO adc="25" subid="5" />
      <IO adc="26" subid="6" />
      <IO adc="27" subid="7" />
    </COMPONENT>
     
    <COMPONENT type="i2c" address="0x41" bus="3" product="pca9555">
      <IO digital="20" subid="0" />
      <IO digital="21" subid="1" />
      <IO digital="22" subid="2" />
      <IO digital="23" subid="3" />
      <IO digital="24" subid="4" />
      <IO digital="25" subid="5" />
      <IO digital="26" subid="6" />
      <IO digital="27" subid="7" />
    </COMPONENT>
  • restart system to apply update :
    [root@WirmaV3_05000007 /root]# reboot
M2M inputtrig service is not available on wirma HUB

Known Issues

wiki/wirmaroadhd.1339579755.txt.gz · Last modified: 2017/07/21 13:53 (external edit)