tools/muxpi.git
5 years agoAdd HW overview to documentation 00/170000/20
Alexander Mazuruk [Mon, 12 Feb 2018 16:31:20 +0000 (17:31 +0100)]
Add HW overview to documentation

This is highly based on article about MuxPi on wiki.tizen.org written by
Adam Malinowski (MuxPi author).

hw-overview.svg was created in Inkscape and should be best edited using
the same software. https://inkscape.org/

Change-Id: Ie7a7cfc24d31e60e096956cf3ac2756f867ef636
Signed-off-by: Alexander Mazuruk <a.mazuruk@samsung.com>
5 years agoAdd Project Overview to documentation 99/169999/19
Alexander Mazuruk [Mon, 12 Feb 2018 16:09:54 +0000 (17:09 +0100)]
Add Project Overview to documentation

Highly based on article about MuxPi on wiki.tizen.org written by Adam
Malinowski (MuxPi author).

This documentation is meant to be "upstream" and the Tizen wiki article
will link to this documentation. This is why it is not linked here.

Reasons for change of documentation place:
- wiki does not provide possibility to review
- it is a good practice to keep code and documentation in one place
- it will be possible to host it on some server or use github pages
- all stack layers will have same documentation approach
- easy re-using and referencing documentation in SLAV stack

This documentation style-guide should be followed:
https://documentation-style-guide-sphinx.readthedocs.io/en/latest/style-guide.html

Change-Id: I101a09bb8013c52333f404fc6c1aac52aaab4650
Signed-off-by: Alexander Mazuruk <a.mazuruk@samsung.com>
5 years agoInitialize Sphinx documentation 97/169997/19
Alexander Mazuruk [Mon, 12 Feb 2018 12:47:15 +0000 (13:47 +0100)]
Initialize Sphinx documentation

html_static_path setting was manually commented out to silence
a warning from Sphinx.

doc/sphinx/make.bat generated by sphinx-quickstart was removed.

Verify using doc/Makefile.

Generated using docker image from previous commit:
  cd doc/
  docker run --rm=true --user `id -u $USER`:`id -g $USER` -v $PWD:/doc \
   --name=muxpi-doc-container -it -a stdin -a stdout muxpi-doc-image \
   sphinx-quickstart --quiet --sep --project="MuxPi" --no-batchfile \
   --author="Samsung Electronics Co., Ltd" -v 0.0.1 sphinx

Change-Id: I8ee45d663b4c59af4b770a0b5bae431222b1c191
Signed-off-by: Alexander Mazuruk <a.mazuruk@samsung.com>
5 years agoAdd Sphinx build environment in Docker 96/169996/19
Michal Sidor [Wed, 18 Jul 2018 14:16:40 +0000 (16:16 +0200)]
Add Sphinx build environment in Docker

Custom Docker file including:
- support for Python (required by Sphinx)
- Java (required by plantuml plugin)
- a few Sphinx plugins also required for other
  SLAV stack projects (refer to the Dockerfile)

This image does not provide `python`. Please use `python3`.

Change-Id: I10cf39a0fe0dc3cf35c9110b2680cca9a799ee0e
Signed-off-by: Michal Sidor <m.sidor@samsung.com>
5 years agoAdd basic info to README 16/189016/8
Alexander Mazuruk [Wed, 12 Sep 2018 15:08:59 +0000 (17:08 +0200)]
Add basic info to README

Change-Id: If8e7f5d0003e59ab2bb24a2b598caaa75e5b2595
Signed-off-by: Alexander Mazuruk <a.mazuruk@samsung.com>
Signed-off-by: Adam Malinowski <a.malinowsk2@partner.samsung.com>
Signed-off-by: Michal Sidor <m.sidor@samsung.com>
5 years agoUpdate hardware design to version 1.3 73/190173/4
Adam Malinowski [Thu, 27 Sep 2018 18:25:11 +0000 (20:25 +0200)]
Update hardware design to version 1.3

Change-Id: I17b3f32943a6fd048f05d1b0d8676607dc54b976

5 years agoUpdate hardware design to version 1.2 31/190131/6
Adam Malinowski [Thu, 27 Sep 2018 08:17:05 +0000 (10:17 +0200)]
Update hardware design to version 1.2

