Ubuntu Bionic for OpenFrame

General discussion relating to the O2 Joggler, from the default O2 setup, to alternative operating systems and applications.
User avatar
roobarb!
Posts: 1632
Joined: Sat Mar 05, 2011 1:30 pm
Location: Salford, UK
Contact:

Re: Ubuntu Bionic for OpenFrame

Post by roobarb! »

sanjap wrote:
Fri Dec 13, 2019 6:00 am
Roobarb, is it possible to boot the joggler directly to kodi without the need to login screen and entering the command "kodi" . I saw some examples online but none seems to work with XORG. Will appreciate your help
Yeah, create a file called '.xinitrc' in the home directory of the user you wish to boot into automatically. Anything you enter in that file will be run, so potentially you just need the command 'kodi' in there. Then type:

Code: Select all

of-autologin <user>
Reboot.

Fingers crossed that should be the extent of it.

castalla
Posts: 858
Joined: Wed May 29, 2013 10:33 am

Re: Ubuntu Bionic for OpenFrame

Post by castalla »

Okay - maybe I'm not understanding this!

1. Boots
2. Can I ssh login?
3. Is wifi enabled on first boot? Where can I set the boot wifi settings (eg. interfaces)?

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

Re: Ubuntu Bionic for OpenFrame

Post by roobarb! »

