Action Item #769

Add Player only system

Added by Hammel 5 months ago. Updated 4 days ago.

Status:In ProgressStart date:28 Jun 2020
Priority:ImmediateDue date:
Assignee:Hammel% Done:

90%

Category:Systems
Target version:2.0 - Harkonnen
Severity:01 - Critical

Description

This would be a light-weight Media System that only does the playing on B/B+ systems, so it boots faster.

Associated revisions

Revision 209474ac
Added by Hammel 3 months ago

RM #769: Switch to Buildroot's ffmpeg to get TLS support more easily, which allows use of https:// urls.

Revision 07bea8be
Added by Hammel about 1 month ago

RM #769: Fix packaging build.

Revision 07bea8be
Added by Hammel about 1 month ago

RM #769: Fix packaging build.

Revision 0ec41a12
Added by Hammel 28 days ago

RM #769: Add support for AP mode. Make animation scale as it spins. Add login info to animation. Update psk and webserver pw files.

Revision 0ec41a12
Added by Hammel 28 days ago

RM #769: Add support for AP mode. Make animation scale as it spins. Add login info to animation. Update psk and webserver pw files.

Revision 305d76d5
Added by Hammel 27 days ago

RM #769: Add pinet to piplayer mode build.

Revision 83f70f6e
Added by Hammel 27 days ago

RM #769: Add piplayer build option (-p).

Revision 9f489490
Added by Hammel 26 days ago

RM #769: Add -p option to cross.sh to build piboxd for piplayer.

Revision 22b7d575
Added by Hammel 20 days ago

RM #769: Fix pinet app icons. Remove password handling for web server (it doesn't use it anymore). Slow animation so it works on an RPi2 reasonably well (works better on RPi3). Add default port to instructions text displayed on screen.

Revision 22b7d575
Added by Hammel 20 days ago

RM #769: Fix pinet app icons. Remove password handling for web server (it doesn't use it anymore). Slow animation so it works on an RPi2 reasonably well (works better on RPi3). Add default port to instructions text displayed on screen.

Revision 270a836b
Added by Hammel 20 days ago

RM #769: Code cleanup - tabs to spaces.

Revision 270a836b
Added by Hammel 20 days ago

RM #769: Code cleanup - tabs to spaces.

Revision 9bd261c7
Added by Hammel 18 days ago

RM #769: Add -p option to cross.sh for use with piplayer (starts launcher with -m option).

Revision bd77db2c
Added by Hammel 18 days ago

RM #769: Add -m option to make icons smaller (mini-icons, re: 1/3 of display size instead of expanding to fill space).

Revision 07b0071e
Added by Hammel 13 days ago

RM #769: mini-icons prevent scaling icons up. Fix bug with initial highlight not showing up.

Revision 7be3304f
Added by Hammel 13 days ago

RM #769: Create pair stamp file for imwww. Add pinet to appmgr.priv.

Revision 7be3304f
Added by Hammel 13 days ago

RM #769: Create pair stamp file for imwww. Add pinet to appmgr.priv.

Revision ead3e17d
Added by Hammel 4 days ago

RM #769: Increase timer to 1500ms to update the active highlight on startup.

History

#1 Updated by Hammel 4 months ago

  • Priority changed from High to Immediate
  • Severity changed from 02 - High to 01 - Critical

#2 Updated by Hammel 4 months ago

  • Status changed from New to In Progress
  • % Done changed from 0 to 10
There are several ways to do this.
  1. Implement an autokiosk-type mode in videofe/opkg/Makefile. This requires a new mode in metabuild too.
  2. Implement a kiosk-type mode in videofe/opkg/Makefile. This requires a new mode in metabuild too.
  3. A new mode in Metabuld only, that just integrates videofe and perhaps one or two other apps.

The autokiosk mode would boot fastest probably but not by much. The metabuild-only mode is easiest to implement and would probably look the best.

#3 Updated by Hammel 4 months ago

The metabuild option is the one I'm going to implement. It will require some additional pieces.
  1. Ironman's www with just the imwww component to allow setting up a node's connection using a phone but without IoT setup.
    1. This is done and pushed. Use the HW=piplayer build option.
  2. A new app, pinet, is needed to manually enable and disable network configuration mode.
    1. This is currently in development - see src/ximba/pinet
    2. When launched this app starts the imwww app and spins, waiting on user exit.
      1. This needs to setup AP networking too. That requires Ironman's monitor S40network script.
    3. On exit the imwww app is stopped.
    4. An animated spinner should be displayed while the app is running.
      1. See Threaded animation with Cairo
  3. Launcher with just vfe, musicfe and pinet and no right side splash.
    1. This needs a mode option (./cross.sh -m player) to change the way the display is formatted in the code.
    2. Launcher will need new code to support this new mode.
  4. piboxd with IoT and Webcam disabled.
    1. This exists but needs a build option (./cross.sh -m player) to configure these options in package installation.