Change-Id: I36445887bfaa5fada88d8bf3915603605de47512

5 years agoAdd changelog of hardware documentation 71/190171/5
Adam Malinowski [Thu, 27 Sep 2018 15:36:35 +0000 (17:36 +0200)]
Add changelog of hardware documentation

Change-Id: Id8ba4f194bc7a868e17bf235148ba89a1a4845b3

5 years agoAdd means to control STM power-on from userland 16/189516/6
Michal Sidor [Tue, 18 Sep 2018 08:21:27 +0000 (10:21 +0200)]
Add means to control STM power-on from userland

This patch adds a shell script `muxpi-power` which can power the STM on
or off. The patch also contains a systemd service that runs `muxpi-power
on` during system boot. It is a fairly universal (while there's systemd,
there's a way) and convenient (compared to formerly used u-boot script
modification) way of powering STM on.

Change-Id: Ia96e5ef75bc70a5b25ef34633157939e7f11554a
Signed-off-by: Michal Sidor <m.sidor@samsung.com>
5 years agoMove stm socket and service files 16/190916/3
Alexander Mazuruk [Mon, 8 Oct 2018 15:55:12 +0000 (17:55 +0200)]
Move stm socket and service files

Move according to new directory structure.

Change-Id: Ie9b8a60ea482d2287b04dafcff2f5d132985650a
Signed-off-by: Alexander Mazuruk <a.mazuruk@samsung.com>
5 years agoUpdate desired directory structure in README file 65/189765/5
Adam Malinowski [Thu, 20 Sep 2018 08:28:21 +0000 (10:28 +0200)]
Update desired directory structure in README file

Change-Id: Ie96452781216d4254db9fe0d8d4fc4c478bfb148

5 years agoAdd hw/MuxPi/README to include KiCad info 68/170268/5
Alexander Mazuruk [Fri, 16 Feb 2018 12:14:32 +0000 (13:14 +0100)]
Add hw/MuxPi/README to include KiCad info

Additionally, symbolic link from README.rst to README was added for
github.com (transition planned) for correct rendering.

Change-Id: Ic26063db864f6759c53d77fe4377c82e6c2cec52
Signed-off-by: Alexander Mazuruk <a.mazuruk@samsung.com>
5 years agoAdd dummy mode to stm executable 83/168983/5
Michal Sidor [Thu, 19 Jul 2018 09:03:58 +0000 (11:03 +0200)]
Add dummy mode to stm executable

It uses Dummy implementation of InterfaceCloser originally created by
amistewicz.

New boolean flag "-dummy" is provided.

It should be used when only logging of the commands used is desired.

Change-Id: If5dc582aef3e691282ed616c992c0e96d31dc087
Signed-off-by: Michal Sidor <m.sidor@samsung.com>
5 years agoUpdate fsnotify.v1 import path 48/175248/6
Aleksander Mistewicz [Mon, 26 Mar 2018 10:34:46 +0000 (12:34 +0200)]
Update fsnotify.v1 import path

Change-Id: I9f57dca0788d0e8beb64cfca1b36b2f0a357e62b

5 years agoAdd HDMI and SetDyper to Interface 61/171561/8
Aleksander Mistewicz [Fri, 2 Mar 2018 16:40:05 +0000 (17:40 +0100)]
Add HDMI and SetDyper to Interface

Change-Id: I357fdd3d48dde5d5e6fd0c1e1dbee2a3a58e641b

5 years agoAdd CLI support for current sampling functions 40/170840/9
Aleksander Mistewicz [Wed, 21 Feb 2018 10:48:06 +0000 (11:48 +0100)]
Add CLI support for current sampling functions

Five new flags are added to the executable:
  -cur-start
     start sampling DUT current usage
  -cur-stop
     stop sampling DUT current usage
  -cur-get
     get CSV of sample recorded
  -cur-duration duration
     duration the sample should be recorded for (default 1m0s)
  -cur-size int
     sample size (default 120)

Change-Id: I775c6e13e00f86103d5e066fe0a1fa289fa725b3

5 years agoAdd current sampling functions 39/170839/9
Aleksander Mistewicz [Mon, 19 Feb 2018 11:23:55 +0000 (12:23 +0100)]
Add current sampling functions

