/tech/ - Technology

Technology & Computing


New Reply[×]
Name
Sage
Subject
Message
Files Max 5 files32MB total
Tegaki
Password
Captcha*Select the solid/filled icons
[New Reply]


acf7c76504dffb0c45aace417b12a90d093683cf744d8de70b48d8910ca30a58.jpg
[Hide] (115.2KB, 1280x1832)
I have a lot of books and documents I want to read but I would prefer to do so on a device that doesn't emit bright light all the time and is portable as well.

An e-reader seems like the best option, but I know little about them and I have a hard time figuring out what to get. My requirements are:
- FOSS operating system, as I want to possess full control over my devices.
- Good durability (/price). This is my biggest concern. From what I understand the cells can only be toggled a limited amount of times. I don't intend to watch anything animated on it but I can see myself burning through quickly if flipping through a lot of pages.
- Ideally a touchscreen + pen, though I can live without it.

I'm also considering rigging one together myself, but finding a screen of appreciable size is hard and the few I do find cost as much as a whole e-reader.
>>17825 (OP) 
Just avoid amazon kindle, which are proprietary trash that can't even accept normal formats. Kobo should be a good brand.
2a56dbbce664669ceab74858f83531f007f81e73cfe91d321b7231d5e4149dcf.jpg
[Hide] (107.5KB, 606x600)
>>17825 (OP) 
The other anon is right, avoid the Swindle. Kobo is good enough if you care about reading books more than doing a puritan freetard LARP. They're proprietary, but the benign kind of proprietary where it's not full of anti-features like ads and DRM, and you can just transfer any document format it supports through USB-C (including EPUB), and do other things like transferring custom dictionaries, all unlike Swindle. You can even install programs like KOReader, but the default software is fine enough for me.
Replies: >>17829 >>17831
>>17828
P.S.: Kobos require you to create an account or log in on first launch (or at least my model did), but you can bypass that and hide menus related to online services (such as the e-book store) by plugging the e-reader into your computer and editing an SQL database (you can look it up).
Replies: >>17831
>>17829
>>17828
Supposedly pre-secureboot Kobo ereaders also have good aftermarket OSes you can flash onto the device, but I can't speak for these personally as I've never installed one. What I can say is that the base OS is pretty reasonable, and having support for comic book archives out of the box is pretty sweet.
Inkplate_10_[500122246].mp4
[Hide] (20.9MB, 1280x720, 01:24)
>>17825 (OP) 
https://www.crowdsupply.com/soldered
https://www.crowdsupply.com/diptyx/diptyx-e-reader
I'm planing to buy Inkplate 10 to read books and mangos.
Replies: >>17839
real1_png_gallery-lg.jpg
[Hide] (326.4KB, 3000x1688)
inkplate-6-color-in-hand-fixdimg-nocrop_jpg_gallery-lg.jpg
[Hide] (327.7KB, 3000x1693)
>>17838
Thanks, the Inkplate 10 looks pretty much perfect for my needs.
It's lacking in buttons(/touchscreen) but it has a bunch of GPIOs free, so I can hack something on myself if necessary.

