This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How to receive SGTL5000 I2S data?

Hello Team,

My goal:

Live audio streaming over BLE

What I have done:

I have interfaced SGTL5000 with NRF52832 and I follow this link.

github.com/.../nRF52-teensy-sgtl5000-audio

and loopback [Microphone to earphone] is perfectly working!

problem:

I want to receive I2S data from SGTL5000 so I can store live audio data inside NRF52832.

So for this, I have made the following  changes

1) I have added the below function inside the i2s_data_handler function when the loopback event called. [ condition SGTL5000_STATE_RUNNING_LOOPBACK when becomes true ].

2) I have added the below function inside the i2s_data_handler_old function

above 2step modification i have done in drv_sgtl5000.c file.

3)I have also modified in DRV_SGTL5000_EVT_I2S_RX_BUF_RECEIVED event in main.c

4)In main.c I printing all the data as shown below. 

As per my understanding, I have made the above changes to receive I2S data from SGTL5000.

Result:

I m getting zeros with some data in RTT viewer [printing data using NRF_LOG_INFO]

I have converted this data into a .wav file and when I played the file then I notice that only noise is recoreded.

So, I don't know these changes are right or wrong.

Please note:

- I have used SDK_15.0.0 

-NRF52832 controller

looking forward to your reply!

-Dipak

Parents
  • # SEGGER J-Link RTT Viewer V6.98e Terminal Log File
    # Compiled: 14:21:41 on Mar 29 2021
    # Logging started @ 03 Jun 2021 21:07:51
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 1313,
    00> 1313,
    00> 1000,
    00> 1000,
    00> 954,
    00> 954,
    00> 1214,
    00> 1214,
    00> 1918,
    00> 1918,
    00> 2393,
    00> 2393,
    00> 2497,
    00> 2497,
    00> 2086,
    00> 2086,
    00> 1664,
    00> 1664,
    00> 1026,
    00> 1026,
    00> 621,
    00> 621,
    00> 942,
    00> 942,
    00> 1603,
    00> 1603,
    00> 2542,
    00> 2542,
    00> 3065,
    00> 3065,
    00> 3412,
    00> 3412,
    00> 3310,
    00> 3310,
    00> 2703,
    00> 2703,
    00> 2219,
    00> 2219,
    00> 1657,
    00> 1657,
    00> 1122,
    00> 1122,
    00> 868,
    00> 868,
    00> 1251,
    00> 1251,
    00> 2316,
    00> 2316,
    00> 3213,
    00> 3213,
    00> 3491,
    00> 3491,
    00> 3313,
    00> 3313,
    00> 2565,
    00> 2565,
    00> 2369,
    00> 2369,
    00> 2154,
    00> 2154,
    00> 2623,
    00> 2623,
    00> 3383,
    00> 3383,
    00> 4184,
    00> 4184,
    00> 5135,
    00> 5135,
    00> 4892,
    00> 4892,
    00> 4945,
    00> 4945,
    00> 3864,
    00> 3864,
    00> 2934,
    00> 2934,
    00> 2595,
    00> 2595,
    00> 2107,
    00> 2107,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 5116,
    00> 5116,
    00> 5206,
    00> 5206,
    00> 4716,
    00> 4716,
    00> 3790,
    00> 3790,
    00> 2994,
    00> 2994,
    00> 2909,
    00> 2909,
    00> 3343,
    00> 3343,
    00> 4010,
    00> 4010,
    00> 3826,
    00> 3826,
    00> 3026,
    00> 3026,
    00> 1970,
    00> 1970,
    00> 612,
    00> 612,
    00> -514,
    00> -514,
    00> -800,
    00> -800,
    00> -604,
    00> -604,
    00> -590,
    00> -590,
    00> -431,
    00> -431,
    00> -168,
    00> -168,
    00> 146,
    00> 146,
    00> 249,
    00> 249,
    00> 88,
    00> 88,
    00> 373,
    00> 373,
    00> 302,
    00> 302,
    00> 165,
    00> 165,
    00> 469,
    00> 469,
    00> 1254,
    00> 1254,
    00> 2614,
    00> 2614,
    00> 3675,
    00> 3675,
    00> 4462,
    00> 4462,
    00> 4424,
    00> 4424,
    00> 4252,
    00> 4252,
    00> 3889,
    00> 3889,
    00> 3629,
    00> 3629,
    00> 4094,
    00> 4094,
    00> 4442,
    00> 4442,
    00> 4630,
    00> 4630,
    00> 4336,
    00> 4336,
    00> 3644,
    00> 3644,
    00> 2863,
    00> 2863,
    00> 2501,
    00> 2501,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 1618,
    00> 1618,
    00> 2177,
    00> 2177,
    00> 2959,
    00> 2959,
    00> 1055,
    00> 1055,
    00> 844,
    00> 844,
    00> 1946,
    00> 1946,
    00> 933,
    00> 933,
    00> 86,
    00> 86,
    00> 179,
    00> 179,
    00> -182,
    00> -182,
    00> 71,
    00> 71,
    00> 1985,
    00> 1985,
    00> 3088,
    00> 3088,
    00> 2094,
    00> 2094,
    00> 2345,
    00> 2345,
    00> 2580,
    00> 2580,
    00> 2012,
    00> 2012,
    00> 2849,
    00> 2849,
    00> 4068,
    00> 4068,
    00> 3742,
    00> 3742,
    00> 4310,
    00> 4310,
    00> 4830,
    00> 4830,
    00> 5042,
    00> 5042,
    00> 4153,
    00> 4153,
    00> 3763,
    00> 3763,
    00> 2678,
    00> 2678,
    00> 2756,
    00> 2756,
    00> 4149,
    00> 4149,
    00> 3964,
    00> 3964,
    00> 2527,
    00> 2527,
    00> 2182,
    00> 2182,
    00> 2938,
    00> 2938,
    00> 3711,
    00> 3711,
    00> 3685,
    00> 3685,
    00> 2695,
    00> 2695,
    00> 2200,
    00> 2200,
    00> 2086,
    00> 2086,
    00> 2864,
    00> 2864,
    00> 3128,
    00> 3128,
    00> 3593,
    00> 3593,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 2945,
    00> 2945,
    00> 2693,
    00> 2693,
    00> 1891,
    00> 1891,
    00> 1239,
    00> 1239,
    00> 715,
    00> 715,
    00> 281,
    00> 281,
    00> 387,
    00> 387,
    00> 641,
    00> 641,
    00> 1397,
    00> 1397,
    00> 2539,
    00> 2539,
    00> 2725,
    00> 2725,
    00> 2758,
    00> 2758,
    00> 3012,
    00> 3012,
    00> 3020,
    00> 3020,
    00> 2837,
    00> 2837,
    00> 3107,
    00> 3107,
    00> 3199,
    00> 3199,
    00> 3942,
    00> 3942,
    00> 4926,
    00> 4926,
    00> 5422,
    00> 5422,
    00> 5215,
    00> 5215,
    00> 4715,
    00> 4715,
    00> 4004,
    00> 4004,
    00> 3407,
    00> 3407,
    00> 2830,
    00> 2830,
    00> 2655,
    00> 2655,
    00> 3205,
    00> 3205,
    00> 3631,
    00> 3631,
    00> 4240,
    00> 4240,
    00> 4447,
    00> 4447,
    00> 4107,
    00> 4107,
    00> 3622,
    00> 3622,
    00> 2787,
    00> 2787,
    00> 2782,
    00> 2782,
    00> 2444,
    00> 2444,
    00> 2489,
    00> 2489,
    00> 3102,
    00> 3102,
    00> 3683,
    00> 3683,
    00> 3933,
    00> 3933,
    00> 3951,
    00> 3951,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 4556,
    00> 4556,
    00> 4759,
    00> 4759,
    00> 4545,
    00> 4545,
    00> 3606,
    00> 3606,
    00> 2662,
    00> 2662,
    00> 2079,
    00> 2079,
    00> 1307,
    00> 1307,
    00> 977,
    00> 977,
    00> 998,
    00> 998,
    00> 1397,
    00> 1397,
    00> 1224,
    00> 1224,
    00> 858,
    00> 858,
    00> 523,
    00> 523,
    00> 336,
    00> 336,
    00> 258,
    00> 258,
    00> 377,
    00> 377,
    00> 593,
    00> 593,
    00> 573,
    00> 573,
    00> 740,
    00> 740,
    00> 1200,
    00> 1200,
    00> 1442,
    00> 1442,
    00> 1458,
    00> 1458,
    00> 1855,
    00> 1855,
    00> 2260,
    00> 2260,
    00> 2155,
    00> 2155,
    00> 2116,
    00> 2116,
    00> 2293,
    00> 2293,
    00> 1894,
    00> 1894,
    00> 1587,
    00> 1587,
    00> 1548,
    00> 1548,
    00> 1200,
    00> 1200,
    00> 1328,
    00> 1328,
    00> 1793,
    00> 1793,
    00> 2413,
    00> 2413,
    00> 2875,
    00> 2875,
    00> 3479,
    00> 3479,
    00> 3664,
    00> 3664,
    00> 3538,
    00> 3538,
    00> 3123,
    00> 3123,
    00> 2413,
    00> 2413,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 2176,
    00> 2176,
    00> 1426,
    00> 1426,
    00> 1276,
    00> 1276,
    00> 1261,
    00> 1261,
    00> 1616,
    00> 1616,
    00> 2073,
    00> 2073,
    00> 2822,
    00> 2822,
    00> 3471,
    00> 3471,
    00> 3778,
    00> 3778,
    00> 3847,
    00> 3847,
    00> 3249,
    00> 3249,
    00> 2449,
    00> 2449,
    00> 1862,
    00> 1862,
    00> 1694,
    00> 1694,
    00> 1866,
    00> 1866,
    00> 2025,
    00> 2025,
    00> 2143,
    00> 2143,
    00> 2358,
    00> 2358,
    00> 2497,
    00> 2497,
    00> 2016,
    00> 2016,
    00> 1347,
    00> 1347,
    00> 1024,
    00> 1024,
    00> 803,
    00> 803,
    00> 1364,
    00> 1364,
    00> 1532,
    00> 1532,
    00> 1542,
    00> 1542,
    00> 1744,
    00> 1744,
    00> 1785,
    00> 1785,
    00> 1742,
    00> 1742,
    00> 1818,
    00> 1818,
    00> 2274,
    00> 2274,
    00> 2785,
    00> 2785,
    00> 3374,
    00> 3374,
    00> 3615,
    00> 3615,
    00> 4165,
    00> 4165,
    00> 4392,
    00> 4392,
    00> 4137,
    00> 4137,
    00> 4062,
    00> 4062,
    00> 4079,
    00> 4079,
    00> 3967,
    00> 3967,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 2500,
    00> 2500,
    00> 3325,
    00> 3325,
    00> 3760,
    00> 3760,
    00> 3684,
    00> 3684,
    00> 3029,
    00> 3029,
    00> 2463,
    00> 2463,
    00> 1560,
    00> 1560,
    00> 1338,
    00> 1338,
    00> 1627,
    00> 1627,
    00> 1958,
    00> 1958,
    00> 2534,
    00> 2534,
    00> 2922,
    00> 2922,
    00> 2856,
    00> 2856,
    00> 2715,
    00> 2715,
    00> 2688,
    00> 2688,
    00> 2696,
    00> 2696,
    00> 2750,
    00> 2750,
    00> 3099,
    00> 3099,
    00> 3395,
    00> 3395,
    00> 3433,
    00> 3433,
    00> 3475,
    00> 3475,
    00> 3311,
    00> 3311,
    00> 2911,
    00> 2911,
    00> 2959,
    00> 2959,
    00> 3208,
    00> 3208,
    00> 3120,
    00> 3120,
    00> 3428,
    00> 3428,
    00> 3760,
    00> 3760,
    00> 3824,
    00> 3824,
    00> 3826,
    00> 3826,
    00> 3660,
    00> 3660,
    00> 3569,
    00> 3569,
    00> 3214,
    00> 3214,
    00> 2619,
    00> 2619,
    00> 2196,
    00> 2196,
    00> 2222,
    00> 2222,
    00> 2155,
    00> 2155,
    00> 2074,
    00> 2074,
    00> 1820,
    00> 1820,
    00> 1747,
    00> 1747,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 4034,
    00> 4034,
    00> 3825,
    00> 3825,
    00> 3057,
    00> 3057,
    00> 2481,
    00> 2481,
    00> 2210,
    00> 2210,
    00> 2209,
    00> 2209,
    00> 2183,
    00> 2183,
    00> 2214,
    00> 2214,
    00> 2067,
    00> 2067,
    00> 2005,
    00> 2005,
    00> 1787,
    00> 1787,
    00> 1343,
    00> 1343,
    00> 1385,
    00> 1385,
    00> 1426,
    00> 1426,
    00> 1715,
    00> 1715,
    00> 1744,
    00> 1744,
    00> 1603,
    00> 1603,
    00> 1675,
    00> 1675,
    00> 1810,
    00> 1810,
    00> 1499,
    00> 1499,
    00> 1566,
    00> 1566,
    00> 2097,
    00> 2097,
    00> 2597,
    00> 2597,
    00> 2606,
    00> 2606,
    00> 2799,
    00> 2799,
    00> 3351,
    00> 3351,
    00> 3551,
    00> 3551,
    00> 3412,
    00> 3412,
    00> 3418,
    00> 3418,
    00> 3289,
    00> 3289,
    00> 2556,
    00> 2556,
    00> 1974,
    00> 1974,
    00> 1401,
    00> 1401,
    00> 1078,
    00> 1078,
    00> 807,
    00> 807,
    00> 1184,
    00> 1184,
    00> 1195,
    00> 1195,
    00> 1273,
    00> 1273,
    00> 1590,
    00> 1590,
    00> 2021,
    00> 2021,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 1902,
    00> 1902,
    00> 2099,
    00> 2099,
    00> 2694,
    00> 2694,
    00> 3034,
    00> 3034,
    00> 3214,
    00> 3214,
    00> 2920,
    00> 2920,
    00> 2370,
    00> 2370,
    00> 1603,
    00> 1603,
    00> 1266,
    00> 1266,
    00> 1353,
    00> 1353,
    00> 1328,
    00> 1328,
    00> 1593,
    00> 1593,
    00> 1974,
    00> 1974,
    00> 2321,
    00> 2321,
    00> 2544,
    00> 2544,
    00> 2711,
    00> 2711,
    00> 2585,
    00> 2585,
    00> 2201,
    00> 2201,
    00> 2065,
    00> 2065,
    00> 1946,
    00> 1946,
    00> 2094,
    00> 2094,
    00> 2220,
    00> 2220,
    00> 2707,
    00> 2707,
    00> 3347,
    00> 3347,
    00> 3983,
    00> 3983,
    00> 4221,
    00> 4221,
    00> 3534,
    00> 3534,
    00> 2841,
    00> 2841,
    00> 2446,
    00> 2446,
    00> 2530,
    00> 2530,
    00> 2803,
    00> 2803,
    00> 3349,
    00> 3349,
    00> 3895,
    00> 3895,
    00> 3998,
    00> 3998,
    00> 3547,
    00> 3547,
    00> 3305,
    00> 3305,
    00> 2969,
    00> 2969,
    00> 2707,
    00> 2707,
    00> 2747,
    00> 2747,
    00> 2823,
    00> 2823,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 2867,
    00> 2867,
    00> 2561,
    00> 2561,
    00> 2371,
    00> 2371,
    00> 2588,
    00> 2588,
    00> 2655,
    00> 2655,
    00> 2693,
    00> 2693,
    00> 2800,
    00> 2800,
    00> 3052,
    00> 3052,
    00> 3548,
    00> 3548,
    00> 4052,
    00> 4052,
    00> 4186,
    00> 4186,
    00> 4026,
    00> 4026,
    00> 3939,
    00> 3939,
    00> 3487,
    00> 3487,
    00> 3496,
    00> 3496,
    00> 3667,
    00> 3667,
    00> 3608,
    00> 3608,
    00> 3523,
    00> 3523,
    00> 3536,
    00> 3536,
    00> 3386,
    00> 3386,
    00> 2986,
    00> 2986,
    00> 2904,
    00> 2904,
    00> 2794,
    00> 2794,
    00> 2435,
    00> 2435,
    00> 2031,
    00> 2031,
    00> 1717,
    00> 1717,
    00> 1441,
    00> 1441,
    00> 1126,
    00> 1126,
    00> 877,
    00> 877,
    00> 1126,
    00> 1126,
    00> 1494,
    00> 1494,
    00> 1241,
    00> 1241,
    00> 758,
    00> 758,
    00> 564,
    00> 564,
    00> 344,
    00> 344,
    00> 57,
    00> 57,
    00> 74,
    00> 74,
    00> 664,
    00> 664,
    00> 1485,
    00> 1485,
    00> 2293,
    00> 2293,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 1517,
    00> 1517,
    00> 1673,
    00> 1673,
    00> 1474,
    00> 1474,
    00> 1385,
    00> 1385,
    00> 1557,
    00> 1557,
    00> 1892,
    00> 1892,
    00> 2202,
    00> 2202,
    00> 2478,
    00> 2478,
    00> 2745,
    00> 2745,
    00> 3244,
    00> 3244,
    00> 3503,
    00> 3503,
    00> 3416,
    00> 3416,
    00> 3103,
    00> 3103,
    00> 2767,
    00> 2767,
    00> 2761,
    00> 2761,
    00> 2569,
    00> 2569,
    00> 2664,
    00> 2664,
    00> 2821,
    00> 2821,
    00> 2953,
    00> 2953,
    00> 3310,
    00> 3310,
    00> 3381,
    00> 3381,
    00> 3121,
    00> 3121,
    00> 2868,
    00> 2868,
    00> 2395,
    00> 2395,
    00> 2061,
    00> 2061,
    00> 1811,
    00> 1811,
    00> 1724,
    00> 1724,
    00> 1728,
    00> 1728,
    00> 1483,
    00> 1483,
    00> 1575,
    00> 1575,
    00> 1748,
    00> 1748,
    00> 1773,
    00> 1773,
    00> 1861,
    00> 1861,
    00> 2353,
    00> 2353,
    00> 2797,
    00> 2797,
    00> 2847,
    00> 2847,
    00> 2958,
    00> 2958,
    00> 3366,
    00> 3366,
    00> 3306,
    00> 3306,
    00> 2986,
    00> 2986,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 1252,
    00> 1252,
    00> 1465,
    00> 1465,
    00> 1776,
    00> 1776,
    00> 2059,
    00> 2059,
    00> 2356,
    00> 2356,
    00> 2377,
    00> 2377,
    00> 2186,
    00> 2186,
    00> 2043,
    00> 2043,
    00> 1763,
    00> 1763,
    00> 1213,
    00> 1213,
    00> 866,
    00> 866,
    00> 553,
    00> 553,
    00> 677,
    00> 677,
    00> 1338,
    00> 1338,
    00> 2103,
    00> 2103,
    00> 2635,
    00> 2635,
    00> 2897,
    00> 2897,
    00> 3199,
    00> 3199,
    00> 2926,
    00> 2926,
    00> 2624,
    00> 2624,
    00> 2028,
    00> 2028,
    00> 1951,
    00> 1951,
    00> 2647,
    00> 2647,
    00> 3116,
    00> 3116,
    00> 3417,
    00> 3417,
    00> 3709,
    00> 3709,
    00> 3695,
    00> 3695,
    00> 3499,
    00> 3499,
    00> 3325,
    00> 3325,
    00> 3500,
    00> 3500,
    00> 3622,
    00> 3622,
    00> 3728,
    00> 3728,
    00> 4003,
    00> 4003,
    00> 4333,
    00> 4333,
    00> 4511,
    00> 4511,
    00> 4229,
    00> 4229,
    00> 3278,
    00> 3278,
    00> 2202,
    00> 2202,
    00> 1292,
    00> 1292,
    00> 711,
    00> 711,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 2725,
    00> 2725,
    00> 2697,
    00> 2697,
    00> 2397,
    00> 2397,
    00> 1935,
    00> 1935,
    00> 1492,
    00> 1492,
    00> 1147,
    00> 1147,
    00> 1071,
    00> 1071,
    00> 1178,
    00> 1178,
    00> 1282,
    00> 1282,
    00> 1318,
    00> 1318,
    00> 1565,
    00> 1565,
    00> 1602,
    00> 1602,
    00> 1501,
    00> 1501,
    00> 1890,
    00> 1890,
    00> 2297,
    00> 2297,
    00> 2844,
    00> 2844,
    00> 3196,
    00> 3196,
    00> 3189,
    00> 3189,
    00> 3263,
    00> 3263,
    00> 3433,
    00> 3433,
    00> 3255,
    00> 3255,
    00> 3237,
    00> 3237,
    00> 3425,
    00> 3425,
    00> 3527,
    00> 3527,
    00> 3590,
    00> 3590,
    00> 3675,
    00> 3675,
    00> 4080,
    00> 4080,
    00> 4671,
    00> 4671,
    00> 4836,
    00> 4836,
    00> 4922,
    00> 4922,
    00> 4728,
    00> 4728,
    00> 4416,
    00> 4416,
    00> 3870,
    00> 3870,
    00> 3079,
    00> 3079,
    00> 2193,
    00> 2193,
    00> 1377,
    00> 1377,
    00> 868,
    00> 868,
    00> 642,
    00> 642,
    00> 436,
    00> 436,
    00> 670,
    00> 670,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 2928,
    00> 2928,
    00> 2612,
    00> 2612,
    00> 2362,
    00> 2362,
    00> 2095,
    00> 2095,
    00> 2149,
    00> 2149,
    00> 2238,
    00> 2238,
    00> 2332,
    00> 2332,
    00> 2414,
    00> 2414,
    00> 2491,
    00> 2491,
    00> 2572,
    00> 2572,
    00> 2507,
    00> 2507,
    00> 2466,
    00> 2466,
    00> 2299,
    00> 2299,
    00> 2139,
    00> 2139,
    00> 2147,
    00> 2147,
    00> 2247,
    00> 2247,
    00> 2314,
    00> 2314,
    00> 2112,
    00> 2112,
    00> 1889,
    00> 1889,
    00> 1977,
    00> 1977,
    00> 1967,
    00> 1967,
    00> 2020,
    00> 2020,
    00> 2245,
    00> 2245,
    00> 2405,
    00> 2405,
    00> 2916,
    00> 2916,
    00> 3291,
    00> 3291,
    00> 3278,
    00> 3278,
    00> 3003,
    00> 3003,
    00> 2575,
    00> 2575,
    00> 2334,
    00> 2334,
    00> 2530,
    00> 2530,
    00> 2960,
    00> 2960,
    00> 3286,
    00> 3286,
    00> 3394,
    00> 3394,
    00> 3219,
    00> 3219,
    00> 2970,
    00> 2970,
    00> 2845,
    00> 2845,
    00> 3020,
    00> 3020,
    00> 3060,
    00> 3060,
    00> 3017,
    00> 3017,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 1619,
    00> 1619,
    00> 1840,
    00> 1840,
    00> 2143,
    00> 2143,
    00> 2655,
    00> 2655,
    00> 2854,
    00> 2854,
    00> 2981,
    00> 2981,
    00> 3056,
    00> 3056,
    00> 2924,
    00> 2924,
    00> 2564,
    00> 2564,
    00> 2292,
    00> 2292,
    00> 2158,
    00> 2158,
    00> 2164,
    00> 2164,
    00> 2426,
    00> 2426,
    00> 2674,
    00> 2674,
    00> 3106,
    00> 3106,
    00> 3387,
    00> 3387,
    00> 3327,
    00> 3327,
    00> 2849,
    00> 2849,
    00> 2377,
    00> 2377,
    00> 2013,
    00> 2013,
    00> 1984,
    00> 1984,
    00> 1983,
    00> 1983,
    00> 1851,
    00> 1851,
    00> 1894,
    00> 1894,
    00> 2055,
    00> 2055,
    00> 2144,
    00> 2144,
    00> 2376,
    00> 2376,
    00> 2626,
    00> 2626,
    00> 2719,
    00> 2719,
    00> 2451,
    00> 2451,
    00> 2473,
    00> 2473,
    00> 2658,
    00> 2658,
    00> 2727,
    00> 2727,
    00> 2825,
    00> 2825,
    00> 2988,
    00> 2988,
    00> 3064,
    00> 3064,
    00> 3093,
    00> 3093,
    00> 3316,
    00> 3316,
    00> 3443,
    00> 3443,
    00> 3491,
    00> 3491,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 1580,
    00> 1580,
    00> 1248,
    00> 1248,
    00> 1003,
    00> 1003,
    00> 1116,
    00> 1116,
    00> 1372,
    00> 1372,
    00> 1535,
    00> 1535,
    00> 1852,
    00> 1852,
    00> 2282,
    00> 2282,
    00> 2595,
    00> 2595,
    00> 2714,
    00> 2714,
    00> 2525,
    00> 2525,
    00> 2406,
    00> 2406,
    00> 2288,
    00> 2288,
    00> 2438,
    00> 2438,
    00> 2581,
    00> 2581,
    00> 2414,
    00> 2414,
    00> 2706,
    00> 2706,
    00> 3268,
    00> 3268,
    00> 3641,
    00> 3641,
    00> 4035,
    00> 4035,
    00> 4208,
    00> 4208,
    00> 4014,
    00> 4014,
    00> 3942,
    00> 3942,
    00> 4021,
    00> 4021,
    00> 3962,
    00> 3962,
    00> 3533,
    00> 3533,
    00> 3099,
    00> 3099,
    00> 2802,
    00> 2802,
    00> 2751,
    00> 2751,
    00> 3040,
    00> 3040,
    00> 3169,
    00> 3169,
    00> 3088,
    00> 3088,
    00> 3051,
    00> 3051,
    00> 2831,
    00> 2831,
    00> 2685,
    00> 2685,
    00> 2746,
    00> 2746,
    00> 2767,
    00> 2767,
    00> 2650,
    00> 2650,
    00> 2510,
    00> 2510,
    00> 2304,
    00> 2304,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 2096,
    00> 2096,
    00> 2094,
    00> 2094,
    00> 1884,
    00> 1884,
    00> 1669,
    00> 1669,
    00> 1482,
    00> 1482,
    00> 1260,
    00> 1260,
    00> 1356,
    00> 1356,
    00> 1671,
    00> 1671,
    00> 1957,
    00> 1957,
    00> 2345,
    00> 2345,
    00> 2518,
    00> 2518,
    00> 2716,
    00> 2716,
    00> 3041,
    00> 3041,
    00> 2931,
    00> 2931,
    00> 2814,
    00> 2814,
    00> 2901,
    00> 2901,
    00> 3090,
    00> 3090,
    00> 3288,
    00> 3288,
    00> 3620,
    00> 3620,
    00> 3819,
    00> 3819,
    00> 3618,
    00> 3618,
    00> 3718,
    00> 3718,
    00> 3724,
    00> 3724,
    00> 3518,
    00> 3518,
    00> 3380,
    00> 3380,
    00> 3068,
    00> 3068,
    00> 2840,
    00> 2840,
    00> 2492,
    00> 2492,
    00> 2017,
    00> 2017,
    00> 1714,
    00> 1714,
    00> 1644,
    00> 1644,
    00> 1927,
    00> 1927,
    00> 1995,
    00> 1995,
    00> 2032,
    00> 2032,
    00> 1990,
    00> 1990,
    00> 2181,
    00> 2181,
    00> 2239,
    00> 2239,
    00> 2151,
    00> 2151,
    00> 1894,
    00> 1894,
    00> 1589,
    00> 1589,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 5815,
    00> 5815,
    00> 5715,
    00> 5715,
    00> 5356,
    00> 5356,
    00> 5560,
    00> 5560,
    00> 5417,
    00> 5417,
    00> 4585,
    00> 4585,
    00> 3810,
    00> 3810,
    00> 3365,
    00> 3365,
    00> 2711,
    00> 2711,
    00> 1907,
    00> 1907,
    00> 1478,
    00> 1478,
    00> 1326,
    00> 1326,
    00> 1332,
    00> 1332,
    00> 1756,
    00> 1756,
    00> 2014,
    00> 2014,
    00> 2198,
    00> 2198,
    00> 2041,
    00> 2041,
    00> 1626,
    00> 1626,
    00> 773,
    00> 773,
    00> 268,
    00> 268,
    00> -31,
    00> -31,
    00> -349,
    00> -349,
    00> -166,
    00> -166,
    00> 463,
    00> 463,
    00> 955,
    00> 955,
    00> 1623,
    00> 1623,
    00> 1959,
    00> 1959,
    00> 2262,
    00> 2262,
    00> 2695,
    00> 2695,
    00> 2037,
    00> 2037,
    00> 2493,
    00> 2493,
    00> 2239,
    00> 2239,
    00> 328,
    00> 328,
    00> 1626,
    00> 1626,
    00> 2365,
    00> 2365,
    00> 748,
    00> 748,
    00> 536,
    00> 536,
    00> 609,
    00> 609,
    00> 990,
    00> 990,
    00> 1242,
    00> 1242,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 0,
    00> 2745,
    00> 2745,
    00> 3104,
    00> 3104,
    00> 3198,
    00> 3198,
    00> 3568,
    00> 3568,
    00> 3470,
    00> 3470,
    00> 3480,
    00> 3480,
    00> 3292,
    00> 3292,
    00> 3455,
    00> 3455,
    00> 3914,
    00> 3914,
    00> 3998,
    00> 3998,
    00> 3834,
    00> 3834,
    00> 3121,
    00> 3121,
    00> 2469,
    00> 2469,
    00> 2067,
    00> 2067,
    00> 339,
    00> 339,
    00> 657,
    00> 657,
    00> 678,
    00> 678,
    00> -202,
    00> -202,
    00> 1091,
    00> 1091,
    00> 614,
    00> 614,
    00> 125,
    00> 125,
    00> 1891,
    00> 1891,
    00> 2658,
    00> 2658,
    00> 1639,
    00> 1639,
    00> 1589,
    00> 1589,
    00> 2340,
    00> 2340,
    00> 2645,
    00> 2645,
    00> 2786,
    00> 2786,
    00> 2749,
    00> 2749,
    00> 3065,
    00> 3065,
    00> 3615,
    00> 3615,
    00> 3759,
    00> 3759,
    00> 4412,
    00> 4412,
    00> 5409,
    00> 5409,
    00> 5596,
    00> 5596,
    00> 5875,
    00> 5875,
    00> 6228,
    00> 6228,
    00> 6019,
    00> 6019,
    00> 5088,
    00> 5088,
    00> 5253,
    00> 5253,
    00> 0,
    

    Here is my recorded file.

    Please let me know is it the right data or wrong?

    -Dipak

  • Hi Dipak,

    I am not immediately able to spot the issue in your code.

    I plotted the samples, though:  It looks like the sample could be sensible when they are not zero, but I cannot say for sure. I also notice that the chunks of zero value samples come at regular intervals, though the number differ a bit.

    There is one other thing, though. I am a bit unsure about what you are doing here. This is a three years old unofficial example, and it does not use the building blocks required in order to actually get a stable stream of live audio. For that, you need to use something like LE audio which is underway. The main problems with using the approach of this example is that it use a GATT service for exchanging the data, so you will have retransmissions etc., which is not sensible for audio streaming. You also have the problem that you will not be able to compress audio much on the fly with the limited CPU power on the nRF52, so decent quality live audio streaming is also difficult for that reason. What is the end goal for your endeavors? Could it be that you should be looking in another direction (for instance LE audio with the nRF5340)?

  • Hello Einar,

    Thanks for the reply!

    What is the end goal for your endeavors? 

    - My end goal is to send the 0-1000hz signal over Ble [live streaming].

    Sorry, if you confused. actually, I have to send very low frequency [0-1000hZ]  over ble, not audio!

    and for that, I have done the below steps 

    - Recorded beep sound [using NRF_LOG_INFO] and played it on audacity but the problem is  beep sound amplitude is too low,

    here is the image of beep sound,

    also attached the log file of beep*

    I want to know how to increase the amplitude of the beep [or 0 to 1000hz freq.] and for that what kind of changes I have to do in SGTL5000 for the same?

    As per my progress, right now I am just giving 0 to 1000hz input at the mic and record it on NRF52 and if these things work then I will send this data over BLE for live streaming.

    I am a bit unsure about what you are doing here. This is a three years old unofficial example,

    Sorry, I did a mistake and I have designed PCB but still, as per my understanding 0 to 1000hz signal, we can live stream over BLE, right?

    looking forward to your reply!

    Dipak

    Beep_Sound.log

     

  • Hi,

    Dipak said:
    I want to know how to increase the amplitude of the beep [or 0 to 1000hz freq.] and for that what kind of changes I have to do in SGTL5000 for the same?

    I suggest you ask NXP about details about how to configure their device.

    Dipak said:
    Sorry, I did a mistake and I have designed PCB but still, as per my understanding 0 to 1000hz signal, we can live stream over BLE, right?

    I am not sure what you mean exactly by live streaming, but using a normal BLE connection including retransmissions etc. will give you higher latency when there is packet loss etc. Regarding bitrate you should not have any problems up to 1000 Hz. If you then sample with 2 kHz, and have (say) 16 bit samples, that gives  you 32 kbps of raw data which is definitely doable without any compression.

  • Hello Einar,

    I am not sure what you mean exactly by live streaming, but using a normal BLE connection including retransmissions etc. will give you higher latency when there is packet loss etc. Regarding bitrate you should not have any problems up to 1000 Hz. If you then sample with 2 kHz, and have (say) 16 bit samples, that gives  you 32 kbps of raw data which is definitely doable without any compression.

    Okay, let me clear everything about my goal, so you can visualize it.

    My goal is to record the heartbeat and send over it on Ble [ NRF52832 to Android device(android 9,10,11)]

    [ live streaming of heartbeat! ] 

    https://www.youtube.com/watch?v=KRtAqeEGq2Q. 

    so, for testing purposes first I have taken a log file of  0 - 1000hz frequency

    [ Jlink RTT viewer: used nrf_log_info() for logging the data] .

    and I have converted these log files into .wav files successfully!

    [still, converted .wav file amplitude is low but no issue with that]

    My problem:

    How to stream live heartbeat data over BLE [nrf52832 to android device]?

    - I have tried with ble_app_uart service and sent data when BLE_NUS_EVT_TX_RDY for new data

       variable buffer_full is set when data is copied from the I2S_Recieve pointer

    As per my understanding, DRV_SGTL5000_EVT_I2S_RX_BUF_RECEIVED data is not copied when we are sending data so data loss occurs at that time.

    so, How to send a live stream heartbeat data over BLE?

    Please share your ideas or suggestion!

    Your reply is more valuable to me!

    Best,

    Dipak

  • Hi Dipak,

    The Nordic UART services is a good choice for sending large chunks of data. It essentially demonstrates sending notifications, which is what you want. The NUS example use long packets but perhaps you want to increase the event length by adjusting NRF_SDH_BLE_GAP_EVENT_LENGTH in order to support a higher throughput.

    From that point, you just call ble_nus_data_send() continuously with your data. This will call sd_ble_gatts_hvx() which copies the data into a queue within the SoftDevice, so there is no risk of the data being overwritten.

    You need to handle the situation where the queue is full, and in that case wait for the BLE_GATTS_EVT_HVN_TX_COMPLETE event before trying to send again. As you want to achieve "live" streaming it probably makes most sense to drop data if the queue is full instead of trying to send it later.

Reply
  • Hi Dipak,

    The Nordic UART services is a good choice for sending large chunks of data. It essentially demonstrates sending notifications, which is what you want. The NUS example use long packets but perhaps you want to increase the event length by adjusting NRF_SDH_BLE_GAP_EVENT_LENGTH in order to support a higher throughput.

    From that point, you just call ble_nus_data_send() continuously with your data. This will call sd_ble_gatts_hvx() which copies the data into a queue within the SoftDevice, so there is no risk of the data being overwritten.

    You need to handle the situation where the queue is full, and in that case wait for the BLE_GATTS_EVT_HVN_TX_COMPLETE event before trying to send again. As you want to achieve "live" streaming it probably makes most sense to drop data if the queue is full instead of trying to send it later.

Children
No Data
Related