castalla wrote:
Wed Dec 18, 2019 9:24 am
1. Boots
Good!
castalla wrote:
Wed Dec 18, 2019 9:24 am
2. Can I ssh login?
Yes, by default with root user enabled. Password is 'joggler'.
castalla wrote:
Wed Dec 18, 2019 9:24 am
3. Is wifi enabled on first boot? Where can I set the boot wifi settings (eg. interfaces)?
It is, edit the file 'network.yaml' on the boot partition (the one you can see from Windows after you've written the image).

By default the content of network.yaml is:

Code: Select all

network:
  version: 2
  renderer: networkd
  ethernets:
    eth0:
      dhcp4: true
  wifis:
    wlan0:
      dhcp4: true
      access-points:
        YOURWIFINAME:
          password: YOURWIFIPASSWORD
          
You just need to change 'YOURWIFINAME' and 'YOURWIFIPASSWORD'. Just keep an eye on 'YOURWIFINAME' - it needs to end with the ':'.

castalla
Posts: 858
Joined: Wed May 29, 2013 10:33 am

Re: Ubuntu Bionic for OpenFrame

Post by castalla »

Thanks!

Is there anyway to blank the joggler screen?

castalla
Posts: 858
Joined: Wed May 29, 2013 10:33 am

Re: Ubuntu Bionic for OpenFrame

Post by castalla »

I had plans to use this as a headless server for LMS. LMS installs fine. BUT when I reboot LMS is unreachable (even 'tho top shows it as running). Trying to purge LMS gives a lot of error messages about locked and read only files.

A bit of a shame.

sanjap
Posts: 19
Joined: Sat Apr 18, 2015 5:15 am

Re: Ubuntu Bionic for OpenFrame

Post by sanjap »

roobarb! wrote:
Thu Dec 05, 2019 1:05 pm
Don't panic folks, links will be down to images for a couple of hours while a new version compiles. I left HPET (High Precision Event Timer) support enabled, which isn't required on the OpenFrames and started to cause issues on the new kernel 5.4, so I decided to remove it from all kernels and let the system build fresh images.
This seem to have broken the backlight driver on the OF2. All new images boot to a very low dim level.

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

Re: Ubuntu Bionic for OpenFrame

Post by roobarb! »

sanjap wrote:
Wed Dec 25, 2019 6:04 pm
This seem to have broken the backlight driver on the OF2. All new images boot to a very low dim level.
I'll check it out when I'm next near an OF2.

castalla
Posts: 858
Joined: Wed May 29, 2013 10:33 am

Re: Ubuntu Bionic for OpenFrame

Post by castalla »

roobarb! wrote:
Tue Dec 17, 2019 10:08 am
sanjap wrote:
Fri Dec 13, 2019 6:00 am
Roobarb, is it possible to boot the joggler directly to kodi without the need to login screen and entering the command "kodi" . I saw some examples online but none seems to work with XORG. Will appreciate your help
Yeah, create a file called '.xinitrc' in the home directory of the user you wish to boot into automatically. Anything you enter in that file will be run, so potentially you just need the command 'kodi' in there. Then type:

Code: Select all

of-autologin <user>
Reboot.

Fingers crossed that should be the extent of it.
I can't get this to work. I get the autologin as root to the terminal but .xinitrc doesn't run ..

.

castalla
Posts: 858
Joined: Wed May 29, 2013 10:33 am

Re: Ubuntu Bionic for OpenFrame

Post by castalla »

For Openframe 2 wifi (which I can;t get to work at all) would the mediatek modules be useful?

Issues

If you're using an OpenFrame 2 the wireless connection does work... sort of. Performance is absolutely terrible and I've not been able to do anything about it. Maybe it's my OF2 which is at fault, but feedback would be appreciated. We're using the brcmsmac driver; the b43 was worse and broke Bluetooth for me. The broadcom-wl driver might do the trick, but there are licensing issues, so I can't distribute it. Good luck!

https://askubuntu.com/questions/1096799 ... untu-18-04

jogglerhase
Posts: 160
Joined: Wed Aug 08, 2012 3:02 pm

Re: Ubuntu Bionic for OpenFrame

Post by jogglerhase »

I am a longtime user of SPOS (with LMS on the Joggler) It worked perfectly over the years - thank you, Roobarb!
Unfortunately, recently some problems due to outdated IO::Socket::SSL and Net::SSLeay came up. Furthermore, it was pointed out that the image is vulnerable to heartbleed.
So, I want to update. Chill did a jivelite image, which I beliefe is based on your (this threads) image.
(See https://forums.slimdevices.com/showthre ... post969108)

All seems working well with that image, but....
I need to also use the Joggler as an Access Point (which worked fine with your SPOS, but I can not get it setup with this new image.)
I tried lots of iterations and following this approach almost 'worked':
https://medium.com/@arnab.k/ubuntu-how- ... 2cbb2eeb90
(Additionally to the instructions, I needed to run sudo systemctl unmask hostapd and sudo systemctl enable hostapd)
What does not work is the very last step in the instructions:
sudo iptables -t nat -A POSTROUTING -s 10.10.0.0/16 -o ppp0 -j MASQUERADE
I also tried to install iptables, but I get this error:
"iptables v1.6.1: can't initialize iptables table `nat': Table does not exist (do you need to insmod?) Perhaps iptables or your kernel needs to be upgraded."

That is were I am stuck.
I would be very (very!) thankful for pointers on how to get this working.

jogglerhase
Posts: 160
Joined: Wed Aug 08, 2012 3:02 pm

Can someone help / have a look?

Post by jogglerhase »

... still banging my head against the wall with setting up an access point on this distro. I moved back to the method used in SQPOS installing hostapd and bridge-utils following these instructions: Only additional thing to be done is 'systemctl unmask hostapd' and 'systemctl enable hostapd'. That makles the AP visible for my phone or Laptop! But: Login fails with 'wrong password'. When I try the log in and then do in SSH 'cat /var/log/syslog | grep hostapd',
I get:

Code: Select all

Mar 25 17:13:43 openframe hostapd: wlan0: STA 24:ee:9a:87:a9:7e IEEE 802.11: authenticated
Mar 25 17:13:43 openframe hostapd: wlan0: STA 24:ee:9a:87:a9:7e IEEE 802.11: associated (aid 1)
Mar 25 17:13:52 openframe hostapd: wlan0: STA 24:ee:9a:87:a9:7e IEEE 802.11: deauthenticated due to local deauth request
When I do the same with the older SQPOS system, I get:

Code: Select all

Mar 25 16:55:59 openframe hostapd: wlan0: STA e0:5f:45:a5:28:69 IEEE 802.11: authenticated
Mar 25 16:55:59 openframe hostapd: wlan0: STA e0:5f:45:a5:28:69 IEEE 802.11: associated (aid 5)
Mar 25 16:55:59 openframe hostapd: wlan0: STA e0:5f:45:a5:28:69 RADIUS: starting accounting session 5E7A916A-00000009
Mar 25 16:55:59 openframe hostapd: wlan0: STA e0:5f:45:a5:28:69 WPA: pairwise key handshake completed (RSN)
Also, when I compare the output of 'hostapd -d /etc/hostapd/hostapd.conf', the the following lines show up only in the non-working case:

Code: Select all

wlan0: interface state UNINITIALIZED->DISABLED
wlan0: AP-DISABLED 
Again - any hints, suggestions etc would be great.

Stay save.

jogglerhase
Posts: 160
Joined: Wed Aug 08, 2012 3:02 pm

still help needed to setup AccessPoint...

Post by jogglerhase »

I am a step further understanding the problem - still can not fix it due to lack of knowlege :(

The problem seems to be that Ubuntu 18.04 uses 'netplan' for networing stuff, whereas earlier Ubuntus use 'ifupdown'.
Googling shows that all attemtps building a reliable accesspoint on Ubuntu 18.04 with netplan fail (at least that is my impression after a lot of searching...)
So, people do the following: They deactivate netplan and install again 'ifupdown'. (Then the 'old' method with hoastapd and bridge-utils should work again)

However, when I do this on this image, I loose all networks on the Joggler - probably, because the image depends on netplan .... :cry:

-> Could someone explain to me what needs to be done to move this image from using netplan to using ifupdown?
I am at a dead end here...

The 'std' instructions are i.e. here: https://askubuntu.com/questions/1031709 ... interfaces
But don't work fro me on this image - maybe due to the EFI boot partition, which already seems to use netplan? (This is wild & desperate guessing, though...)

jogglerhase
Posts: 160
Joined: Wed Aug 08, 2012 3:02 pm

Access Point for Ubuntu Bionic for OpenFrame

Post by jogglerhase »

I got it finally to work.... It was quite the puzzle, as I found nothing on the web, which describes it consistently in 1 post.

So, I posted a how to here:
https://askubuntu.com/a/1222475/1060413

The only additional thing to do after following the above generic instructions to work for this image, is this:

Copy the network.yaml from /etc/netplan/network.yaml also on the root of the FAT partition!

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

Re: Ubuntu Bionic for OpenFrame

Post by roobarb! »

Oh, I'm probably checking in here at just the wrong time, but if you edit /boot/network.yaml to whatever you need it to be and then run:

Code: Select all

sudo of-netplan
The new config will be applied to the OpenFrame. It deals with a couple of things, such as creating or faking a MAC address for the internal card if one isn't specified in the .yaml file, then puts the file in place and restarts networking with netplan.

There's a real scarcity of documentation on netplan at the moment because so few are using it, but I adopted it as it's the new default in Ubuntu and makes initial configuration of network settings much easier when making a new image, as you essentially just edit the .yaml file on the FAT partition and move the drive to the OpenFrame.

I'm going to give your write-up a read because that's a great use for one of these devices, particularly as they've got gigabit ethernet and can take any Linux-compatible wifi stick. Good stuff!

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

Re: Ubuntu Bionic for OpenFrame

Post by roobarb! »

sanjap wrote:
Wed Dec 25, 2019 6:04 pm
This seem to have broken the backlight driver on the OF2. All new images boot to a very low dim level.
Problem found and fixed, backlight should be working properly again now.

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

Re: Ubuntu Bionic for OpenFrame

Post by roobarb! »

Bunch of changes made to today, mostly around keeping the 'of-' utility scripts up to date without needing users to re-image or mess around.

The plan is that this one image can be used for multiple purposes; a 'blank' fits-all image by default, but where a simple:

Code: Select all

of-install squeezeplay
Would set the system up as a SqueezePlay client. Network configuration can already be done from the network.yaml file on the boot partition (visible in Windows) before transferring to the OpenFrame / Joggler, so my thinking is a similar scheme to make these installations hands-off as well. So, the plan would be:

Write Image to USB -> Configure on Boot Partition -> Move To Device -> Boot and Profit

The trickier one is writing to internal memory, but that's not insurmountable. And with the scripts being updatable I don't have to try and complete everything before packaging up another image file, thank goodness.

User avatar
DJWillis
Posts: 3
Joined: Wed Aug 24, 2011 8:39 pm

Re: Ubuntu Bionic for OpenFrame

Post by DJWillis »

Hi roobarb,

Been running the Bionic based image on the internal storage of a few Joggler's (reflashed with 4th May image as a latest). That image seems to run very well from the internal storage.

Stability has been very good in various use cases with one exception, I mostly run one of the units as a SqueezePlay box with a USB DAC/AMP connected to the internal USB pins on the Joggler (not the side plug) and on hard wired ethernet.

This unit has been running your v3 SqueezePlay OS for many years with very little issue however after reflashing with the Bionic based image and running a

Code: Select all

sudo of-install squeezeplay
along with the other basic setup tasks leads to a great 7.8 SqueezePlay system that will run happily for about 36-48 hours before SqueezePlay crashes out leaving the panel showing a shell prompt for the squeezeplay user (green on white) as that is all that is left for X to show ;).

SSH is fine, nothing obvious in the logs and I am carrying on digging on the chance is it something specific to my unit (it is hacked up a lot).

Currently I just sort with a little hacky watchdog on another box restarts X it if it notices that the player has vanished from LMS (ok, not going to win awards for clean).

Code: Select all

sudo service startx stop
sudo service startx start
That works well, so it seems to prove that the hardware is solid no reboot was involved and no devices have vanished or anything like that.

This post is really more to flag it up or ask if there is somewhere specific I should be looking to diagnose beyond the usual logs. Was pondering wrapping the load of squeezeplay to reload it if it dies without warning but not sure about the sanity of that.

Thanks again for all the work on this.

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

Re: Ubuntu Bionic for OpenFrame

Post by roobarb! »

DJWillis wrote:
Wed May 06, 2020 3:33 pm
This unit has been running your v3 SqueezePlay OS for many years with very little issue however after reflashing with the Bionic based image and running a

Code: Select all

sudo of-install squeezeplay
along with the other basic setup tasks leads to a great 7.8 SqueezePlay system that will run happily for about 36-48 hours before SqueezePlay crashes out leaving the panel showing a shell prompt for the squeezeplay user (green on white) as that is all that is left for X to show ;).

SSH is fine, nothing obvious in the logs and I am carrying on digging on the chance is it something specific to my unit (it is hacked up a lot).
Thanks for the report, you've soak tested it for longer than I have!

If you go into Settings > Advanced > Logging there are a ton of options for debug levels of the various elements of SqueezePlay. If you turn relevant ones on and then redirect the output of jive in /opt/squeezeplay/bin/squeezeplay.sh you should be able to catch the cause. It's clearly not the OS that's failing.

Only other thing to ask - is your DAC on the internal port or on the additional unused USB 2.0 D+ D- points? Have you tried switching the audio interface to 'External Direct' (or vice versa if that's what you're already using?).

User avatar
DJWillis
Posts: 3
Joined: Wed Aug 24, 2011 8:39 pm

Re: Ubuntu Bionic for OpenFrame

Post by DJWillis »

Thanks,
roobarb! wrote:
Wed May 06, 2020 7:29 pm
If you go into Settings > Advanced > Logging there are a ton of options for debug levels of the various elements of SqueezePlay. If you turn relevant ones on and then redirect the output of jive in /opt/squeezeplay/bin/squeezeplay.sh you should be able to catch the cause. It's clearly not the OS that's failing.
Indeed, thanks, i'll do some more digging and logging.
roobarb! wrote:
Wed May 06, 2020 7:29 pm
Only other thing to ask - is your DAC on the internal port or on the additional unused USB 2.0 D+ D- points? Have you tried switching the audio interface to 'External Direct' (or vice versa if that's what you're already using?).
It is setup as 'External Direct' on the Joggler so i'll try the other external variants and soak again. As for the physical connection, it is on the USB 2.0 pins (bus 1, device 7) via a fly lead and an external hub to fix enumeration.

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

Re: Ubuntu Bionic for OpenFrame

Post by roobarb! »

The latest image now has built-in support for the Crystal HD card. Not that I've managed to get it to work particularly well yet, but the driver still compiles and is loaded successfully. Shared libraries and firmware also included.

Post Reply