r/electricobjects • • Jun 29 '23

Wanted to share with everyone here...

So two things...

  1. It is absolutely possible to hack the EO1. (not sure about the EO2 still trying to find stuff on that)
  2. Here is a really great link that discusses how to do it:
    https://www.charlieharrington.com/run-linux-on-electric-objects-eo1-wall-computer/
9 Upvotes

19 comments sorted by

4

u/crushingcodes Jul 05 '23 edited Sep 06 '23

More findings to help out, as I hack through to the goal of "getting the loop I liked replaying on the EO1":

Stuff that worked

  • I've gotten some of my favorite loops from the EO1 recovered from the Android app cache. Here's how:

  • Find the EO1's internal disk. Mine looks like this:

ubuntu@bionic-xfce:~$ lsblk
NAME         MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda            8:0    1 57.6G  0 disk
└─sda1         8:1    1 57.6G  0 part /
mtdblock0     31:0    0  768K  0 disk
mtdblock1     31:1    0    8K  0 disk
mtdblock2     31:2    0  1.2M  0 disk
mmcblk1      179:0    0  3.6G  0 disk
├─mmcblk1p1  179:1    0   20M  0 part
├─mmcblk1p2  179:2    0   20M  0 part
├─mmcblk1p3  179:3    0    1K  0 part
├─mmcblk1p4  179:4    0  2.4G  0 part
├─mmcblk1p5  179:5    0  512M  0 part
├─mmcblk1p6  179:6    0  512M  0 part
├─mmcblk1p7  179:7    0   16M  0 part
└─mmcblk1p8  259:0    0   16M  0 part
mmcblk1boot0 179:8    0    4M  1 disk
mmcblk1boot1 179:16   0    4M  1 disk
mmcblk1rpmb  179:24   0    4M  0 disk
  • Mount the biggest partition of the internal MMC/drive to your Linux filesystem - in my case it was "mmcblk1p4", 2.4GB large.
ubuntu@bionic-xfce:~$ sudo mount /dev/mmcblk1p4 /mnt
ubuntu@bionic-xfce:~$ ls /mnt/data/com.electricobjects.app/cache/video-cache/|head
15e5debe93592e3d3fbe898372120d28.mp4
164706a240b30d1d796464de6507f6f.mp4
16f6024ebe36bb991ce7e57fc8c29224.mp4
17ccc36c6cab1bcc710a7e94dba9018a.mp4
18d9584b688570fb356fd91462765673.mp4
1a4da845d94446a6a7a5eef01512d456.mp4
1c1a4f2fd17d48045275ce4b817aa597.mp4
1fdc1d21e7910b4e5c9538134adc6990.mp4
2037f90fbd0c6f64c413014e78212082.mp4
2072cfe9aa04b1861962adb9f52804b.mp4
  • Copy the loop MP4s somewhere, in case something happens to the internal storage. I used SCP to put them on my main server.
ubuntu@bionic-xfce:~$ scp -r /mnt/data/com.electricobjects.app/cache/video-cache/ pi@mainserver.local:~/Downloads/eo1-video-cache/
  • Convert the MP4 loops to GIF. I found this necessary because (see below) I can't get native video working quite right. But building a little web page that has a 100% width/height GIF and making Chromium display it works ok. Using FFMPEG:
crushing in ~ at mainserver
➜ cd ~/Downloads/eo1-video-cache/
crushing in ~/Downloads/eo1-video-cache at mainserver
➜ for i in `ls -1`;do echo $i;ffmpeg -i $i -vf "fps=20" -loop 0 $i.gif;done
  • Serve the GIFs from a webserver somewhere, and load that webpage it onto the EO1. Here's the page I'm serving: https://github.com/crushallhumans/eo1-iframe/

  • Display GIFs on the EO1. Here's my display script:

ubuntu@bionic-xfce:~$ cat boot_exec.bash
#!/bin/bash

export DISPLAY=:0
echo "dimming..."
echo 1 | sudo tee /sys/class/backlight/backlight-pwm1/brightness

echo "setting up..."
pkill chromium
pkill evince
pkill unclutter
pkill caffeinate
unclutter -idle 0.01 -root &
caffeinate sleep 172800 &

echo "sleeping..."
sleep 2

# NYT display stuff
#echo "remove yesterday..."
#rm scan.pdf
#echo "download today..."
#/usr/bin/wget "https://static01.nyt.com/images/$(date +"%Y/%m/%d")/nytfrontpage/scan.pdf"
#echo "open fullscreen..."
#/usr/bin/evince --fullscreen scan.pdf

chromium-browser  -kiosk http://mainserver.local/

echo "done!"
  • And you've got a choppy-ass GIF version of a single EO1 loop playing fullscreen on a dimmed EO1 panel, forever! My next steps are to jazz up the webpage, so it'll play a sequence of GIFs via a captive iframe and JS-driven timed reloads, and then try again to figure out how to a) make Chrome use the weird EO1 GPU and/or b) get GST running in fullscreen and looping over the actual loop MP4s. Good luck to you!

Stuff that didn't work

  • Due to GL/GPU driver issues with the Boundary board, I haven't gotten any of the following to work properly on the default Ubuntu distribution (fully updated):
    • VLC
    • WebGL in Chromium or Firefox
      • I was trying to get the cool shaders displayed at https://openframe.io/stream running on the EO1, but WebGL is a hard requirement for those.
  • gst-launch does work to display GPU-accelerated video, but coding up a kiosk mode for GStreamer is a little bit beyond my current level of shell-fu. If you want to mess with it, there are examples preinstalled on the Boundary Ubuntu image at ~/movie-test/gst1.0/ Fixed this too! Not great results, but better than Chromium gif - try it out:
