-
Notifications
You must be signed in to change notification settings - Fork 201
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Integrating IHeartRadio into ESP-Radio Arduino Code #82
Comments
Enabled Debug Core+WiFi over serial and got some further information... D: Command: xml with parameter CIMXFMAAC So it can't lookup the IP address it seems. |
Line 1070 is called during the "setup()" phase. At that moment there is no Internet connection, so a DNS lookup will always fail. |
Thanks for the tip! Show Diff IHeartRadio station example:
Radio station example:
For information on how to get your own station callsigns follow the information here or guess! Serial Debug
🎉 Does it look copacetic in the code? |
Added a channel switcher Test to the HTML code: index_html.h |
Looks good! I'm including this feature in my version. Testing now. |
iHeartRadio is implemented now. |
Great work with the prefix, I'll give it a test when I get home. Just to note I forgot to add XML to analyze cmd comment section inside the code I noticed it is in the PDF but not in the source. .ino source I was trying to figure out a way to pull a list from their site but the API is undocumented, my priority was to get it playing first. There are some tips here on how to find callsigns from the HTML source on the website: issues/70 Essentially the live radio stations are usually in this format XXXXFM for an FM broadcast or XXXXAM for an AM broadcast, so you could look up the callsign letters of a station online and then check to see if IHeartRadio manages their stream then just type ihr/CIMXFM etc, the IHR_ streams are outside of that normality as they only exist on their service. I found those by playing the station on their website then clicking the history option in their player then looking at the source of that page with the log of the songs they last played on it. usually, you can just search for the word "callsign" in the source and you should find a tag with it inside. You can read their history to find out most of the stations they support in the wikipedia iHeartRadio |
@NonaSuomy would you by any chance have a tiny bit of free time to help me figure out why I can't get any of the IHR stations working? Edzelf has already implied that he will be busy for the next week(s) and won't be available to do so in that time. Having these stations functioning is one of the main points of leverage I will have to utilize to get my boss and coworkers to agree to evaluate the internet radio concept to be adopted in the shop where I work, so it is somewhat vital that I am able to get to the bottom of why they aren't playing properly. (the local station that they are stuck on just so happens to be an ihr station) Any help would be appreciated, and I figure you're probably the only other person that understands the code well enough to help me work through the issue. I am not sure if I'm doing something wrong, or if there's a bug or what, but i'm really at a loss when it comes to what approach to take next in resolving this. I opened an issue under the esp32 version that explains where I'm at, and referenced it above. As far as I am aware, the code for both versions should be pretty much the same, although I haven't done a side by side comparison to legitimately make this claim. Let me know if there's anything I can do to make it easier on you as well.. Thanks in advance, |
Ref back: Edzelf/ESP32-Radio#11 The callsign is indeed ihr/CHBDFM case sensitive. Are you able to stream any of the shoutcast stations ip:port/mp3 etc ? |
Umm. I am uncertain. What I do recall is that it seemed that in addition to ihr not working, that any of the example stations that were addressed with a raw ip address were also not working, so I replaced them in the preset list almost immediately. I was unaware that these stations had anything in common (ie. Shoutcast) since they had no common domain name and hence didn't seem related. So those were Shoutcast then? They didn't work before, but it's been a long time since I've attempted to use them. Would it help if I gave them a go? |
Nevermind, I guess some of those IP addressed stations do work. On another note, here is the debug output I'm getting from the
|
Contents type is audio/aacp. Shouldn't that bee audio/mp3? Please compare it with a working station. I am not able to test it here. |
Sorry, spent the last couple evenings catching up on some other stuff and eradicating a virus/worm that snuck onto my personal network. All is back to normal now. I will see what further data I can dig up later tonight. So, it may be deciphering the wrong content type, does that mean these mp3 boards do not support aac, or would it be misinterpreting the data stream? Not sure if anyone else noticed the extra leading dot (.) near the end of this line, would that cause it to parse a poorly formatted url? : |
Nope AAC is correct and these boards support it. It definitely looks like it Decodes Ogg Vorbis; |
I did a bit of further poking around, it seems that any mpeg stream is working (fantastically I might add) and anything that comes up with a content type of aac(p) refuses to play. I found this (Dutch?) webstore that sells them: http://shop.egnite.de/de/embedded-entwicklung/audio-ics/66/vlsi-vs1053b-l?c=127 After auto-translation, it says:
The datasheet also talks about something about being able to have an embedded serial number from the factory for "digital rights management" purposes. Could it be that the board I have is not properly licenced for aac decoding? (After all it did come from China so I would not be surprised if it was either a counterfeit chip or a slimmed down version that did not have full features.. Which the sellers opted for as a penny pinching tactic) |
Unusual maybe try a sketch that only plays audio files from sd I got mine from china ebay sellers http://www.ebay.ca/itm/VS1053-MP3-Module-with-SD-card-slot-VS1053B-Ogg-real-time-recording-for-Arduino-/262866917974?hash=item3d3416da56:g:QysAAOSwdGFYrwHo http://www.geeetech.com/wiki/index.php/VS1053_MP3_breakout_board_with_SD_card maybe raw chips are not setup properly like the breakout boards? Does the chip indeed say v1053b on it, maybe you got a lower model or a knock off? |
Here's the datasheet in english https://www.sparkfun.com/datasheets/Components/SMD/vs1053.pdf |
Well, that's a bit frustrating, but I guess that would make sense - I had a closer look and figured out that the board I have has a VS1003B chip instead of a VS1053B, despite being sold as the latter. The datasheet for the 1003 makes no mention of the AAC format on first glance. Guess I have to wait another 2 months for a new board to arrive >:( I'll close the issue on the other side, but this one doesn't belong to me. Thanks for your help everyone @Edzelf @NonaSuomy |
Glad I could help you solve the mystery! Just to note I would double check the pin layout as I believe a bunch of the VS series are drop in replacements for each other without too much fuss. |
I was hoping they would be, although based on the pictures of the module (bought the one recommended by @Edzelf) it appears that the pins are arranged in a double row pattern instead of the single row of 9 pins on the one I have. Obviously a different design, but I wanted to be sure that I got a genuine module this time, to avoid waiting additional months to get it all built. Since I already designed for this board (and since they obviously do make 1053 versions with the same pinout - i'm guessing because this board is labeled vs1003/VS1053 breakout or something like that) I will likely try to incorporate headers for the new board into the design I already made for dual compatibility. I'm trying to avoid making it a dual layer design for simplicity's sake so I guess we shall see. On that note, can anyone confirm that the pinout is 2 x __ on those modules? Also if somebody has a caliper and one of those boards and doesn't mind taking a few measurements for me, it would save me a good chunk of time not having to wait for the new one to arrive. (or a datasheet would probably suffice if it includes a diagram with measurements) |
Maybe you could modify this board https://github.com/dsaltas/WiFi-WebRadio Here's an add on board with buttons and display as well for it https://drive.google.com/file/d/0B2L11_CEdEgAMEFieGJOOXBNcDA/view |
Oh I guess i should have been more clear, I would need a datasheet showing the measurements of this module (ie. the pin spacing and relative localisation between the board edges and the aforementioned pins):
(this actually happened to me pretty recently) Also I'm working with the esp32, that one is for 8266.. Unless you meant to modify it for the 32.. |
koskee, datasheet for this module is unlikely to exist in nature, probably you should guess to type in google.com datasheet vs1053, and not to laugh for Chinese, who does not know English and responds with a learned phrase. |
Was merely an example to illustrate the fact that the sellers often cannot communicate on a functional level. If anything, I'd say I'm frustrated with the fact that I bought a VS1053 module and got something different. Any laughter would be because there's not much else I can do about it. Just have to realize, that's how it goes sometimes, as irritating as it is waiting 3 months for stuff to arrive. I agree that such a datasheet is unlikely to find its way into my hands, if it exists. That is why I am asking for someone to measure theirs with a caliper, if they could as it would save a lot of time and hassle searching for information that may or may not exist.. |
I started attempting to integrate IHeartRadio XML Parsing into ESP-Radio, but hit a bump in the Parsing code works outside of ESP-Radio but doesn't seem to be able to trigger mp3client inside ESP-Radio code base.
Diff Line 1070 on the right of the Diff is where it tries to open the stream of data for XML content parsing.
XMLParsingTest.ino:
GIST .ino
Working...
Testing in ESP-Radio:
https://github.com/NonaSuomy/Esp-radio/blob/NonaSuomy-XML-Parser/Esp_radio.ino
Gets stuck at line 1070
I tried to make a second client called xmlclient instead of mp3client and got the same results (nothing).
Any help would be appreciated!
The text was updated successfully, but these errors were encountered: