This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

两个CC3200模块之间对传数据

Other Parts Discussed in Thread: CC3200

我想做两个CC3200模块之间对传音频数据,不经过路由器,模块和模块之间能够直接通过wifi连接,这样一般用什么方式做比较好?有人做过吗?麻烦指点下   谢谢   QQ:709733624   微信:li709733624   麻烦有知道的大哥联系我下,谢谢

  • TI有一个连接路由器的CC3200到CC3200的音频传输例程(wifi_audio_app),你可以将这个例程修改为CC3200不经过路由器直接进行直连的方式

    我做了一些笔记参考如下,

    //By default example come up in loopback mode means it will read data on MIC and playback to speaker.
    //Verify whether device coming up with loopback mode or not for further debugging. For loopback test use only one LP at a time.
    //发射板的 SW3 键
    //接收板的 SW2 键

    //Now follow below sequence once both the LP acquired the IP:
    //1. Ensure Line-IN and Line-OUT points are connected appropriately on both the launch pads.
    //2. Upon successful connection to AP, press SW2 on LP1. Red LED will switch off on LP1.
    //3. Once LP1 connects to LP2, the red LED on LP2 will switch off.
    //4. Now press SW2 on LP2 and SW3 on LP1. Red LED will switch on LP2. 

    //The demo in the SDK does support simultaneous bi-directional (full duplex) audio. This is achieved by exercising the
    //two parallel paths (as described below) for the audio-in and audio-out paths.
    //
    //Audio-in jack -> 3200 McASP Data pin 1 -> I2S serializer 1 -> Audio Tx Task -> Audio transmit socket --- Over the air
    // |
    // V
    //Audio-out jack <- 3200 McASP Data pin 0 <- I2S serializer 0 <- Audio Rx Task <- Audio receive socket --- Over the air
    //
    //Each of the paths are simplex individually but together it achieves the full duplex audio transfer.
    //------------------------run in 44.1kHz or 48kHz instead of 16kHz (default)--------------------
    //You need to make following changes for 44.1/48 KHz 16-bit stereo PCM:
    //
    //1. Add below code lines in AudioCodecConfig() after “if(bitClk == 512000)”
    //
    //else if(bitClk == 1536000 || bitClk == 1411200)
    //{
    //AudioCodecPageSelect(TI3254_PAGE_0);
    //
    //AudioCodecRegWrite(TI3254_CLK_MUX_REG, 0x03); // PLL Clock is CODEC_CLKIN
    //AudioCodecRegWrite(TI3254_CLK_PLL_P_R_REG, 0x91); // PLL is powered up, P=1, R=1
    //AudioCodecRegWrite(TI3254_CLK_PLL_J_REG, 0x38); // J=56
    //AudioCodecRegWrite(TI3254_CLK_PLL_D_MSB_REG, 0x00); // D = 0
    //
    //AudioCodecRegWrite(TI3254_CLK_NDAC_REG, 0x82); // NDAC divider powered up, NDAC = 2
    //AudioCodecRegWrite(TI3254_CLK_MDAC_REG, 0x87); // MDAC divider powered up, MDAC = 7
    //AudioCodecRegWrite(TI3254_DAC_OSR_MSB_REG, 0x00); // DOSR = 0x0080 =
    //AudioCodecRegWrite(TI3254_DAC_OSR_LSB_REG, 0x80); // DOSR = 0x0080 = 128
    //
    //AudioCodecRegWrite(TI3254_CLK_NADC_REG, 0x82); // NADC divider powered up, NADC = 2
    //AudioCodecRegWrite(TI3254_CLK_MADC_REG, 0x87); // MADC divider powered up, MADC = 7
    //AudioCodecRegWrite(TI3254_ADC_OSR_REG, 0x80); // AOSR = 128 ((Use with PRB_R1 to PRB_R6, ADC Filter Type A)
    //}
    //
    //2. In AudioCaptureRendererConfigure() replace 512000 with 1411200 for 44.1KHZ and 1536000 for 48KHz
    //
    //3. In main.c pass 44100 or 48000 in place of 16000 as argument for AudioCodecConfig()
    //4. In main.c pass 44100 or 48000 in place of 16000 as argument for AudioCaptureRendererConfigure()
    //
    //As don't have expertise on Audio codec, so it is best to post query in TI-Audio codec((AIC3254) ) forum to know how to configure PLL related configuration.
    //特别注意:
    //(3)mDNS使用服务器开启及客户端请求问题
    // 详见(CC3200 WiFi Audio App) http://e2e.ti.com/support/wireless_connectivity/simplelink_wifi_cc31xx_cc32xx/f/968/t/438276
    // 详见(How 2 CC3200s get each other IP address?) http://e2e.ti.com/support/wireless_connectivity/simplelink_wifi_cc31xx_cc32xx/f/968/p/400118/1415303#1415303
    //(4)回放模式设置
    // (Using Audio booster pack wifi demo app example CC3200) http://e2e.ti.com/support/wireless_connectivity/simplelink_wifi_cc31xx_cc32xx/f/968/t/390582#pi239031348=2&pi239031350=3
    //(5)操作步骤
    //<1>按下复位键(SW1)
    //<2>按下发射板的 SW3 键,绿灯长亮
    //<3>再按下接收板的 SW2 键,黄灯长亮,红灯也长亮
    //此时发射板的红灯及黄灯熄灭,绿灯常亮表示发射板正在传输音频,接收板绿灯熄灭,黄灯及红灯常亮表示正在接收音频
    //(6)关于双向音频流控制
    //(does the wifi audio sample really running on bidirectional?) http://e2e.ti.com/support/wireless_connectivity/simplelink_wifi_cc31xx_cc32xx/f/968/t/402341
    // 在(5)基础上
    // <4>再按下发射板的SW2键,此时绿灯和黄灯亮
    // <5>再按下接收板的SW3键,此时绿灯,黄灯和红灯都亮,而且之前的发射板的三个灯也全亮。---双向语音设置成功!
    //(7)注意在手机播放音频信号,用CC3200无线接收播放会有"叭叭叭"的杂音,是由于手机射频信号造成的!将手机设置为飞行模式再次播放杂音消除!
    //(8)关于无线UDP数据量问题
    // UDP每包发送1kBytes数据,16kHz采样率*16bit*2通道=64kBytes字节/s 每秒采集16k次=32k个高低电平,高低电平=左右声道,每个声道16bit数据表示,
    // 则有每秒32k*2Bytes=64kBytes数据流!也就大约512kbps!如果采用44.1kHz则会产生大约1.5Mbps带宽

    //(9)连接AP的方式采用直接连接的方式!


    //操作步骤
    //首先设置路由器:
    #define SSID_NAME "CC32" /*cc3200demo AP SSID */
    #define SECURITY_TYPE SL_SEC_TYPE_WPA_WPA2 /* SL_SEC_TYPE_OPEN Security type (OPEN or WEP or WPA*/
    #define SECURITY_KEY "12345678"
    //<1>按下复位键(SW1)
    //<2>按下发射板的 SW3 键,绿灯长亮
    //<3>再按下接收板的 SW2 键,黄灯长亮,红灯也长亮 ---单向语音设置成功!
    //<4>再按下发射板的SW2键,此时绿灯和黄灯亮
    //<5>再按下接收板的SW3键,此时绿灯,黄灯和红灯都亮,而且之前的发射板的三个灯也全亮。---双向语音设置成功!
    // 通过板卡上的MIC和插入的耳机就也进行语音双向传输了

  • 我按照您第9条的改了代码    两个连接起来是烧写到FLASH里面以后开机自动连接吗?还需要smatrconfig吗?    我烧写到flash以后两个板子的绿灯一直亮   应该没有连接上   是我还缺什么东西吗?

  • 你需要通过Smartconfig首先连接到路由器上,或者直接修改代码,将Smartconfig的部分去掉,直接连接目标的路由器,然后通过步骤9进行连接操作