Three methods are added to Interface to ease the sampling of energy
consumed by DUT:

    StartCurrentRecord() - starts a goroutine sampling GetCurrent() for
        given time interval and number of times.

    StopCurrentRecord() - stops a goroutine sampling GetCurrent().

    GetCurrentRecord() - returns recorded sample even if it is not
        completed.

Change-Id: Ie127f165447bc6a326d76afee52b3abed1a09a91

5 years agoAdd wrapper script for stm 68/173268/6
Aleksander Mistewicz [Mon, 12 Mar 2018 15:25:21 +0000 (16:25 +0100)]
Add wrapper script for stm

It sets "-remote" flag according to the user it is running as.

Change-Id: I7a4c4e13de99874b853a2672ea730293906340b8

5 years agoAdd support for files to FOTA 96/182396/1
Aleksander Mistewicz [Fri, 22 Jun 2018 14:41:00 +0000 (16:41 +0200)]
Add support for files to FOTA

Change-Id: Id9407a9a7bab32e563f50ceb2b39ef8b76119800
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
5 years agoAdd support for RPC connection to FOTA 85/170285/8
Aleksander Mistewicz [Fri, 16 Feb 2018 16:01:14 +0000 (17:01 +0100)]
Add support for RPC connection to FOTA

Change-Id: I81af96070dc3112f81efac36ce900590bbb071f5

5 years agoAdd systemd service for STM 87/168987/11
Aleksander Mistewicz [Tue, 9 Jan 2018 16:06:28 +0000 (17:06 +0100)]
Add systemd service for STM

This service does not need to be enabled in the system.
It will be started automatically if a connection to one
of the listening sockets is made. System group named stm
is required for stm-user.socket to work correctly.

Change-Id: I21276d43879ef18becb49bf3fa7694bcf842ee0a

5 years agoAdd systemd integration to stm executable 84/170284/8
Aleksander Mistewicz [Fri, 16 Feb 2018 16:42:45 +0000 (17:42 +0100)]
Add systemd integration to stm executable

stm binary is intended to be started in a server mode as a service.
It is possible for systemd to wait for a connection on a socket
and start a service only when such connection is established.

Change-Id: Ica5374312679f8935f2b896e142c5ea63a76728c

5 years agoAdd stm SetLED support to CLI 60/171560/6
Aleksander Mistewicz [Mon, 5 Mar 2018 17:38:42 +0000 (18:38 +0100)]
Add stm SetLED support to CLI

New flags, "-led1" and "-led2", take a string argument of 3 commma
separated values in 0-255 range (8-bit). Each value represents a basic
color, in red, green, blue order.

Example (set led1 to pink): stm -led1 128,16,32

SetLED is a part of STM interface that only priviledged users should
have access to. "-remote" flag should be set to correct path.

Change-Id: Idd1b6b39b420f8a91c0aa1cf0f05c2586efdd66b

5 years agoAdd stm PrintText and ClearDisplay support to CLI 59/171559/6
Aleksander Mistewicz [Mon, 5 Mar 2018 17:41:20 +0000 (18:41 +0100)]
Add stm PrintText and ClearDisplay support to CLI

New flag, "-print", takes a string argument.

Example (print "test"): stm -print test

PrintText is a part of STM interface that only priviledged users should
have access to. "-remote" flag should be set to correct path.

Change-Id: If471581c8a2b45055484108406ebf91844965198

5 years agoAdd RPC capabilities to stm CLI 38/170838/7
Aleksander Mistewicz [Thu, 8 Feb 2018 12:20:54 +0000 (13:20 +0100)]
Add RPC capabilities to stm CLI

The means of communications are changed while keeping the compatibility
with the previous interface. The main goal of the move is to have
a single entity responsible for communication with STM, that will be
able to serve the interface to many users at different permission levels
at the same time.

Change-Id: I1d390207899bcbda6c81cf6fc5e8b68a2d90326e
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
6 years agoAdd generated RPC interfaces 37/170237/8
Aleksander Mistewicz [Thu, 8 Feb 2018 13:10:30 +0000 (14:10 +0100)]
Add generated RPC interfaces

go-rpcgen is used. It can be installed with the following command:
    go get github.com/alecthomas/go-rpcgen

