u/Last-Dragonfruit9228

Cardputer ADV WebRadio v3.3.0 — sleep timer, playlists resolved, and https stations that play after all

**Playlists.**

Someone here pointed out that a `.pls` is just a note with the real stream URL on it. That is exactly right for `.pls` and plain `.m3u`, so the radio now reads the note and connects to what it finds. It is not right for `.m3u8`/HLS: that one holds a list of segments — `media_649.ts`, `media_650.ts` — that you would have to re-fetch every ten seconds and stitch together, with an MPEG-TS demuxer behind it. mpv and VLC do that through ffmpeg; a device with 13 to 23 KB of free heap does not. Those stations say `HLS - not supported` and leave it at that.

Measuring it was the interesting part: among the 250 most-clicked German stations, not one playlist arrives — the directory already resolves them. Among 120 Taiwanese stations, 21 do, and all 21 were HLS. So the resolver earns its keep on hand-entered stations, the kind you copy off a station's own page.

**https.**

The station directory files a lot of stations as https, and this device cannot do TLS — mbedTLS wants 32 KB of contiguous heap that does not exist here. So those stations were filtered out of the list entirely. Turns out that was the wrong conclusion: most of them are not https-only at all, only the listed as https, **80 of 80** serve the same audio over plain http — ten directly, seventy through a redirect that itself points at http. So the filter is gone and the address is simply rewritten and tried. Outside Germany it works less often (88 % UK, 74 % Taiwan, 72 % US, 66 % Poland), and where it fails the footer says `https not work`.

**Sleep timer.**

Menu → Sleeptime, set as `HH:MM` up to twelve hours, digit by digit — hours share an underline, each minute digit has its own. The remaining time counts down in the footer in yellow. At zero the stream stops and the display goes dark; the device stays on, and any key wakes it, restores the brightness it had and reconnects the station. The stream watchdog is suspended while it sleeps, otherwise it would treat the stopped stream as a dead one and dial back in within seconds.

Everything else is unchanged: 240 countries with a search field, a 5-band equalizer, CJK station names, VU meters and a 512-point FFT, and stations you can save to the SD card from the device itself.

Source, firmware and the full write-up of what does *not* work and why:

https://github.com/halbeshuhn/Cardputer-WebRadio

Board M5Cardputer, partition scheme Huge APP, PSRAM off. Built on the work of cyberwisk and WuSiU, decoding by earlephilhower's ESP8266Audio, station directory by radio-browser.info.

-------------------------------------------

Drei Sachen kamen aus den Rückmeldungen zur letzten Fassung, danke dafür.

**Wiedergabelisten.** Jemand wies darauf hin, dass in einer `.pls` doch die richtige Adresse drinsteht. Für `.pls` und einfache `.m3u` stimmt das genau, das Radio liest den Zettel jetzt und verbindet sich mit dem, was daraufsteht. Für `.m3u8`/HLS stimmt es nicht: dort steht eine Liste von Häppchen — `media_649.ts`, `media_650.ts` —, die man alle zehn Sekunden neu holen und aneinanderhängen müsste, dazu ein MPEG-TS-Demuxer. mpv und VLC machen das über ffmpeg; ein Gerät mit 13 bis 23 KB freiem Speicher macht es nicht. Solche Sender melden `HLS - not supported` und lassen es dabei.

Das Nachmessen war der interessante Teil: unter den 250 meistgeklickten deutschen Sendern kommt keine einzige Liste an, das Verzeichnis löst sie schon auf. Unter 120 taiwanesischen sind es 21 — und alle 21 waren HLS. Der Auflöser lohnt sich also für selbst eingetragene Sender, die man sich von der Senderseite kopiert.

**https.** Das Verzeichnis führt viele Sender als https, und TLS kann dieses Gerät nicht: mbedTLS will 32 KB am Stück, die es hier nicht gibt. Deshalb waren diese Sender bisher komplett aus der Liste gefiltert. Das war der falsche Schluss. Die meisten sind gar keine https-Sender, es steht bloß die https-Adresse in der Datenbank. Von den 80 meistgeklickten deutschen Sendern, die als https geführt sind, liefern **80 von 80** denselben Ton über plain http — zehn direkt, siebzig über eine Umleitung, die selbst wieder auf http zeigt. Der Filter ist also raus, die Adresse wird umgeschrieben und einfach versucht. Außerhalb Deutschlands klappt es seltener (88 % GB, 74 % Taiwan, 72 % USA, 66 % Polen), und wo nicht, sagt es die Fußzeile mit `https not work`.

**Sleeptimer.** Menü → Sleeptime, einzustellen als `HH:MM` bis zu zwölf Stunden, Stelle für Stelle — die Stunden teilen sich einen Strich, jede Minutenziffer hat ihren eigenen. Die Restzeit läuft unten links in Gelb rückwärts. Bei null hält der Stream an und der Schirm wird dunkel; das Gerät bleibt an, jede Taste weckt es, stellt die vorherige Helligkeit wieder her und holt den Sender zurück. Der Streamwächter ruht solange, sonst hielte er den angehaltenen Sender für tot und verbände sich nach Sekunden neu.

