Post Go back to editing

[SHARING] TCPi Interface for Sigma Studio, using ESP8266 or ESP32.

Hello guys,

I'm making available here files to write on ESP8266, this will give you, all functions USBi does, but using WiFi TCP/IP ( Exception will apply, see another topic q-a/115184 )

Before write, set the folowing, also note there are 2 versions, with and without debug, so pay attention.

For ESP8266 Board
   CPU Frequency: 160Mhz
   Flash Size: 4MB (FS:1MB OTA:~1019kb)
   iwIP Variant: v2 Higher Bandwidth
   Debug Port: Disabled ( Set port only if you want debug messages, it will slow down all comunications! )
   Debug Level: NoAssert-NDEBUG

   Wire Connections


   ESP8266 D1 port to Adau board i2C SCL port
   ESP8266 D2 port to Adau board i2C SDA port
   ESP8266 D3 port to Adau board RESET ( ESP8266 needs reset DSP wheen boot/powerup )
   ESP8266 D4 port to Adau board SELF BOOT ( Not available on this version )

   DO NOT forget, I2C lines requires 2k2 resistor on each pin, if your ADAU board does not have resistors, you must add!

   I2C Address is fixed at this moment:

   Eeprom:  0x50  => 0xA1
   DSP:       0x34  => 0x68

   Serial Debug baudrate: 115.200

For ESP32 board ( Beta version, added on 2020/07/03 )

     CPU Frequency: 240Mhz 
     Flash Size: 4MB (FS:1.5MB)
     Core debug Level: None    

     Wire Connections


      ESP32 17 port to Adau board i2C SCL port
      ESP32 16 port to Adau board i2C SDA port
      ESP32 21 port to Adau board RESET ( ESP8266 needs reset DSP wheen boot/powerup )
      ESP32 xx port to Adau board SELF BOOT ( Not available on this version )

      DO NOT forget, I2C lines requires 2k2 resistor on each pin, if your ADAU board does not have resistors, you must add!

      I2C Address is automatic in the folowing interval:

      Eeprom:  0xA0 .. 0xAE
      DSP:       0x68 .. 0x76

      Serial debug baudrate: 250000

      

ESP8266/ESP32 Network configuration:

      Wifi SSID:           TCPi
      WiFi password: SigmaStudio#*

      IP:                       192.168.0.1/24
      TCP Port:             8086

Persistent connect to an existing SSID ( WiFi Router ), updated on 2020/04/15

      After connect to TCPi, use the folowing url: http : //192.168.0.1 / connect ? ssid=ssidname & password=wifipassword
      If  ( wrong provided ssid or password ) or ( provided ssid is off-line ), TCPi will keep in AP Mode

Firmware:   version 1.0.0.4 build 2020/04/16

  6558.TCPi-ESP8266.zip 

Firmware:   version 1.0.0.4 build 2020/07/03

8182.TCPi-ESP32.rar
        

For ESP8266 user who have trouble with Filesystem Format, build the folowing sketch, then load it on ESP8266 Module before write TCPi Firmware or write firmware using esptool with the folowing:

