Action Item #769
closedAdd Player only system
Added by Hammel over 4 years ago. Updated almost 4 years ago.
100%
Description
This would be a light-weight Media System that only does the playing on B/B+ systems, so it boots faster.
Updated by Hammel over 4 years ago
- Priority changed from High to Immediate
- Severity changed from 02 - High to 01 - Critical
Updated by Hammel over 4 years ago
- Status changed from New to In Progress
- % Done changed from 0 to 10
- Implement an autokiosk-type mode in videofe/opkg/Makefile. This requires a new mode in metabuild too.
- Implement a kiosk-type mode in videofe/opkg/Makefile. This requires a new mode in metabuild too.
- 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.
Updated by Hammel over 4 years ago
Ironman's www with just the imwww component to allow setting up a node's connection using a phone but without IoT setup.- This is done and pushed. Use the HW=piplayer build option.
A new app, pinet, is needed to manually enable and disable network configuration mode.This is currently in development - see src/ximba/pinetWhen launched this app starts the imwww app and spins, waiting on user exit.This needs to setup AP networking too. That requires Ironman's monitor S40network script.
On exit the imwww app is stopped.An animated spinner should be displayed while the app is running.
Launcher with just vfe, musicfe and pinet and no right side splash.This needs a mode option (./cross.sh -m player) to change the way the display is formatted in the code.Launcher will need new code to support this new mode.
piboxd with IoT and Webcam disabled.This exists but needs a build option (./cross.sh -m player) to configure these options in package installation.
Updated by Hammel about 4 years 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.
Updated by Hammel about 4 years ago
Current status¶
Initial implementation of a player metabuild is ready for testing. See meta 2 sandbox.Need to add pinet to metabuild
- 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 modeNeeds to start imwww-Starts animation with IP and password- On exit
Stop imwwwRestart /etc/init.d/S40network in normal modeRemove AP passwordRemove web server password
Launcher changes have not been started.
Piboxd changes have not been started.
Updated by Hammel about 4 years 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.
Updated by Hammel about 4 years ago
Tested on hardware today.
pinet animation is very slow. It needs to use the EGL backend, but I don't know how to make that happen.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.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.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.
imwww doesn't need a login screen after all but does need to run in pair mode while not enabling the AP configuration.pinet needs tomkdir /etc/gpiotouch /etc/gpio/pairremove /etc/gpio/pair
imwww needsto remove pw updates - it's too complex to use with "imwww".Remove the sensor configuration section using a stamp file set by pinet.Add option to runserver.sh to disable the AP configuration.
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.pinet has the picam launcher icon - needs the network icon.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.This requires appmgr to use a specific appmgr.cfg that runs with mini-icons: /usr/bin/launcher -m
Updated by Hammel about 4 years ago
- % Done changed from 50 to 60
All changes are implemented. Next: test on rpi2 and rpi3 test platforms.
Things that may need changing:- pinet may want to check which platform its on and adjust animation accordingly.
- pinet may need to test that wifi supports AP and post error if it doesn't.
- pinet may want to test for available wifi and error if missing (by design, does not work with wired eth).
- launcher -m (mini-icons) may want to adjust between 1/2 and 1/3 display size based on display size.
Updated by Hammel about 4 years ago
- % Done changed from 60 to 70
pinet needs to be privileged since it needs to restart networking (add to appmgr.priv)pinet does not create /etc/gpio/pair anymore. Not sure why yet.Icons are definitely too small, but without -m they are oversized.
Note: these are all ready to test again.
Updated by Hammel almost 4 years 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.
Updated by Hammel almost 4 years ago
- % Done changed from 80 to 90
Increased timeout fixed that problem.
Still need one more test of the wifi config capability.
Updated by Hammel almost 4 years ago
Pinet isn't giving me debug output for some reason. And I can't connect to the pinet server to configure networking. Need to debug this more.
Update: I think this may be because a reinstall from SD on a Pi3 with a wifi dongle gets two wifi interfaces. The first is the broadcom which doesn't (I don't think) support client + ap mode. So it has to be disabled.
Launcher is not reporting the correct touch point on the RPi touchscreen. I don't know why yet.
Updated by Hammel almost 4 years ago
Launcher touch problem was because launcher.cfg had "rotate=1" set. I need to find out how that got in there.
Update: Fixed in launcher project by editing data/launcher.cfg.player.
Updated by Hammel almost 4 years ago
Disabling of onboard wifi for RPi3 is done by adding the following line to config.txt:
dtoverlay=pi3-disable-wifi
This has been tested and works. I need to add it as a config package update for piplayer.
pinet is not launchering imwww because the path to the init script was broken by re-setting a variable to the script after the proper path was set. I've fixed this in the source and tested on hardware and while imwww is now being launched it doesn't load.
Now I need to enable debug on imwww. This will be easier to do on the laptop where I can use ssh and wget for testing.
Updated by Hammel almost 4 years ago
I found the problem. It has to do with where the pair stamp file is created.
pinet needs to create the following directories on install:
/home/httpd/imwww
/home/httpd/imwww/data
/home/httpd/imwww/data/log
When run, it needs to create the following
/home/httpd/imwww/data/pair - to enable the web UI
/home/httpd/imwww/data/debug - to enable debugging. This should be a cli option to pinet.
Updated by Hammel almost 4 years ago
Changes for pinet committed and pushed. I need to rebuild the packages and install from scratch to retest.
Updated by Hammel almost 4 years ago
I retested with latest updates but there was still one more problem: the web UI showed the sensor configuration options. To disable this pinet needs to touch /home/httpd/imwww/data/noap.
Updated by Hammel almost 4 years ago
I had to rewrite the code that created the directories and stamp files, moving from system() calls to the equivalent C functions. This fixed problems I was having with startup.
All code tested and working, committed and pushed.
I need one last test: make sure the player can connect to a Media System and actually play the videos and audio. I need to load the last media system on the RPi2 in my office and connect a speaker to the RPi3 touchscreen to verify that. I should also load the player on an RPi2 though I don't think I have one other than the one I'm using for the Media System.
Updated by Hammel almost 4 years ago
- saveIPV4() is called by settings-write.php in imwww. This causes an error to pop up on the browser because those options are not set in the UI. The fix is to only call saveIPV4() if noap is not set.
- Exiting pinet is very slow. You can force it by hitting exit twice (ESC on keyboard or upper right on touchscreen). Because of this the network is not properly restarted. I need to either print notice that the network is restarting before exiting and/or disallow multiple exit requests.
- The network didn't come up the first time after a reboot. Manually running network restart a couple times made it work. This is probably a device problem.
- There is no information on wifi connection status. I need a Status app, I guess. Or have the launcher display the network status. This could display the IP and MAC addresses.
The first is already fixed and pushed. I need to dig into the pinet.c code to fix the others. The network restart problem probably needs a fix in the init script that reschedules itself if the network doesn't come up. There should be a maximum retry count.
Update¶
- Fixed
- Fixed - required SIGINT to allow touchprocessor thread to exit.
- Kind of fixed but there is still something wrong here. piboxd is notified to restart the network but the network doesn't come back up. And the launcher gets stuck after that. No idea what's happening here. For now the way around it is to send an MT_SYS/MA_REBOOT instead of a MT_NET/MA_RESTART, but only if the configuration changed.
- TBD
Update¶
The restart is fixed, a bit, without having to switch to a reboot. The problem was that piboxd was using internal message types instead of libpibox's pmsg.h.
Another problem is that the data directory pinet creates to populate with files for imwww for some reason is not always there. That seems like a filesystem problem (overlayfs). Not sure what to do about that. It's intermittent.
Finally, either the web UI doesn't update the network config or pinet overwrites it when it exits. I need to check this. I'm guessing it's the latter.
Updated by Hammel almost 4 years ago
This is fully working now. The last thing to do is cleanup the javascript and HTML for the AP web page. I've done most of that but now need to remove the reboot button. It doesn't belong in the AP version of this (at least not in this version).
Updated by Hammel almost 4 years ago
- Status changed from In Progress to Closed
- % Done changed from 90 to 100
All updates tested on hardware, committed and pushed.
piplayer build is now working.
Closing issue.