The 6COLOR looks fun too. If I'm satisfied with the Inkplate 10 I might get it as a gift.
c8c1e1092931c0b09bea06822a64bde891684678d077326ec77ad3f6056e2be6.png
[Hide] (234.9KB, 1473x621)
Apparently you can order directly from their own website (https://soldered.com/) and it should ship from within the EU so I did just that.
I got the full kit (display + battery + enclosure for €220). It should arrive in 4-5 days, I'll post an update around then.
922651b770f3a5a5c1e64dec48d01ca10f79e7b3b9273272d653d75178e4b576.jpg
[Hide] (4.2MB, 4032x3024)
9e9f4a34f6ed4755f13bde82ca65bfb7e0ce819e7fe0670829c38abbdc9d35e0.jpg
[Hide] (3.7MB, 4032x3024)
no_buttons.jpg
[Hide] (425.7KB, 2000x1200)
Inkplate 10 arrived! Haven't gotten to using it yet but I must note a few things.

First: there are NO TOUCHPADS. Apparently only the first (blue) boards had them, the new purple has ONE "wake" button. Buttons cost not even pennies, would it kill them to add literally two more buttons? I'll make-do with the singular button for now...
It seems the only reason they did this is to make the PCB a bit tinier, which is annoying as fuck because the GPIOs are now super close to the display. I'll have to be very careful soldering pins/wires to it.

Second: it doesn't seem anyone has written e-reader software yet. That's fine though, as I anticipated this. The library looks extensive enough that I should be able to hack something together over a short weekend.

Third: the casing appears to be made out of PLA. PLA is a horrendous choice for basically anything that's not a static art object because it is very prone to breaking. To make matters worse them seem to have optimized settings for ease of printing, not strength. I already broke at least two tabs opening the casing and a couple more when closing it again. It broke along the layer lines of course. You also need to open the casing to access the SD card slot, so not something you can avoid. Oh, and the battery is clearly loose, a tiny bit of tape would help methinks.

tl;dr
facbeb971de736a298d17acb8ae00577205d1d14330f4b16c30f5db545b3bc4e.jpg
[Hide] (5.2MB, 3024x4032)
a7c4d6f00630006d5ca43f3be40efb08b84ac44997500f907cfe0ce6a18d7d3b.jpg
[Hide] (5.4MB, 3024x4032)
6fb0e798f3f3ae93d9b25c40cf219953694fbce1b8bd24847e9534a536dd6c37.jpg
[Hide] (4.4MB, 3024x4032)
4b60cee1322596b854ec67e7b7b10700404928217ac6657a1ab78a38d081635c.jpg
[Hide] (4.2MB, 3024x4032)
4489902942ae376f522bed6cbf9e1037b6bc9efa8b80f7d7ff10d24e63603d29.png
[Hide] (33.6KB, 966x308)
I've hacked something together that's good enough for now. I can go forward with a single press and back with double press (I keep long press reserved for other functionality). Going back is a bit awkward though, since waking from deep sleep is slow and you need to time the presses properly for it to register (I'd say ~1/3s press, ~1/3 release then 1/3 press again).
The documentation is atrocious. They seem to have nuked their previous documentation and replaced it with something that's blatantly incomplete. I wouldn't be surprised if it's partially "AI" generated. Their own README's have a bunch of links that are dead. e.g.:
>We support peripheral mode over UART! The commands are listed here [dead link]
Amazing...

The examples are better, though still nonsensical in a lot of places. e.g. the example that loads from HTTP manually does a lot of manual work, including pointless double buffering on the stack, while making no mention they provide a downloadFile function.
You need to be careful with having both WiFi turned on and drawing to the display. It seems a brownout occurs and the MCU resets because both the display and the WiFi slurp a lot of power. Digging through the provided library I see that WiFi gets taken out of sleep at the start downloadFile, then back to sleep if it was (and not if it wasn't). I just put the WiFi immediately to sleep right after connecting which is stupid but an easy hack.

Loading PNG images is very slow. I first thought something was wrong with their HTTPClient since I could see the request in the log, yet needed to wait multiple seconds for the image to appear. However, it takes multiple seconds to load an image from SD card too. Poorly optimized PNG decoder I guess?
FWIW I found that with 3-bit grayscale PNG compresses significantly better than JPEG. Yet, most images hover around 200KiB, while  1200*825*3/8=371250 bytes if you were to use raw bits to store the image. It probably makes sense to use a custom format with lightweight compression on top.

In any case, here's the code I cobbled together. I plan to make something more advanced, where the Inkplate is basically a dumb terminal for my desktop PC, but I'm not going to use arduino-cli for it since I find Arduino wrappers to be shit. Too bad the Inkplate library is specifically designed for "Arduino IDE". By the way, I did find e-reader software https://github.com/turgu1/EPub-InkPlate but I don't seem able to convert from PDF to EPUB properly, hence why I just convert to images and display that. For now this suffices.

(python3 -m http.server is pretty useful)

# ImageBook

A very simple program to fetch and display images from a server on an e-paper
device. Most useful with books converted to PNG/JPEG images.

## Build & install

First install dependencies (adjust for distro as needed):

    apk add bash libc6-compat python3 py3-pyserial

Also get [Arduino CLI][arduino-cli]. Then:

    arduino-cli lib install InkplateLibrary
    arduino-cli core install Inkplate_Boards:esp32
    # adjust FQBN if necessary
    arduino-cli compile -b Inkplate_Boards:esp32:Inkplate10V2

Make sure the board is turned on (blue LED). Install with:

    arduino-cli upload -p /dev/ttyUSB0 -b Inkplate_Boards:esp32:Inkplate10

## Converting PDFs to images

Install ImageMagick. Then:

    convert -density 212 /path/to/input.pdf -dither FloydSteinberg -quality 80 -resize 1200x825 -colorspace Gray -colors 8 %05d.png

#include <Inkplate.h>
#include <WiFi.h>
#include <esp_wifi.h>
#include "config.h"


static const gpio_num_t WAKE_BUTTON = GPIO_NUM_36;

// we need this to survive deep sleep.
// use -1 as we do incr-/decrement before load_image()
RTC_DATA_ATTR static uint16_t page_idx = -1;

static char path[512];

static Inkplate display(INKPLATE_3BIT);

void wifi_connect(void) {
  display.connectWiFi(WIFI_SSID, WIFI_PASSWORD, 10, false);
  // sleep by default to reduce risks of brownout during display update
  WiFi.setSleep(true);
}

void wifi_wait(void) {
  return;
  while (WiFi.status() != WL_CONNECTED) {
    delay(100);
  }
}

void load_image() {
  snprintf(path, sizeof path - 1, HTTP_URL_BASE"/%03d.png", page_idx);
  path[sizeof path - 1] = 0; // always nul-terminate out of caution
  /*
  display.print("loading ");
  display.println(path);
  display.display();
  display.clearDisplay();
  */
  //wifi_wait();
  if (!display.drawImage(path, 0, 0, false)) {
    display.println(path);
    display.println("Image open error");
  }
  display.display();
}

_Noreturn void deep_sleep(void) {
  // note that deep sleep *shuts off the CPU and RAM*
  // which is why we never, ever reach loop()
  esp_sleep_enable_ext0_wakeup(WAKE_BUTTON, LOW);
  esp_deep_sleep_start();
}

// this is dumb but idgaf
bool detect_second_press() {
  delay(10); // just wait 10ms for debounce
  int timeout = 49; // * 10ms
  bool was_on = true;
  while (timeout-- > 0) {
    // low = pressed
    bool is_on = !digitalRead(WAKE_BUTTON);
    if (is_on && !was_on)
      return true;
    was_on = is_on;
    delay(10);
  }
  return false;
}

void setup() {
  display.begin();
  display.setRotation(1); // portrait mode
  display.clearDisplay();
  display.setTextColor(BLACK);
  display.setCursor(10,10);
  display.setTextSize(3);

  if (detect_second_press())
    page_idx--;
  else
    page_idx++;

  if (display.sdCardInit()) {
    //wifi_connect();
    load_image();
  } else {
    display.println("SD card init failed");
    display.display();
  }
  deep_sleep();
}

void loop() {
  // never runs because of deep_sleep()
}

#pragma once

// must be 2.4 GHz!
#define  WIFI_SSID        "name"
#define  WIFI_PASSWORD    "password"

//#define  HTTP_URL_BASE    "http://192.168.1.999:8000"
#define  HTTP_URL_BASE    "/images"

Oh, they claim the Inkplate 10 is "not suitable as e-reader". Deceptive marketing?
Replies: >>17899 >>17906
6789678998.gif
[Hide] (1MB, 350x324)
>>17897
>Oh, they claim the Inkplate 10 is "not suitable as e-reader". Deceptive marketing?
So what the fuck is it good for?
Replies: >>17904
>>17899
An educational experience, like falling off your bicycle or buying a Mac.
>>17897
From the problems you described, I assumed it must have some kind of dinky 8-bit microcontroller like an AVR or PIC, but no, it's got 8MB RAM and an Xtensa LX7 740MHz 32-bit VLIW, equivalent to dual PII/400.

I guess the provided libraries are just astoundingly unoptimized
Replies: >>17914
>>17906
>Xtensa LX7 740MHz 32-bit VLIW
This one doesn't have that, assuming I have the right datasheet.
BOM here says ESP32-WROVER https://github.com/SolderedElectronics/Soldered-Inkplate-10-hardware-design/blob/main/OUTPUTS/V1.3.1/Soldered%20Inkplate%2010%20BOM.csv
Assuming it's the -E variant: https://documentation.espressif.com/esp32-wrover-e_esp32-wrover-ie_datasheet_en.pdf
>ESP32-D0WD-V3 or ESP32-D0WDR2-V3 embedded, Xtensa dual-core 32-bit LX6 microprocessor, up to 240 MHz
... which should still be pretty fast. The Inkplate library uses pngle https://github.com/SolderedElectronics/Inkplate-Arduino-library/tree/master/src/libs/pngle which is optimized for MCUs with little memory. Probably not the best choice for an ESP32 which does actually have a lot of memory.
[New Reply]
13 replies | 15 files
Connecting...
Show Post Actions

Actions:

Captcha:

Select the solid/filled icons
- news - rules - faq -
jschan 1.7.3