Alles andere wie gehabt: 240 Länder mit Suchfeld, 5-Band-Equalizer, CJK-Namen, VU-Meter und 512-Punkte-FFT, und Sender lassen sich vom Gerät aus auf die SD-Karte sichern.

Quelltext, Firmware und die vollständige Liste dessen, was *nicht* geht und warum: https://github.com/halbeshuhn/Cardputer-WebRadio

Board M5Cardputer, Partitionsschema Huge APP, PSRAM aus. Aufgebaut auf der Arbeit von cyberwisk und WuSiU, dekodiert wird mit ESP8266Audio von earlephilhower, das Senderverzeichnis kommt von radio-browser.info.

u/Last-Dragonfruit9228 — 3 days ago

Cardputer-WebRadio v3.3.0 - Teaser

New in v3.3.0

• Stationinfo with Stationlogo
• Sleeptimer
• modified audio library for more heap memory
• https:// -support enables even more radio stations.

...stay tuned!

u/Last-Dragonfruit9228 — 6 days ago

WebRadio v3.2.0 — 240 countries, station search, 5-band EQ

An internet radio for the Cardputer Adv that you never have to plug into a computer. The station directory is on the device, and it's searchable.

What's new in 3.2.0:

  • Search field for stations and countries. 240 countries, tens of thousands of stations — type tai, get Taiwan. No paging, no card reader, no hunting for stream URLs.
  • Foreign scripts are displayed. Chinese, Japanese, Korean, Greek, Cyrillic. Station names and stream titles come in as UTF-8 and are drawn in their own script instead of a row of ?.
  • 5-band equalizer, ±6 dB at 100 Hz / 350 Hz / 1 kHz / 3.5 kHz / 10 kHz, stored on the device, active from the next boot.
  • Save any station to the SD card from the menu — the card never leaves the slot.
  • Playlist streams are recognised and skipped instead of being fed to the decoder as noise.
  • Real VU meters and a 512-point FFT spectrum over the actual samples. Nothing here is random().

This release started with an issue from a listener in Taiwan: his country wasn't in the list, and everything he found showed up as ????. Fixing that properly took UTF-8 through the whole text path, the CJK fonts from M5GFX, and a search field — because a list of 240 countries is useless without one.

Honest limits: no https (mbedTLS wants ~32 KB this device doesn't have), AAC+ plays its base layer only, and the output is mono — the Adv has a mono codec, at the speaker and at the headphone jack alike.

Firmware, source and the full key map: https://github.com/halbeshuhn/Cardputer-WebRadio
Also in M5Burner as Cardputer WebRadio.

-------------------------------------------------

Ein Internetradio für den Cardputer Adv, das nie an einen Rechner muss. Das Senderverzeichnis steckt im Gerät — und es ist durchsuchbar.

Neu in 3.2.0:

  • Suchfeld für Sender und Länder. 240 Länder, zehntausende Sender — tai tippen, Taiwan steht da. Kein Blättern, kein Kartenleser, keine Suche nach Stream-Adressen.
  • Fremde Schriften werden angezeigt. Chinesisch, Japanisch, Koreanisch, Griechisch, Kyrillisch. Sendernamen und Streamtitel kommen als UTF-8 herein und werden in ihrer eigenen Schrift gezeichnet statt als Reihe von ?.
  • 5-Band-Equalizer, ±6 dB bei 100 Hz / 350 Hz / 1 kHz / 3,5 kHz / 10 kHz, im Gerät gespeichert und ab dem nächsten Start wirksam.
  • Jeden Sender aus dem Menü heraus auf die SD-Karte sichern — die Karte bleibt drin, wo sie ist.
  • Wiedergabelisten werden erkannt und übersprungen, statt dem Decoder als Rauschen vorgeworfen zu werden.
  • Echte VU-Meter und ein 512-Punkte-FFT-Spektrum über die tatsächlichen Abtastwerte. Nichts davon ist random().

Angefangen hat diese Fassung mit einer Meldung aus Taiwan: Das Land fehlte in der Liste, und was er fand, stand als ???? da. Das ordentlich zu lösen hat UTF-8 durch den ganzen Textweg gebraucht, die CJK-Schriften aus M5GFX — und ein Suchfeld, weil eine Liste mit 240 Ländern ohne eines nichts taugt.

Ehrliche Grenzen: kein https (mbedTLS will rund 32 KB, die das Gerät nicht hat), AAC+ nur als Basisschicht, und der Ton ist mono — der Adv hat einen Mono-Codec, am Lautsprecher wie an der Klinkenbuchse.

Firmware, Quelltext und die vollständige Tastenbelegung: https://github.com/halbeshuhn/Cardputer-WebRadio
Außerdem im M5Burner als Cardputer WebRadio.

u/Last-Dragonfruit9228 — 7 days ago