( Thanks to RichT tipesptool.py --port COMx write_flash --flash_size 4MB-c1 0x0 filename.bin

/* 

Please note, this will work only o ESP8266 Modules with 4MB flash size.

Choose board like bellow

Board: NodeMCU 1.0(ESP-12E-Module)
Cpu Frequency: 160 Mhz
Flash Size: 4MB (FS:2MB OTA:~1019KB) ==> Very Important!!! Flash Partitions size.

Write this sketch using arduino! This will create partitions on your ESP Module.

After see sucessfull message over serial.
you may write TCPi firmware using your preffered tool.

*/

void setup() {
    Serial.begin(115200);
    while (!Serial);

    Serial.write("\r\nThis sketch is working\r\n");
    Serial.write("You may now write TCPi firmware using you preferred tool.\r\n");
}

void loop() {
    delay(1);
}

I have done some improvents on code, so i will upload this soon, includes:

     I2C now can handle all possible address ( DSP AND EEPROM ) in automatic way.
     SPI is now possible, but need some person with ADAU1701 with SPI connection for try out ( I do not have that! ), please send private message about that.
     Can handle ADAU1452 too, its almost done, left only safeload implementation wich is in progress.
     Automatic detection TCP/IP Protocols between ADAU1401/ADAU1701/ADAU1452

I will be updating this post, whenever there are changes.

If you encounter any problems, let me know, sending a private message.



Updateing
[edited by: Rocha at 4:01 AM (GMT 0) on 16 Jul 2020]
  • Hi Rocha,

    that's great ! 

    we got already a couple of insight from others like the hifiberry implementation of a sigmatcp server for raspberrypi, now you give us a great standalone solution.

    I d like to port this for a 1466/67 using SPI would you be ok to share the source code ? please PM me, at least I need the first piece of code for connecting the sockets, thats where I had some issue in some past tentatives last summer. SigmaStudio was not recognizing the connection to my 8266. I think I can deal with the sigmatcp protocol :) , awaiting that ADI team releases a 4.6 version with a clean tcp.dll

    Thansk for sharing with the community

  • Have you confirmed that it works with a Adau1701? 

    I am asking because i have the cheap boards from china to try your amazing work on, One is from Wondom/sure and the other is Adau1401 https://www.aliexpress.com/item/32869692900.html. I have no problem flashing the esp8266 and connect to the SSID. I have soldered the required resistors and ground to the esp8266 but powering the Wondom board with own usb. 

    But, its the required IP in TCPi1701 the is giving me an error as soon as i try to connect. 

  • Yes, Works great, ADAU1401 and ADA1701, i have Chinese boards too ( more than one model ), one is same as yours, did u ping device first? checked if IP is assigned correctly by router? have u tried in AP mode? did u used port 8086? i will attach picture, in that picture resitors are smd at end of red wire, also adau reset with brown wire ( that board does not have reset pin header ), ADAU board is powered from USB connected to ESP8266.

  • After I connected to the ESP and visit 192.168.0.1/connect

    I am greater with your message. 

    but it is when I add the block TCPI1701 and enter the setting 192.168.0.1/24 I get an error. 

    As you understand I am far from your level, I work as an acoustic consult and build speakers on my free time. But I am one hell of a test pilot since I try everything that someone like your self probably wouldn’t.

  • Hi Nisse.p, DO NOT use netmask on IP Address at Sigma Studio, Its only 192.168.0.1 on your case, see attached image. PS Resistors for SDA and SCL are Pullups ( Both Connected to +3v ), see corrections, PS: Its based on white connector is not part of ESP8266 module!, its attached with glue.

     


  • I told you I would try something you never would.. why did you mention 192.168.0.1/24 as the ip? 

    And the white connector is the same used by wondoms version of a Usbi that’s why I glued that on.

  • Added ESP32 Firmware, Its in beta version!

  • Have wemos D1 v2.1.0 with debug output.  flashed using your image with Tazmotiter and starts ok, havent connected it to target device, just verifying its starting and connected to AP.  Looking at debug via pio.  Seeing problems when connecting that appears its not saving the wifi details

    Ready
    Last reset reason: External System
    Eeprom does not reponding at 0x50 (2)
    DSP does not reponding at 0x34 (2)
    [WS-Server] Server Started.
    [SPIFFS] Checking filesystem...
    [SPIFFS] Formatting filesystem...
    [SPIFFS] Error Formatting!
    [WIFI] Initilizing WiFi in AP Mode, ssid: TCPi
    [WIFI] Station connected: 9c:b6:d0:e1:51:01:
    [HTTP] Connecting to ssid: abcd with password: abcdefghijklmnop
    [SPIFSS] Error! Saving config file.

    Unsure on what its doing regarding check and format.    Please advise

  • Hi RichT, i have updated this post with information related about filesystem format, please read above and follow instructions, let me know if u have any trouble.

  • Thanks that gave me the insight I needed.  Can also achieve from the command line with:

    esptool.py --port COM4 write_flash --flash_size 4MB-c1 0x0 TCPi-ESP8266-with-debug.bin

    Appears now to start up ok and formats filesystem, saves config, etc.