LilyGO / TTGO-TAudio

T9
72 stars 18 forks source link

Unable to set Wi-Fi on WM8978 example #1

Open N0rbert opened 6 years ago

N0rbert commented 6 years ago

Dear LilyGO!

Thank you very much for your efforts and great devices! I'm playing with your TTGO-TAudio-V1-0-ESP32-WROVER-SD-Card-Slot-Bluetooth-WI-FI-Module-MPU9250-WM8978-12Bits device I tested LEDs and MPU9250 - both work great.

I have flashed WM8978/wm8978_code_bin, exactly these 3 files:

Prepared my SD card (copied all files from WM8978/sd_file to its root).

When I insert SD card and power on the device it initializes and plays music in headphones.
Here is its bootlog:

I (0) cpu_start: Starting scheduler on APP CPU.
I (120) wifi: wifi firmware version: 708a055
I (121) wifi: config NVS flash: enabled
I (121) wifi: config nano formating: disabled
I (121) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE
I (131) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE
I (155) wifi: Init dynamic tx buffer num: 32
I (155) wifi: Init data frame dynamic rx buffer num: 32
I (155) wifi: Init management frame dynamic rx buffer num: 32
I (158) wifi: Init static tx buffer num: 32
I (163) wifi: wifi driver task: 3ffcb740, prio:23, stack:4096
I (168) wifi: Init static rx buffer num: 10
I (172) wifi: Init dynamic rx buffer num: 32
I (176) wifi: wifi power manager task: 0x3ffd1568 prio: 21 stack: 2560
I (204) phy: phy_version: 366.0, ba9923d, Oct 31 2017, 18:06:17, 0, 0
I (205) wifi: mode : sta (30:ae:a4:43:a4:50)
I (206) [WIFI]: wifi_init_sta finished.
I (209) [WIFI]: connect to ap SSID:JSNH121203 password:1234509876 

I (216) SDCARD FAT: Mounting FAT filesystem
Name: 00000
Type: SDHC/SDXC
Speed: high speed
Size: 15262MB
CSD: ver=1, sector_size=512, capacity=31256576 read_bl_len=9
SCR: sd_spec=2, bus_width=5
I (287) I2S: DMA Malloc info, datalen=blocksize=3072, dma_buf_count=4
I (293) I2S: DMA Malloc info, datalen=blocksize=3072, dma_buf_count=4
I (300) I2S: PLL_D2: Req RATE: 44100, real rate: 44642.000, BITS: 16, CLKM: 14, BCK: 8, MCLK: 11289966.924, SCLK: 1428544.000000, diva: 64, divb: 11
I (319) [WM8978]: codec init
I (330) [LOCALPLAY]: start localplay
I (336) [LOCALPLAY]: Now play music topic 张学友专辑  /sdcard/list_name/AlbumCatalog_NO.3.mp3
I (2023) [LOCALPLAY]: Now play music path /sdcard/story/ZXY0011.mp3,   pos 11/13
I (10341) smartconfig: SC version: V2.7.1
I (15165) wifi: ic_enable_sniffer
I (15166) [WIFI]: SC_STATUS_FINDING_CHANNEL
I (278548) [LOCALPLAY]: Now play music path /sdcard/story/ZXY0012.mp3,   pos 12/13

According to your screenshots - the device has Wi-Fi server onboard. But I do not understand how to set Wi-Fi.

How and where should I set Wi-Fi? Which device is the server (router) and which is the client? Should I set my router SSID as JSNH121203 with password 1234509876? Which encryption should I set (WPA2-PSK, WPA, WEP)? Should I set my router SSID as TP-LINK_888 with open password (without identification)?

I do not know is it related, but I can't open link from QR code.

gnsharans commented 6 years ago

i think the ssid should be same,as JSNH...... i was not able to listen to the songs.please help me ,i just flashed the bin files,but not able to listen the songs that were in sdcard.is there any specific sd card type should be used for this please resolve the issue `ets_main.c 371 ets Jun 8 2016 00:22:57

rst:0x10 (RTCWDT_RTC_RESET),boot:0x33 (SPI_FAST_FLASH_BOOT) configsip: 0, SPIWP:0xee clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00 mode:DIO, clock div:1 load:0x3fff0018,len:4 load:0x3fff001c,len:5716 load:0x40078000,len:0 load:0x40078000,len:13804 entry 0x40079038 I (63) boot: Detected ESP32 I (31) boot: ESP-IDF v3.0-dev-1327-g02304ad8 2nd stage bootloader I (32) boot: compile time 00:59:52 I (34) boot: Enabling RNG early entropy source... I (38) boot: SPI Speed : 80MHz I (42) boot: SPI Mode : DIO I (46) boot: SPI Flash Size : 4MB E (50) flash_parts: partition 0 invalid magic number 0x7e9 E (56) boot: Failed to verify partition table E (61) boot: load partition table error! user code done

`

allenck commented 6 years ago

It looks like the WiFi settings on the SD card allows one to specify the SID and Password. But it appears that the SSID is hard coded and that the WiFi is connected before the SD card is opened.