gitpeut / OranjeRadio

web radio with VS1053 and gesture control using PAJ7620
Apache License 2.0
4 stars 0 forks source link

vs1053 lib? #1

Open Aleks-Ale opened 3 years ago

Aleks-Ale commented 3 years ago

hello! Which VS1053 lib used?

githubOranjeRadio:395:35: error: 'class VS1053' has no member named 'isChipConnected'
       bool   isconnected = player.isChipConnected();
                                   ^
patchVS1053:1560:43: error: within this context
     player.write_register(atab[i], dtab[i]);
                                           ^
gitpeut commented 3 years ago
HI,Sorry, this one : https://github.com/baldram/ESP_VS1053_LibraryI’ll update the description in a minute.   From: Aleks-AleSent: woensdag 13 januari 2021 14:22To: gitpeut/OranjeRadioCc: SubscribedSubject: [gitpeut/OranjeRadio] vs1053 lib? (#1) hello! Which VS1053 lib used?githubOranjeRadio:395:35: error: 'class VS1053' has no member named 'isChipConnected'       bool   isconnected = player.isChipConnected();                                   ^patchVS1053:1560:43: error: within this context     player.write_register(atab[i], dtab[i]);                                           ^—You are receiving this because you are subscribed to this thread.Reply to this email directly, view it on GitHub, or unsubscribe. 
Aleks-Ale commented 3 years ago

HI,Sorry, this one : https://github.com/baldram/ESP_VS1053_Library

Me too, I will try again… Do you have a plan to integrate a spectrum analyzer? For example like this: https://github.com/blotfi/ESP32-Radio-with-Spectrum-analyzer

gitpeut commented 3 years ago

No, never thought about integrating a spectrum analuzer. I just wanted a hands free radio 😁

Op wo 13 jan. 2021 15:39 schreef Aleks-Ale notifications@github.com:

HI,Sorry, this one : https://github.com/baldram/ESP_VS1053_Library https://github.com/baldram/ESP_VS1053_LibraryI%E2%80%99ll

Me too, I will try again… Do you have a plan to integrate a spectrum analyzer? For example like this: https://github.com/blotfi/ESP32-Radio-with-Spectrum-analyzer

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/gitpeut/OranjeRadio/issues/1#issuecomment-759491053, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGEQRY2GUWA3XQ3ARRBDMB3SZWWC3ANCNFSM4WAZQFRA .

Aleks-Ale commented 3 years ago

I just wanted a hands free radio

Really cool job! can play http and https? I'm looking your code.