To generate Go RPC implementations call:
    go generate ./...

Proper go:generate tags were added.

Change-Id: I5c2151ce10c1f3953b79ea677ed46c3b8e808d65

6 years agoAdd GetCurrent to Interface 33/170233/7
Aleksander Mistewicz [Mon, 5 Feb 2018 17:37:15 +0000 (18:37 +0100)]
Add GetCurrent to Interface

GetCurrent method of STM interface fetches the value of the measured
current drawn by DUT. It sends "current" to STM's UART and parses
the response, which is expected to be an integer.

A new internal helper function, sendAndReceive, is added.

Change-Id: Ifb8b634b5b432685d6b69dc76ebc8f4e9f8fa189

6 years agoAdd Interface to stm package 81/168981/5
Aleksander Mistewicz [Tue, 9 Jan 2018 12:48:13 +0000 (13:48 +0100)]
Add Interface to stm package

It makes possible to replace underlying implementation. Package default
interface has been removed. GetDefaultSTM() should be used instead.

FOTA and STM were modified to work after this change.

Change-Id: I291a9d22bda7253556a4a13229b9db3400fe6ef5

6 years agoFix a type of LED2 and Background constants 82/168982/4
Aleksander Mistewicz [Thu, 1 Feb 2018 13:01:19 +0000 (14:01 +0100)]
Fix a type of LED2 and Background constants

Change-Id: Ib19c3a880b5651bff73d038d0555e487bf42dc1f

6 years agoAdd MuxPi add-on template 32/174832/2
Adam Malinowski [Wed, 4 Apr 2018 10:52:32 +0000 (12:52 +0200)]
Add MuxPi add-on template

Change-Id: I31b9178743a43b3d35f47b79372e0b549c0c1d1f

6 years agoAdd alternative product for DyPer relays 31/174831/1
Adam Malinowski [Fri, 16 Mar 2018 07:19:11 +0000 (08:19 +0100)]
Add alternative product for DyPer relays

Currently there is no way to buy relays originally choosen for
DyPers. Different product is added as a replacement which is widely
available at this moment.

Change-Id: If8e95ebd23554d36e86e7d23ec86ffcc953ed6df

6 years agoAdd detailed info to MuxPi electronic components 30/174830/1
Adam Malinowski [Tue, 13 Mar 2018 18:01:42 +0000 (19:01 +0100)]
Add detailed info to MuxPi electronic components

The additional information includes manufacturer names and
manufacturer symbols for all components except ceramic capacitors
and resistors. It allows to create BOM (Bill Of Materials) with
actual product names.

Change-Id: Id1c518bba60322d4b8b132ad14261806070abc27

6 years agoAdd hardware decumentation of MuxPi board
Adam Malinowski [Thu, 1 Feb 2018 14:39:25 +0000 (15:39 +0100)]
Add hardware decumentation of MuxPi board

The documentation was created with nightly build version of KiCad:
(2018-01-31 revision e69ddf0e1)

Change-Id: If4a1afd280c9b68589a063e161d02ec063f36596

6 years agoMove FOTA and STM sources to comply with README 71/158871/2
Aleksander Mistewicz [Fri, 3 Nov 2017 13:19:37 +0000 (14:19 +0100)]
Move FOTA and STM sources to comply with README

Change-Id: I7f3e393540d78fb768873fb7b83d54d9d5ca21dc

6 years agoAdd FOTA tools 68/142768/5
Aleksander Mistewicz [Tue, 18 Jul 2017 13:00:07 +0000 (15:00 +0200)]
Add FOTA tools

Package fota implements Flash Over The Air utilities.

Usage of fota:
  -card string
     path to SDcard
  -map string
     path to JSON formatted mapping
  -md5 string
     URL to MD5SUMS file
  -q suppress logging

Change-Id: I84f4168047f2f9488f0ed42efb1f8143410ac341

6 years agoMerge "Add STM command-line tool"
Adam Malinowski [Tue, 5 Dec 2017 10:56:43 +0000 (10:56 +0000)]
Merge "Add STM command-line tool"

6 years agoMerge "Add tests for stm GO library"
Adam Malinowski [Tue, 5 Dec 2017 09:25:12 +0000 (09:25 +0000)]
Merge "Add tests for stm GO library"

