element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Internet of Things
  • Technologies
  • More
Internet of Things
Documents WIZ550io Internet Radio
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Internet of Things to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Engagement
  • Author Author: main8096
  • Date Created: 11 Dec 2014 12:04 AM Date Created
  • Last Updated Last Updated: 11 Dec 2014 12:20 AM
  • Views 630 views
  • Likes 1 like
  • Comments 0 comments
Related
Recommended

WIZ550io Internet Radio

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image
image
Let’s start the Internet radio project with WIZ550io
Please refer to YouTube
1. Block Diagram (main interface)
-       SPI1: WIZ550io 

-       SPI2: VS1033D

image
image

-       Define the VS1033D pin

image

-       Define the WIZ550io pin
image
2. Schematic & Source code & Compiler
- Refer to as below site
https://www.dropbox.com/sh/ok17jyppzynnjkb/AADjRxi6tOHDKtBgI6uvGMYQa?dl=0
- STM32board (open the Schematic)
- VS1033D Board $19.95 (https://www.sparkfun.com/products/10608)
- WIZ550io Board $17.00 (http://www.shopwiznet.com/wiz550io)
- Compiler: EmIDE (http://www.emide.org/)
3. Protocol Analytics
To connect the Radio channel, we should check protocol between Radio Server and Client board.
-       Step #1 In order to analytics the network Packet, you should execute packet capture tool
        such as WireShark (www.wireshark.com)
-       Step #2: Running the Explore and access the Radio Channel
image
We’ll find as below web-page
Click the Listen button. And then, the PC will play the MP3 player as like Gom!!!
image
-       image
-       Step #3 Packet analytics
I omitted the Wireshark packet capture procedure. (Please find a google or YouTube)
Anyway, the below image displayed TCP client (PC part) connection procedure
è  Client PC: 192.168.1.100
è  Server Radio channel IP: 109.206.96.11
image
-       Keep in mind, the Key point packet is here “GET / HTTP/1.1”
That means when TCP Client connection was finished, the PC (Client) will send as below packets.
image
Instead of Client board, I used PC and Client p/g as like the Hercules_3-2-4 (www.HW-group.com)
-       Test Radio Channel IP and port number
IP / Port = 109, 206, 96, 11 / 80 (TOP FM Beograd 106,8  64-kpbs)
4. Source Code analytics
-       Total block diagram
image
-       Internet Radio TCP Client block Diagram

image
5. Implementation.
-       Initialize the WIZ550io and VS1033D SPI setting
è  VS1033D SPI Setting
image
è  WIZ550io SPI setting
image

-       main loop

/*********************************************************************

*

*  main()

*

*********************************************************************/

void main()

{

    //============================================================

    // Host MCU initialize

    //============================================================

    platform_init();

    //============================================================

    // WIZnet TCP/IP Chip initialize

    //============================================================

    WIZnet_init();

    //============================================================

    // Application code : DHCP Client

    // - DHCP IP allocation and check the DHCP lease time (for IP renewal)

    //============================================================

    while(DHCP_SUCCESS==0) DHCP_Routine();      //DHCP init Check

    VS1003_InitCheck();                               //VS1033D init check

    VS1003_SetVolume(0x00);

    Delay_ms(100);

    while (VS1003_Ready()==Bit_RESET)           //VS1033D play to Ready check

   {

        printf("VS1003_Ready=Bit Reset1");

    }

#ifdef MP3_Debugging

    MP3_Test();             //Play the sample Music (5Sec)

#endif

    while(1){

        //============================================================

        // Application code : Loopback

        // TCP Server

        //============================================================

        LoopBack_Routine();

        InternetRadio_tcpc(SOCK_RadioC, any_port);                      //Internet Radio Play

    }

}

uint8 RadioRequest[]= {


    0x47, 0x45, 0x54, 0x20, 0x2f, 0x20, 0x48, 0x54, 0x54, 0x50,

    0x2f, 0x31, 0x2e, 0x31, 0x0d, 0x0a, 0x41, 0x63, 0x63, 0x65,

    0x70, 0x74, 0x3a, 0x20, 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x49,

    0x63, 0x79, 0x2d, 0x4d, 0x65, 0x74, 0x61, 0x44, 0x61, 0x74,

    0x61, 0x3a, 0x31, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,

    0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x47, 0x4f, 0x47,

    0x53, 0x20, 0x48, 0x54, 0x54, 0x50, 0x20, 0x4d, 0x50, 0x45,

    0x47, 0x28, 0x47, 0x4f, 0x4d, 0x41, 0x29, 0x0d, 0x0a, 0x48,

    0x6f, 0x73, 0x74, 0x3a, 0x20, 0x75, 0x6b, 0x32, 0x2e, 0x69,

    0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2d, 0x72, 0x61,

    0x64, 0x69, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x0d, 0x0a, 0x43,

    0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a,

    0x20, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x0d, 0x0a

};

Do you remember this packet?
Yes, this packet will be first sent to Radio Sever.
Please refer to ESTABLISED routine
ret = send(s, RadioRequest, sizeof(RadioRequest));
image
void InternetRadio_tcpc(uint8 s, uint16 port)
{
    int32_t ret;
    uint16 RSR_len;
    uint16 received_len;
    uint8 *data_buf = TX_BUF;
    uint16 sentsize=0, i=0;
    switch (getSn_SR(s))
    {
        case SOCK_ESTABLISHED:                 /* if connection is established */
            if(RadioSocket_status==1)
            {
                printf("\r\nConnected Socket: %d\r\n",s);

                //printf("\r\n RadioSocket_status=1\r\n");
                //Delay_ms(1000);
                ret = send(s, RadioRequest, sizeof(RadioRequest));
                printf("\r\n Send RadioRequest protocol\r\n");
                RadioSocket_status = 2;
            }

            if ((RSR_len = getSn_RX_RSR(s)) > 0)         /* check Rx data */
            {
                if (RSR_len > DATA_BUF_SIZE) RSR_len = DATA_BUF_SIZE;
                received_len = recv(s, data_buf, RSR_len);         /* read the received data */
                printf("\r\n Receive Data Num %d", received_len);
                sentsize =0;
                while(received_len != sentsize)
                {
                    while (VS1003_Ready()==Bit_SET)
                    {
                        //printf("\r\n VS1003 Data process start\r\n");
                        for (i=0; i<received_len; i++)
                        {
                            VS1003_WriteData(data_buf[i]);
                            Delay_us(250);
                            Delay_us(30);
                        }
                        //Delay_ms(10);
                        sentsize += received_len;
                        if (sentsize>=received_len) return;
                    }
                 }
            }
          break;
        case SOCK_CLOSE_WAIT:                     /* If the client request to close */
            printf("\r\n%d : CLOSE_WAIT", s);
            if ((RSR_len = getSn_RX_RSR(s)) > 0)         /* check Rx data */
            {
                 if (RSR_len > DATA_BUF_SIZE) RSR_len = DATA_BUF_SIZE;
                         ret = received_len = recv(s, data_buf, RSR_len);
            }
            RadioSocket_status = 0;
            disconnect(s);
            break;
        case SOCK_CLOSED:           /* if a socket is closed */
            if(!RadioSocket_status)
            {
                printf("\r\n%d : Loop-Back TCP Client Started. port: %d\r\n", s, port);
                RadioSocket_status = 1;
            }
            if(socket(s, Sn_MR_TCP, port++, 0x00) == 0)    /* reinitialize the socket */
            {
                printf("\a%d : Fail to create socket.",s);
                RadioSocket_status = 0;
                any_port=port;
            }
            break;
        case SOCK_INIT:     /* if a socket is initiated */
               connect(s, Dest_IP, Dest_PORT);
                break;
        default:
            break;
    }
}

6. Conclusion

First of all, this project is Beta version. I didn’t allocate the memory for saving internet radio server data. Therefore, It’s not perfectly working all internet radio channel.
But, WIZ550io is very easy solution for Internet Radio.
First, It’s easy to be porting in STM32F103RBT code. I just add 5~10 routine for SPI mapping.
Second, I have used the TCP Client example code. This is also open WIZnet homepage. I just added VS1033 play routine in TCP Client.
Anyway, when you open my source code, you’ll find what I mean.
If you want to IoT project or Network function, I would like to recommend a WIZnet solution.
  • w5500
  • wiz550io
  • wiznet
  • Share
  • History
  • More
  • Cancel
  • Sign in to reply
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube