Jivelite on Joggler

General discussion relating to the O2 Joggler, from the default O2 setup, to alternative operating systems and applications.
Chill
Posts: 12
Joined: Mon Jan 21, 2019 10:05 am

Re: Jivelite on Joggler

Post by Chill » Sat Jan 26, 2019 3:25 pm

Thanks for the example file - I'll have a look at that. And thanks for checking re the shebang - yes, it was there, and the script was executable, and I was able to start Jivelite successfully by running that script from the command line. I suspect the autostart issue may have something to do with X. Even if it doesn't, I think it's going to be necessary to run it without X for the internal version, due to space, so I think I'll have another crack at running the current Jivelite build without X - it may be that the autostart problem then goes away by itself!

If we can get Jivelite working properly without X, with a properly calibrated touchscreen, then I think the next steps on the path would be:
1) compile it without X support, to minimise the binary size (Ralphy's offered to help with this, thankfully!)
2) transfer the binary, and any runtime SDL libraries that it needs (as detailed by Ralphy in the Squeezebox forum thread), over to the internal version.
3) sort out the autostart stuff

I'm halfway through rebuilding the development environment from the raw 8GB USB Bionic image, so as to be sure which steps are needed and to document the steps.

Man in a van
Posts: 279
Joined: Sun Aug 25, 2013 2:39 pm
Location: Staffordshire. UK

Re: Jivelite on Joggler

Post by Man in a van » Sat Jan 26, 2019 3:35 pm

It's possible to autostart using crontab-e and also via a .desktop file.

The problem I had before was the mouse arrow.

There is lots of info about starting a .sh (its getting the most up to date that's the problem :roll: )

FYI I just had to install xinit

Man in a van
Posts: 279
Joined: Sun Aug 25, 2013 2:39 pm
Location: Staffordshire. UK

Re: Jivelite on Joggler

Post by Man in a van » Sat Jan 26, 2019 4:20 pm

Followed your startjivelite.sh

and did

Code: Select all

 sudo crontab -e

Code: Select all

@reboot /home/joggler/startjivelite.sh
https://www.kompulsa.com/run-a-program- ... ntu-18-04/

It works but the volume on the selected player is very low. I have no idea about that at the mo, everything is set to 100% where it should be. There must be a setting in the joggler but alsamixer produced no information.

EDIT: Thought about the software side and could find any immediate answers.
Then a lightbulb KISS moment :shock:
On my desktop computer I use a passive pre-amp (with two controls) as a switch-box into a small amplifier that has only one input.
Yes!...... I had turned down the volume whilst messing around. :oops: :oops: :oops:


That's me finished for today.

I feel like i have lost a whole week of my life :) :)

ronnie
Last edited by Man in a van on Sat Jan 26, 2019 4:55 pm, edited 1 time in total.

Man in a van
Posts: 279
Joined: Sun Aug 25, 2013 2:39 pm
Location: Staffordshire. UK

Re: Jivelite on Joggler

Post by Man in a van » Sat Jan 26, 2019 4:46 pm

Might also try with a .desktop calling the jivelitestart.sh


Just had a look here

Code: Select all

joggler@openframe:/etc/xdg$ cd autostart
joggler@openframe:/etc/xdg/autostart$ ls
at-spi-dbus-bus.desktop xdg-user-dirs.desktop

Chill
Posts: 12
Joined: Mon Jan 21, 2019 10:05 am

Re: Jivelite on Joggler

Post by Chill » Sun Jan 27, 2019 12:48 pm

This site seems to have the answer to the autostart thing. I made a script file in /etc/profile.d/ with the contents:

Code: Select all

if [ "$(tty)" = "/dev/tty1" ]; then
    TSLIB_FBDEVICE=/dev/fb0 TSLIB_TSDEVICE=/dev/input/event2 TSLIB_CALIBFILE=/etc/pointercal TSLIB_CONFFILE=/etc/ts.conf TSLIB_PLUGINDIR=/usr/local/lib/ts /home/joggler/jivelite/bin/jivelite