int add_station( char *name, int protocol, char *host, char* path, int port ){
int i;

for ( i = 0; i< STATIONSSIZE; ++i ){
        if ( stations[i].status == 0 ){
                stations[i].name =  ps_strdup( name);
                stations[i].host =  ps_strdup( host);
                stations[i].path =  ps_strdup( path);
                stations[i].port = port;
                stations[i].protocol = protocol;           <--------?
                stations[i].position = 0;           <--------?
                stations[i].status = 1;           <--------?
                break;
        }
}

add_station("NPO Radio 1","icecast.omroep.nl","/radio1-bb-mp3",80); // Name, host, path, port ....

Do you mean http/https as protocol ? What is position and status? Please show full row for add_station.

gitpeut commented 3 years ago

Should be playing both http and https streams, but many https streams are encoded in a different way ( forgot the name) and I did not implement that.

Op wo 13 jan. 2021 17:36 schreef Aleks-Ale notifications@github.com:

I just wanted a hands free radio

You did a really cool job! can play http and https? I'm looking your code.

int add_station( char name, int protocol, char host, char* path, int port ){ int i;

for ( i = 0; i< STATIONSSIZE; ++i ){ if ( stations[i].status == 0 ){ stations[i].name = ps_strdup( name); stations[i].host = ps_strdup( host); stations[i].path = ps_strdup( path); stations[i].port = port; stations[i].protocol = protocol; <--------? stations[i].position = 0; <--------? stations[i].status = 1; <--------? break; } }

add_station("NPO Radio 1","icecast.omroep.nl","/radio1-bb-mp3",80); // Name, host, path, port ....

Do you mean http/https as protocol ? What is position and status? Please show full row for add_station.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/gitpeut/OranjeRadio/issues/1#issuecomment-759569376, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGEQRYY2TWVJOXE6CFT7G5DSZXDXJANCNFSM4WAZQFRA .

Aleks-Ale commented 3 years ago

Do you mean http/https as "protocol" ? What is "position" and "status"? Please show full row for add_station.

int add_station( char *name, int protocol, char *host, char* path, int port ){
 int i;

 for ( i = 0; i< STATIONSSIZE; ++i ){
         if ( stations[i].status == 0 ){
                 stations[i].name =  ps_strdup( name);
                 stations[i].host =  ps_strdup( host);
                 stations[i].path =  ps_strdup( path);
                 stations[i].port = port;
                 stations[i].protocol = protocol;           <--------?
                 stations[i].position = 0;           <--------?
                 stations[i].status = 1;           <--------?
                 break;
         }
 }

 add_station("NPO Radio 1","icecast.omroep.nl","/radio1-bb-mp3",80); // Name, host, path, port ....
Aleks-Ale commented 3 years ago

Only one error after compilation. Could you please help me run your project.

void patchVS1053(void) {
int rv=0;
   rv = read_VS1053_patches();
   if (rv ) return;

   for (int i=0;i < PATCH_CODE_SIZE;i++) {
    player.write_register(atab[i], dtab[i]);           <=======!!!
   }

   free(atab);
   free(dtab);

   delay(500);
   Serial.printf("Applied VS1053 patches\n" );
}

\libraries\ESP_VS1053_Library-master\src/VS1053.h:103:10: error: 'void VS1053::write_register(uint8_t, uint16_t) const' is protected void write_register(uint8_t _reg, uint16_t _value) const;

patchVS1053:1560:43: error: within this context player.write_register(atab[i], dtab[i]);

gitpeut commented 3 years ago

/**

ifndef VS1053_H

define VS1053_H

include

include

include "ConsoleLogger.h"

class VS1053 { private: uint8_t cs_pin; // Pin where CS line is connected uint8_t dcs_pin; // Pin where DCS line is connected uint8_t dreq_pin; // Pin where DREQ line is connected uint8_t curvol; // Current volume setting 0..100% const uint8_t vs1053_chunk_size = 32; // SCI Register const uint8_t SCI_MODE = 0x0; const uint8_t SCI_STATUS = 0x1; const uint8_t SCI_BASS = 0x2; const uint8_t SCI_CLOCKF = 0x3; const uint8_t SCI_AUDATA = 0x5; const uint8_t SCI_WRAM = 0x6; const uint8_t SCI_WRAMADDR = 0x7; const uint8_t SCI_AIADDR = 0xA; const uint8_t SCI_VOL = 0xB; const uint8_t SCI_AICTRL0 = 0xC; const uint8_t SCI_AICTRL1 = 0xD; const uint8_t SCI_num_registers = 0xF; // SCI_MODE bits const uint8_t SM_SDINEW = 11; // Bitnumber in SCI_MODE always on const uint8_t SM_RESET = 2; // Bitnumber in SCI_MODE soft reset const uint8_t SM_CANCEL = 3; // Bitnumber in SCI_MODE cancel song const uint8_t SM_TESTS = 5; // Bitnumber in SCI_MODE for tests const uint8_t SM_LINE1 = 14; // Bitnumber in SCI_MODE for Line input SPISettings VS1053_SPI; // SPI settings for this slave uint8_t endFillByte; // Byte to send when stopping song protected: inline void await_data_request() const { while (!digitalRead(dreq_pin)) { yield(); // Very short delay } }

inline void control_mode_on() const {
    SPI.beginTransaction(VS1053_SPI);   // Prevent other SPI users
    digitalWrite(dcs_pin, HIGH);        // Bring slave in control mode
    digitalWrite(cs_pin, LOW);
}

inline void control_mode_off() const {
    digitalWrite(cs_pin, HIGH);         // End control mode
    SPI.endTransaction();               // Allow other SPI users
}

inline void data_mode_on() const {
    SPI.beginTransaction(VS1053_SPI);   // Prevent other SPI users
    digitalWrite(cs_pin, HIGH);         // Bring slave in data mode
    digitalWrite(dcs_pin, LOW);
}

inline void data_mode_off() const {
    digitalWrite(dcs_pin, HIGH);        // End data mode
    SPI.endTransaction();               // Allow other SPI users
}

// uint16_t read_register(uint8_t _reg) const;

void sdi_send_buffer(uint8_t *data, size_t len);

void sdi_send_fillers(size_t length);

void wram_write(uint16_t address, uint16_t data);

uint16_t wram_read(uint16_t address);

public: // Constructor. Only sets pin values. Doesn't touch the chip. Be sure to call begin()! VS1053(uint8_t _cs_pin, uint8_t _dcs_pin, uint8_t _dreq_pin);

void begin();                               // Begin operation.  Sets pins correctly,
                                            // and prepares SPI bus.
void startSong();                           // Prepare to start playing. Call this each
                                            // time a new song starts.
void playChunk(uint8_t *data, size_t len);  // Play a chunk of data.  Copies the data to
                                            // the chip.  Blocks until complete.
void stopSong();                            // Finish playing a song. Call this after
                                            // the last playChunk call.
void setVolume(uint8_t vol);                // Set the player volume.Level from 0-100,
                                            // higher is louder.
void setTone(uint8_t *rtone);               // Set the player baas/treble, 4 nibbles for
                                            // treble gain/freq and bass gain/freq
uint8_t getVolume();                        // Get the currenet volume setting.
                                            // higher is louder.
void printDetails(const char *header);      // Print configuration details to serial output.
void softReset();                           // Do a soft reset
bool testComm(const char *header);          // Test communication with module
inline bool data_request() const {
    return (digitalRead(dreq_pin) == HIGH);
}

void switchToMp3Mode();

bool isChipConnected();

void write_register(uint8_t _reg, uint16_t _value) const; //jb to apply patches
uint16_t read_register(uint8_t _reg) const;

};

endif

gitpeut commented 3 years ago
Protocol is an int. 0 is http, 1 is https Position  is used to keep track of chunks received during reception of a station, not to be filled out in advance.Status is used as an intermediate field. If a station is deleted in the Web UI, status will be zero and not be written to the stations file.When the file is read again, the station will not be shown again.   From: Aleks-AleSent: woensdag 13 januari 2021 18:19To: gitpeut/OranjeRadioCc: Jose Baars; CommentSubject: Re: [gitpeut/OranjeRadio] vs1053 lib? (#1) Do you mean http/https as "protocol" ? What is "position" and "status"?Please show full row for add_station.int add_station( char *name, int protocol, char *host, char* path, int port ){ int i;  for ( i = 0; i< STATIONSSIZE; ++i ){         if ( stations[i].status == 0 ){                 stations[i].name =  ps_strdup( name);                 stations[i].host =  ps_strdup( host);                 stations[i].path =  ps_strdup( path);                 stations[i].port = port;                 stations[i].protocol = protocol;           <--------?                 stations[i].position = 0;           <--------?                 stations[i].status = 1;           <--------?                 break;         } }  add_station("NPO Radio 1","icecast.omroep.nl","/radio1-bb-mp3",80); // Name, host, path, port .... —You are receiving this because you commented.Reply to this email directly, view it on GitHub, or unsubscribe. 
Aleks-Ale commented 3 years ago

Thx! A few more fixes and no more compilation errors. Thank you. I will try to buy a gesture sensor soon.

gitpeut commented 3 years ago

Good luck!

Op wo 13 jan. 2021 21:44 schreef Aleks-Ale notifications@github.com:

Thx! A few more fixes and no more compilation errors. Thank you. I will try to buy a gesture sensor soon.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/gitpeut/OranjeRadio/issues/1#issuecomment-759728005, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGEQRY65VTZHYNNVAPTHAZDSZYA2DANCNFSM4WAZQFRA .

Aleks-Ale commented 3 years ago

if you want to add a spectrum analyzer, just for fun, I will be very grateful to you. This is a small but interesting feature. 2021-01-14_00-03-56

// spectrumAnalyzerAppl1053b-2.plg
// results in XRAM 0x1810 .. 0x1877
#define BASE 0x1810
void VS1053::getBands()
{
  write_register(SCI_WRAMADDR, BASE + 2);
  bands = read_register(SCI_WRAM);
  write_register(SCI_WRAMADDR, BASE + 4);
  for (uint8_t i = 0; i < 14; i++) {
    uint8_t val = read_register(SCI_WRAM);
    /* current value in bits 5..0, normally 0..31
      peak value in bits 11..6, normally 0..31 */
    uint8_t cur1 = val & 31;
    uint8_t cur = (cur1 * curvol) / 30; // big bars
    if ( cur < 0 ) cur = 0;
    else if ( cur > (Spectrum_hy - 4) ) cur = Spectrum_hy - 4;
    spectrum[i][0] = cur;
  }
}
gitpeut commented 3 years ago
Hi,I will look into that in the future, looks very doable.At the moment I am working on some other projects so it will not be soon.   From: Aleks-AleSent: woensdag 13 januari 2021 22:05To: gitpeut/OranjeRadioCc: Jose Baars; CommentSubject: Re: [gitpeut/OranjeRadio] vs1053 lib? (#1) if you want to add a spectrum analyzer, just for fun, I will be very grateful to you.This is a small but interesting feature.// spectrumAnalyzerAppl1053b-2.plg// results in XRAM 0x1810 .. 0x1877#define BASE 0x1810void VS1053::getBands(){  write_register(SCI_WRAMADDR, BASE + 2);  bands = read_register(SCI_WRAM);  write_register(SCI_WRAMADDR, BASE + 4);  for (uint8_t i = 0; i < 14; i++) {    uint8_t val = read_register(SCI_WRAM);    /* current value in bits 5..0, normally 0..31      peak value in bits 11..6, normally 0..31 */    uint8_t cur1 = val & 31;    uint8_t cur = (cur1 * curvol) / 30; // big bars    if ( cur < 0 ) cur = 0;    else if ( cur > (Spectrum_hy - 4) ) cur = Spectrum_hy - 4;    spectrum[i][0] = cur;  }}—You are receiving this because you commented.Reply to this email directly, view it on GitHub, or unsubscribe. 
Aleks-Ale commented 3 years ago

Thank you! Have a nice day!

Aleks-Ale commented 3 years ago

I'm sorry to bother you. I am trying to run a spectrum analyzer. Just one question so far. I don't know how to connect an array spectrum[14][3] to a function getBands. I don't know the syntax for connect an array. Can You help please?

githubOranjeRadio.ino

uint8_t bands = 14; // Number of bands Spectrum Analyzer
uint8_t spectrum[14][3]; // Array per Spectrum Analyzer
const uint8_t Spectrum_hy = 70; 

player.getBands(bands, Spectrum_hy, spectrum[14][3] ) ; // <-----------------

VS1053.h

// inline void getBands();
inline void getBands(uint8_t bands, const uint8_t Spectrum_hy, uint8_t *spectrum [14][3]);  //<-----------------

VS1053.cpp

// spectrumAnalyzerAppl1053b-2.plg
// results in XRAM 0x1810 .. 0x1877
#define BASE 0x1810
// void VS1053::getBands()
void VS1053::getBands(uint8_t bands, const uint8_t Spectrum_hy, uint8_t *spectrum [14][3]) //<-----------------
{
  write_register(SCI_WRAMADDR, BASE + 2);
  bands = read_register(SCI_WRAM);
  write_register(SCI_WRAMADDR, BASE + 4);
  for (uint8_t i = 0; i < 14; i++) {
    uint8_t val = read_register(SCI_WRAM);
    /* current value in bits 5..0, normally 0..31
      peak value in bits 11..6, normally 0..31 */
    uint8_t cur1 = val & 31;
    uint8_t cur = (cur1 * curvol) / 30; // big bars
    if ( cur < 0 ) cur = 0;
    else if ( cur > (Spectrum_hy - 4) ) cur = Spectrum_hy - 4;
    spectrum[i][0] = cur;
  }
}
gitpeut commented 3 years ago
Hi, If the spectrum array is already global, there is no need to use it as a function parameter, you can access it directly from the function getBands.But if you don’t want these variables to be global, define the getBands function like this:void getBands(uint8_t bands, const uint8_t Spectrum_hy, uint8_t spectrum[][3]) The function can be called like this:getBands( bands, Spectrum_hy, spectrum );The compiler does no bounds checking on parameters, so silly little mistakes like accessing spectrum[14] will cause a reset.Fyi Testing c++ syntax is much more comfortable on a PC than on an  ESP. I used Codelite, a simple and light IDE.Attached my test program.     From: Aleks-AleSent: donderdag 14 januari 2021 21:33To: gitpeut/OranjeRadioCc: Jose Baars; CommentSubject: Re: [gitpeut/OranjeRadio] vs1053 lib? (#1) I'm sorry to bother you.I am trying to run a spectrum analyzer. Just one question so far.I don't know how to connect an array spectrum[14][3] to a function getBands.I don't know the syntax for connect an array.Can You help please?githubOranjeRadio.inouint8_t bands = 14; // Number of bands Spectrum Analyzeruint8_t spectrum[14][3]; // Array per Spectrum Analyzerconst uint8_t Spectrum_hy = 70;  player.getBands(bands, Spectrum_hy, spectrum[14][3] ) ;VS1053.hinline void getBands(uint8_t bands, const uint8_t Spectrum_hy, uint8_t *spectrum [14][3]);VS1053.cpp// spectrumAnalyzerAppl1053b-2.plg// results in XRAM 0x1810 .. 0x1877#define BASE 0x1810void VS1053::getBands(uint8_t bands, const uint8_t Spectrum_hy, uint8_t *spectrum [14][3]){  write_register(SCI_WRAMADDR, BASE + 2);  bands = read_register(SCI_WRAM);  write_register(SCI_WRAMADDR, BASE + 4);  for (uint8_t i = 0; i < 14; i++) {    uint8_t val = read_register(SCI_WRAM);    /* current value in bits 5..0, normally 0..31      peak value in bits 11..6, normally 0..31 */    uint8_t cur1 = val & 31;    uint8_t cur = (cur1 * curvol) / 30; // big bars    if ( cur < 0 ) cur = 0;    else if ( cur > (Spectrum_hy - 4) ) cur = Spectrum_hy - 4;    spectrum[i][0] = cur;  }}—You are receiving this because you commented.Reply to this email directly, view it on GitHub, or unsubscribe. 
Aleks-Ale commented 3 years ago

Attached my test program.

Hi, thank you! Where I can find it?

gitpeut commented 3 years ago

Test woud bebattached to the mail. I dus notntry a full implementation on the esp32.

Op za 16 jan. 2021 15:48 schreef Aleks-Ale notifications@github.com:

Attached my test program.

Hi, thank you! Where I can find it?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/gitpeut/OranjeRadio/issues/1#issuecomment-761575519, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGEQRY3VVD4G7GFOJ67XB53S2GRNVANCNFSM4WAZQFRA .

Aleks-Ale commented 3 years ago

Hi, can OranjeRadio run without gesture sensor and LEDs? I have connected ESP 32-WROOM, VS1053 and a screen. 2021-01-18_00-12-14 I have commented out the sensor initialization line.

//     Serial.println("Gesture init");
//    if ( gesture_init() ) Serial.println ( "FAILED to init gesture control");

2021-01-18_00-27-18

gitpeut commented 3 years ago
Yes, should possible. You could use the Exception monitor to find out a little more where the panic comes from. But I have been testing without gesturecontrol last year. I published it just now to GitHub here:https://github.com/gitpeut/GeleRadio Try and see what happens. Goor Luck!   From: Aleks-AleSent: zondag 17 januari 2021 22:29To: gitpeut/OranjeRadioCc: Jose Baars; CommentSubject: Re: [gitpeut/OranjeRadio] vs1053 lib? (#1) Hi, can OranjeRadio run without gesture sensor and LEDs?I have connected ESP 32-WROOM, VS1053 and a screen.I have commented out the sensor initialization line.//     Serial.println("Gesture init");//    if ( gesture_init() ) Serial.println ( "FAILED to init gesture control");—You are receiving this because you commented.Reply to this email directly, view it on GitHub, or unsubscribe. 
Aleks-Ale commented 3 years ago

here:https://github.com/gitpeut/GeleRadio 1. 2021-01-18_01-34-28 But after comment

// initPixels();

2021-01-18_01-47-38

Something wrong here?

player.startSong();

  while ( uxQueueMessagesWaiting(playQueue) <  (PLAYQUEUESIZE/2) ) {
gitpeut commented 3 years ago

Probably after they. Please die esp exception decoder to get a better idea.

I'll dig up my breadboard and try soon. I'm sure I had it working, but it's not rock solid.

Op ma 18 jan. 2021 00:04 schreef Aleks-Ale notifications@github.com:

here:https://github.com/gitpeut/GeleRadio

1.

[image: 2021-01-18_01-34-28] https://user-images.githubusercontent.com/69778440/104858018-75d18d80-592d-11eb-9895-c3a502f78e6f.png But after comment

// initPixels();

[image: 2021-01-18_01-47-38] https://user-images.githubusercontent.com/69778440/104858321-44f25800-592f-11eb-881e-407d49f263ef.png

Something wrong here?

player.startSong();

while ( uxQueueMessagesWaiting(playQueue) < (PLAYQUEUESIZE/2) ) {

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/gitpeut/OranjeRadio/issues/1#issuecomment-761896652, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGEQRYZ242KDTF5NASDULDLS2NUH5ANCNFSM4WAZQFRA .

Aleks-Ale commented 3 years ago

esp exception decoder

Thank you! :) I know about decoder now. :) 2021-01-18_04-32-47 2021-01-18_04-33-20 2021-01-18_04-34-02

gitpeut commented 3 years ago

Hm. Have you uploaded the stations file to the SPIFFS partition? The code does not handle the case when there are 0 stations defined ( this is bug of course ). Later I will need to set up my test environment to give some more to-the-point comments.

Aleks-Ale commented 3 years ago

Have you uploaded the stations file to the SPIFFS partition?

I think all files is uploaded. Data folder content: 2021-01-18_13-44-54

Uploaded: 2021-01-18_13-47-11

Should this file be generated automatically?

2021-01-18_13-48-00

gitpeut commented 3 years ago

Yes, it is created after you select a station.

Aleks-Ale commented 3 years ago

Maybe create it manually for the first start?

gitpeut commented 3 years ago

Sure, you can try.

Aleks-Ale commented 3 years ago

I tried creating an empty file and a file with content just number 1 without other characters. Does not work. Perhaps a different format for recording the station number is needed.

gitpeut commented 3 years ago

I have updated github with a valid last_station.txt in th data directory, try that file.

Aleks-Ale commented 3 years ago

Unfortunately there is no good news. 2021-01-18_14-15-16

new file uploaded. The same error persists on startup. Does the ESP32 configuration matter?

2021-01-18_14-21-41

gitpeut commented 3 years ago

Yes, PSRAM needs to enabled, you need an ESP32 with PSRam for this (WROVER modules have PSRAM)

If you don’t have such a module,you can try changing all calls with ps_calloc and ps_malloc to just calloc and malloc, but you may run out of RAM.

Aleks-Ale commented 3 years ago

changing all calls with ps_calloc and ps_malloc to just calloc and malloc

YES! You did it! :) Thank you! I will try to https stations I see in your list: "Canon" - https://peut.org/RoundMidnight.flac "Sh.flac" - https://peut.org/sh.flac Added: "RADIO NICE LOFI" https://radio-nice.ru:8285/stream

Aleks-Ale commented 3 years ago

unfortunately the https stations does not work ... Does not switch to radioclient = & sclient;

I tried to use a simple IF but that doesn't work either.


if (stations[stationIdx].protocol == 0)
{
    radioclient = &iclient;  
}
else {
    if ( stations[stationIdx].protocol == 1 )
    radioclient = &sclient;  
}

If the connection is not possible, the player goes into an endless cycle of connection attempts.

gitpeut commented 3 years ago

Hm, could be, in the original code use of TLS (the encryption protocol for https) is disabled by #undef USETLS Did change this to something like this: #define USETLS 1 It hsould work but I haven't looked at it for a long time.

gitpeut commented 3 years ago

The https links ( like https://peut.org/sh.flac) worked with me because they also work with http.

gitpeut commented 3 years ago

Hi, I set up my breadboard and I got your station playing now, but quality is not always great, not sure if it's the station or the radio. As PSRAM on my test ESP32 suddenly failed(%$#$@$), I also changed all ps_alloc to normal allocs. I updated GeleRadio ( https://github.com/gitpeut/GeleRadio) with this (for me) working code.

I will have a look at the spectrum analyzer too, now that I am at it.

Aleks-Ale commented 3 years ago

I updated GeleRadio

Dear Jose, thank you very much for your help. Unfortunately, yesterday I went to bed and could not see the results of your work. I'm going to run this code tonight.

in the original code use of TLS

As far as I know, TLS is a more secure protocol that requires a certificate. TLS as the top floor for the SSL. All https stations can be checked by specifying WiFiClientSecure as the default client. This does not require a certificate. All https radios work well. I've tried this on various web radio projects, including a project from Edzelf.

PSRAM on my test ESP32

Please show me a photo of your ESP32 board. Different boards may have different results and I will try to buy the same board as yours. I hope my order for the gesture sensor will be delivered in 2 weeks.

I will have a look at the spectrum analyzer too, now that I am at it.

Let me know if I can be of any help to you. For example, I can cut all the necessary pieces from the project https://github.com/blotfi/ESP32-Radio-with-Spectrum-analyzer A few days ago I already tried to implement a spectrum analyzer for another project that uses my favorite ili9341 screen. Unfortunately not successful. I only heard the first seconds of the sound and the static picture of the spectrum analyzer. The player freezes hard. And I'm guessing the screen driver TFT_eSPI problem. No freeze if I turned off the display of the 14 graphic sections of the spectrum analyzer. However, the output to the serial port showed zero values of the registers received from VS1053.

2021-01-19_15-50-21

By the way, I don't understand why it is necessary to move write_register to "public" instead "private".

Aleks-Ale commented 3 years ago

Do you think it makes sense to continue communicating here? if it is convenient for you, you can find my e-mail in this notification letter.

gitpeut commented 3 years ago

PSRAM: Unfortunately, I use my home build board, so a picture is useless. possible alternatives:

Look on Ali Express for ESP32 esp32 development board PSRAM

TLS: TLS has replaced SSL. I will try to always use the secure client

I use the write_register and read_register functions to apply the patches. I cannot use them outside the class when they are private. When public, I can always use them.

Email: better idea, but your email got lost. I'll try and send you my email address.