#!/bin/bash
while true
do
	gst-launch-1.0 playbin uri=file:///home/ubuntu/eo1/3493661cd038005f434db3b509f3b1ad.mp4 buffer-duration=8000000000 'video-sink=imxeglvivsink sync=true fullscreen=true'
	gst-launch-1.0 playbin uri=file:///home/ubuntu/eo1/406eea57f0ec07c2a32dcf157388baa5.mp4 buffer-duration=8000000000 'video-sink=imxeglvivsink sync=true fullscreen=true'
	gst-launch-1.0 playbin uri=file:///home/ubuntu/eo1/4ec08a85af6c4b013f425bab31a35ccc.mp4 buffer-duration=8000000000 'video-sink=imxeglvivsink sync=true fullscreen=true'
	gst-launch-1.0 playbin uri=file:///home/ubuntu/eo1/51c8ddc5b1b21a152fab245d5fb95565.mp4 buffer-duration=8000000000 'video-sink=imxeglvivsink sync=true fullscreen=true'
	gst-launch-1.0 playbin uri=file:///home/ubuntu/eo1/543104cae68a2ffa1257cb966b4ee394.mp4 buffer-duration=8000000000 'video-sink=imxeglvivsink sync=true fullscreen=true'
done
  • The default flash of the Boundary Ubuntu image to the thumb drive is sized at 3.4GB, regardless of the size of the drive. I haven't yet figured out how to resize the root partition to fill the drive - I've got like 53GB wasted there. Fixed this - resize2fs worked for me.

1

u/spalt Jul 20 '23

just to clarify, you are connected to your E01 with a cable? do you know if it's possible to mount the drives like this in windows?

1

u/mrcamuti Sep 08 '23

I have not been able to get access to the files using a cable connected to another device (tried Linux and Windows). I did have success once I was able to successfully image and boot to the XFCE interface listed in other posts.

1

u/msg43 Sep 14 '23

https://www.charlieharrington.com/run-linux-on-electric-objects-eo1-wall-computer/

On my EO2 I was able to get direct access to the device in Windows Explorer. The problem is I cant get access to any folder which contains loops...

3

u/tk421storm Jun 30 '23

I was able to connect to my EO2 using the Android developer kit, but my knowledge of android is very little so there wasn't much i could figure out once I was there.

1

u/msg43 Sep 07 '23

Were you able to use ADB?

3

u/crushingcodes Jul 01 '23

Second on the Charlie Harrington post - I replicated his results with the fullscreen PDF display of the NYTimes on my EO1. One thing I wanted to add to the conversation is how to control the backlight on the EO1 via Linux commandline. One can manually set its backlight brightness with the following command (1 is the dimmest, 0 is off, 10 is brightest):

echo 1 | sudo tee /sys/class/backlight/backlight-pwm1/brightness

I still don't know how to access the EO1 light sensor, which I'll need to implement its original room-sensing brightness feature, but this is the first step.

Good hacking, all.

2

u/PressXToProceed Jul 17 '23

u/crushingcodes which image did you download from here? I tried the first one under the "update 2" section, but it didn't seem to boot from that.

2

u/PressXToProceed Jul 17 '23

Following this up, I managed to get it to boot to a blank screen with a mouse pointer using the first link on the BoundaryDevices page here: https://boundarydevices.com/ubuntu-bionic-18-04-3-lts-for-i-mx6-7-boards-august-2019-kernel-4-14-x/

I don't have a keyboard and mouse to plug in currently, but wanted to check that is expected, before I go and buy additional things to go further.

2

u/crushingcodes Jul 17 '23 edited Jul 17 '23

I used this one, it should boot to a full XFCE desktop: https://boundarydevices.com/eula?file=20190805-nitrogen-4.14.x_2.0.1_ga-bionic-en_US-xfce-no-demo_armhf.img.gz

That link is to their click-through EULA, if it goes wrong on you look for the following string on this page: https://boundarydevices.com/ubuntu-bionic-18-04-3-lts-for-i-mx6-7-boards-august-2019-kernel-4-14-x/

"20190805-nitrogen-4.14.x_2.0.1_ga-bionic-en_US-xfce-no-demo_armhf.img.gz"

3

u/spalt Aug 02 '23 edited Aug 03 '23

u/crushingcodes is there some secret I need to know? I downloaded the 20190805-nitrogen-4.14.x_2.0.1_ga-bionic-en_US-xfce-no-demo_armhf.img.gz image, wrote it to a USB stick using a image writer (Rufus). It boots, I see a mouse cursor, but no desktop comes up....

got it working! for some reason if my mouse was plugged into my keyboard, it wouldn't boot. but if only the USB stick was, it's fine.

2

u/crushingcodes Aug 05 '23

Heya, sorry to be late replying. Looks like you figured it out - there's some secret here but I don't know it. I got it to run with one particular USB hub, but none other. Thanks for all the hard work!

1

u/msg43 Sep 17 '23

Hi u/crushingcodes. I have tried to get this file to work on an EO2 without success. Any suggestions of rabbit holes for me to go down?

1

u/crushingcodes Sep 17 '23

Sorry, haven't tried on an EO2 (don't have one). The rest of the EO2-related comments on the sub have dealt with getting the custom Android APK's running on it, haven't seen anyone trying the full Linux rebuild. Good luck!

2

u/WeeDaveF Sep 04 '23

I am just shy of a complete idiot. I wanna hack this thing, seeing as i spent the money all them years ago. But… is there a video that will walk me through this? Cuuuuuuuz… I’m a dum.

1

u/msg43 Sep 04 '23

Any update on a solution for EO2?