fi
And that does attempt to start Jivelite at boot, without a login prompt.

I also tinkered with the other bit of advice on that page, to change the default login user from 'root' to 'joggler'. That also works nicely, but I haven't been able to combine both steps yet because if the default user is 'joggler' then Jivelite wants joggler's password to run at boot. I think that's easily fixed though.

The very long command string to start Jivelite is just a way to supply all the environment variables. I've compiled it the normal way, and I've also compiled tslib with these instructions. I can run ts_calibrate to create /etc/pointercal, but Jivelite only shows the splash screen then quickly drops back to a command prompt without any sort of error message.

This basic setup, of compiling Jivelite the same way and running it with the same command, worked with the Trusty base/server image, so there's something wrong with the way I'm compiling or running running JiveLite for Bionic.

Chill
Posts: 12
Joined: Mon Jan 21, 2019 10:05 am

Re: Jivelite on Joggler

Post by Chill » Sun Jan 27, 2019 1:08 pm

Chill wrote:
Sun Jan 27, 2019 12:48 pm

I also tinkered with the other bit of advice on that page, to change the default login user from 'root' to 'joggler'. That also works nicely, but I haven't been able to combine both steps yet because if the default user is 'joggler' then Jivelite wants joggler's password to run at boot. I think that's easily fixed though.
I changed the command by inserting 'echo <password> | sudo -S ' before the jivelite command, so that the password is provided on the command line (obviously replace <password> with the real password). So the whole command becomes:

Code: Select all

TSLIB_FBDEVICE=/dev/fb0 TSLIB_TSDEVICE=/dev/input/event2 TSLIB_CALIBFILE=/etc/pointercal TSLIB_CONFFILE=/etc/ts.conf TSLIB_PLUGINDIR=/usr/local/lib/ts echo <password> | sudo -S /home/joggler/jivelite/bin/jivelite
This enables me to have joggler as the default user for tty1, and for JiveLite to autostart without asking for a password.

User avatar
roobarb!
Posts: 1483
Joined: Sat Mar 05, 2011 1:30 pm
Location: Manchester, UK
Contact:

Re: Jivelite on Joggler

Post by roobarb! » Mon Jan 28, 2019 10:29 am

Man in a van wrote:
Sat Jan 26, 2019 4:20 pm
I feel like i have lost a whole week of my life :) :)
Haha, that's a common feeling! :D

Sounds like you've been making great progress.
birdslikewires.net - home of the Reflash System, SqueezePlay (OS) and various tools for the Joggler!

Man in a van
Posts: 279
Joined: Sun Aug 25, 2013 2:39 pm
Location: Staffordshire. UK

Re: Jivelite on Joggler

Post by Man in a van » Mon Jan 28, 2019 11:06 am

Chill wrote:
Sun Jan 27, 2019 12:48 pm


because if the default user is 'joggler' then Jivelite wants joggler's password to run at boot. I think that's easily fixed though.



I use crontab to autostart Jivelite and it just starts into the full jivelite screen

Chill
Posts: 12
Joined: Mon Jan 21, 2019 10:05 am

Re: Jivelite on Joggler

Post by Chill » Mon Jan 28, 2019 12:44 pm

Man in a van wrote:
Mon Jan 28, 2019 11:06 am

I use crontab to autostart Jivelite and it just starts into the full jivelite screen
Does it get beyond the splash screen? Is that under X?

I've got the autostart thing working with the /etc/profile.d/ approach, and I've compiled SDL with tslib support, with the aim of eventually building JiveLite without X support, to minimise the binary size. So without running it under X, JiveLite currently crashes out after the splash screen, with an error relating to screen resolution. My post on the Squeezebox forum explains where I've got to.

Ronnie - are you saying you've got it to work without X? How did you get to that point?