#4 Updated by Hammel 3 months ago

comment deleted

#5 Updated by Hammel 3 months ago

I messed up here - the last two updates to this issue were for RM #794. So I moved them there. I've updated the comments here accordingly.
The Player only system build is not related to RM #794.

#6 Updated by Hammel 3 months ago

Current status

Initial implementation of a player metabuild is ready for testing. See meta 2 sandbox.

Pinet source has been started but is not ready for testing. Only the project structure has been created. No new code has been written for it yet.

Launcher changes have not been started.

Piboxd changes have not been started.

#7 Updated by Hammel about 1 month ago

Current status

Initial implementation of a player metabuild is ready for testing. See meta 2 sandbox.
  • Need to add pinet to metabuild
Pinet has a project in GitLab and the code compiles into an app that simply spins a Cairo-based animation of the MIOT logo.
  • Needs to generate random password for AP
    • Need to add password login to "imwww".
    • pw gets stored by pinet in web dir, loaded by imwww, then removed by pinet on exit.
    • Need to test with imwww changes.
    • Need to test with AP mode too (same pw).
  • Needs to call pinet-ap.sh to bring up to AP mode
  • Needs to start imwww-
  • Starts animation with IP and password
  • On exit
    • Stop imwww
    • Restart /etc/init.d/S40network in normal mode
    • Remove AP password
    • Remove web server password

Launcher changes have not been started.

Piboxd changes have not been started.

#8 Updated by Hammel 26 days ago

  • % Done changed from 10 to 50

This is done. The system can be built from the metabuild.

It now needs to be tested on hardware.

#9 Updated by Hammel 25 days ago

Tested on hardware today.

  1. pinet animation is very slow. It needs to use the EGL backend, but I don't know how to make that happen.
    1. Update: It might be easier with a newer version of Buildroot. I need to enable mesa3d and the Gallium driver for vc4, at a minimum. Then make sure I can enable EGL in the Cairo build, which requires BR2_PACKAGE_HAS_LIBGLES enabled somehow.
    2. Update: attempted to preallocate translated/rotated images but that doesn't speed anything up. It would seem I will need the GPU (re: EGL) to make this go faster.
    3. Update: I increased the timer interval so it wasn't running as often - about 15 frames a second. This looks much better without the overhead of EGL on an RPi2. That should cover the animation slowness issue.
  2. imwww doesn't need a login screen after all but does need to run in pair mode while not enabling the AP configuration.
    1. pinet needs to
      1. mkdir /etc/gpio
      2. touch /etc/gpio/pair
      3. remove /etc/gpio/pair
    2. imwww needs
      1. to remove pw updates - it's too complex to use with "imwww".
      2. Remove the sensor configuration section using a stamp file set by pinet.
      3. Add option to runserver.sh to disable the AP configuration.
  3. runserver -K does not stop the running process. This may caused by the wrong command line arg (used -k but should have used -K (uppercase)) which causes a secondary instance to start. This is a bug in runserver.sh It should look for a running instance and, if found, kill it (or at least attempt to kill it) before starting a new session. Alternatively it could just log that it can't start because an existing session is already running.
  4. pinet has the picam launcher icon - needs the network icon.
  5. launcher shows all images very large. I need to change this to fit the height to 1/3 the display size and the width proportional to that. This will mean alternative translations in the launcher as well.
    1. This requires appmgr to use a specific appmgr.cfg that runs with mini-icons: /usr/bin/launcher -m

#10 Updated by Hammel 18 days ago

  • % Done changed from 50 to 60

All changes are implemented. Next: test on rpi2 and rpi3 test platforms.

Things that may need changing:
  1. pinet may want to check which platform its on and adjust animation accordingly.
  2. pinet may need to test that wifi supports AP and post error if it doesn't.
  3. pinet may want to test for available wifi and error if missing (by design, does not work with wired eth).
  4. launcher -m (mini-icons) may want to adjust between 1/2 and 1/3 display size based on display size.

#11 Updated by Hammel 18 days ago

  • % Done changed from 60 to 70
Testing:
  1. pinet needs to be privileged since it needs to restart networking (add to appmgr.priv)
  2. pinet does not create /etc/gpio/pair anymore. Not sure why yet.
  3. Icons are definitely too small, but without -m they are oversized.

Note: these are all ready to test again.

#12 Updated by Hammel 4 days ago

  • % Done changed from 70 to 80

The g_timeout isn't updating the launcher on the rpi2 (it did on the rpi3). I don't know if the 100ms happens before the screen is displayed on the rpi2 or what.

Increase the timeout and see what happens.

Note that a keypress - even just "shift" - will cause the highlight to get displayed.

#13 Updated by Hammel 4 days ago

  • % Done changed from 80 to 90

Increased timeout fixed that problem.

Still need one more test of the wifi config capability.

Also available in: Atom PDF