6 years agoMerge "Add convenience functions for the muxPi"
Adam Malinowski [Tue, 5 Dec 2017 09:23:38 +0000 (09:23 +0000)]
Merge "Add convenience functions for the muxPi"

6 years agoMerge "Add most functions provided by STM"
Adam Malinowski [Tue, 5 Dec 2017 09:23:26 +0000 (09:23 +0000)]
Merge "Add most functions provided by STM"

6 years agoMerge "Add stm GO library"
Adam Malinowski [Tue, 5 Dec 2017 09:23:12 +0000 (09:23 +0000)]
Merge "Add stm GO library"

6 years agoAdd directory structure description in README file 20/157020/2
Adam Malinowski [Mon, 23 Oct 2017 06:34:32 +0000 (08:34 +0200)]
Add directory structure description in README file

Change-Id: If4e6be3c5cf7e8593941aefe77eaa1a10b57e06a

6 years agoAdd STM command-line tool 67/142767/6
Aleksander Mistewicz [Fri, 4 Aug 2017 13:28:10 +0000 (15:28 +0200)]
Add STM command-line tool

Only basic functions are available as LED and OLED control
is reserved for administrator or Boruta system.

Usage of stm:
  -dut
     connect SD card to DUT
  -m duration
     time delay for tick command (default 1s)
  -tick
     power off the DUT, wait 'm' seconds and switch it on again
  -ts
     connect SD card to test server

Change-Id: I6fd035c3b07169b40e861f95b90d6bd9d4d7e732

6 years agoAdd tests for stm GO library 46/138546/6
Aleksander Mistewicz [Wed, 12 Jul 2017 12:28:46 +0000 (14:28 +0200)]
Add tests for stm GO library

Steps to reproduce:
    # Compile tests.
    GOARCH=arm GOARM=7 GOOS=linux ginkgo build ./...
    # Copy stm/stm.test to MuxPI.
    # Run on MuxPI.
    ./stm.test -ginkgo.v

Tests fail if there is no "OK" response. Person running them should also
observe OLED display, blinking LEDs and relay switching (it is audible).

Change-Id: I86992a1356382645d156053c15d14d9a57603b71

6 years agoAdd convenience functions for the muxPi 45/138545/5
Aleksander Mistewicz [Wed, 12 Jul 2017 09:53:55 +0000 (11:53 +0200)]
Add convenience functions for the muxPi

The stm package is intended to be used with MuxPi.
It is common to implement functions as package's public that call
methods on structure with default values set. It is safe to call
these methods accross packages and goroutines as long as developer
is aware that Open with corresponding Close should be called once.

Change-Id: Ic5c2fb35b2ec7f41eaedc24a7d78edf09745c1b8

6 years agoAdd most functions provided by STM 44/138544/5
Aleksander Mistewicz [Tue, 11 Jul 2017 17:00:10 +0000 (19:00 +0200)]
Add most functions provided by STM

Following commands are implemented:
    power       - PowerTick
    led         - LED1 and LED2
    clr         - ClearDisplay
    text        - PrintText
    dut         - DUT
    ts          - TS

Link to documentation of all functions:
https://wiki.tizen.org/MuxPi#Features_accessible_thorugh_Cortex-M0

Change-Id: I4dac5c828d8062761a2014ef679192125f0a9154

6 years agoAdd stm GO library 43/138543/3
Aleksander Mistewicz [Tue, 11 Jul 2017 16:48:29 +0000 (18:48 +0200)]
Add stm GO library

It uses non-standard GO library for serial communication
(BSD 3-clause License). Fetch it with:
    go get "github.com/tarm/serial"

Change-Id: I7b57d063d0296b66de880a61a1878ce2abd1f606

6 years agoAdd license file 90/144890/1
Adam Malinowski [Fri, 18 Aug 2017 08:03:21 +0000 (10:03 +0200)]
Add license file

Change-Id: I5bf32969e6bd5a318bf3eddb46460c70d9ca27cd

6 years agoInitial empty repository
Tizen Infrastructure [Thu, 6 Jul 2017 08:05:33 +0000 (08:05 +0000)]
Initial empty repository