Man in a van
Posts: 279
Joined: Sun Aug 25, 2013 2:39 pm
Location: Staffordshire. UK

Re: Jivelite on Joggler

Post by Man in a van » Mon Jan 28, 2019 1:48 pm

I have had to install xinit.

Without it, if I just do (whilst connected to the jogger via a hub)

Code: Select all

sudo /home/joggler/jivelite/bin/jivelite
then I get the same thing, a quick flash of the splash screen and that's it :( .

The trusty image used to start without adding anything, but the xorg (or just xinit) kept it stable, especially with your disable the mouse trick ;) .

This morning I tried the

Code: Select all


sudo apt-get install  matchbox-window-manager 
instead of xinit, but that just borked everything.

I have decided that its best to do the two builds first, then add on the bits required, as I sometimes get an error in the jivelite build.

ronnie

Man in a van
Posts: 279
Joined: Sun Aug 25, 2013 2:39 pm
Location: Staffordshire. UK

Re: Jivelite on Joggler

Post by Man in a van » Mon Jan 28, 2019 2:03 pm

@ roobarb!

I have tried using the Openframe 2 (Cisco) to build on but keep getting an error In the Jivelite build. I'll try again sometime soon.

I have used a completed build from the O2 joggler and that works on the Cisco one, so I must be doing something wrong in the build process.

The wireless does not work on the Cisco model, I did ifconfig and it shows bond0 instead of wlan0.

I changed this in the network.yaml file but it just defaulted to wlan0.

I have googled bond0 and it seems I am just confused :? :shock: :roll:

Any thoughts?

ronnie

Chill
Posts: 12
Joined: Mon Jan 21, 2019 10:05 am

Re: Jivelite on Joggler

Post by Chill » Tue Jan 29, 2019 1:23 am

@Roobarb

When you created the Squeezeplay installations, did you use just SDL/TSLIB, or do you run it under X somehow? If you used SDL/TSLIB only, can you divulge which environment variables you specified for all the TSLIB and SDL configuration? I'm currently using

Code: Select all

export TSLIB_FBDEVICE=/dev/fb0
export TSLIB_TSDEVICE=/dev/input/event3
export TSLIB_CALIBFILE=/usr/local//etc/pointercal
export TSLIB_CONFFILE=/usr/local/etc/ts.conf
export TSLIB_PLUGINDIR=/usr/local/lib/ts
export SDL_MOUSEDRV=TSLIB
export SDL_MOUSEDEV=$TSLIB_TSDEVICE
and whilst I can run ts_calibrate to generate a pointercal file, and ts_print works correctly, the pointer location in JiveLite is all over the place. I've narrowed it down to an issue with the SDL_MOUSEDEV variable. What did you use for this variable in Squeezeplay OS?

If you used X, how did you fit that into the 1GB flash storage?

Chill
Posts: 12
Joined: Mon Jan 21, 2019 10:05 am

Re: Jivelite on Joggler

Post by Chill » Tue Jan 29, 2019 1:28 pm

Progress of sorts. If I remove the SDL_MOUSEDEV environment variable altogether, then the mouse behaves less erratically, and in fact seems to be scaled down by half (e.g. if I touch the bottom right corner the mouse pointer moves to the middle of the screen).

Here's the odd bit though - if I touch the top left of the screen it seems to self-calibrate! After that the cursor follows my finger quite nicely.

Any thoughts on what could cause this?

Chill
Posts: 12
Joined: Mon Jan 21, 2019 10:05 am

Re: Jivelite on Joggler

Post by Chill » Tue Jan 29, 2019 8:17 pm

Got there in the end. Despite building libSDL with TSLIB support, Jivelite was building with an old version of SDL. Fixed that with Ralphy's help, and now Jivelite is working properly with TSLIB and without X. I've set it to run at boot, and it seems to work properly. Instructions posted on the Squeezebox forum here.

Just need to see about transferring it over to the internal flash storage, and then work on getting the right applets, splash screens etc.

Post Reply