Difference between revisions of "EspNowAudio"

From RevSpace
Jump to navigation Jump to search
m
 
(2 intermediate revisions by the same user not shown)
Line 10: Line 10:
  
 
Stuff to learn:
 
Stuff to learn:
* ESP now broadcast mode: does it really work? https://github.com/espressif/ESP8266_NONOS_SDK/issues/8#issuecomment-419774432
+
* ESP now broadcast mode: does it really work? YES, it does work, there's no ACK (so it's even a bit faster).
 
* ESP now throughput: https://hackaday.io/project/166868-my-attempt-at-an-esp-now-mesh/log/166398-072419-maximum-transmission-throughput-of-esp-now
 
* ESP now throughput: https://hackaday.io/project/166868-my-attempt-at-an-esp-now-mesh/log/166398-072419-maximum-transmission-throughput-of-esp-now
 
* ESP now packet loss when used continuously
 
* ESP now packet loss when used continuously
Line 25: Line 25:
 
* build an Arduino playground project so I can access the API from the command line and play with it
 
* build an Arduino playground project so I can access the API from the command line and play with it
 
* start with an ESP32 + INMP441
 
* start with an ESP32 + INMP441
 +
 +
Next steps:
 +
* build a framework to stream the data and determine stream rate:
 +
** queue is filled with random data
 +
** queue is emptied by an espnow send process running in the main loop()
 +
** espnow completion callback notifies when next packet can be sent
 +
* investigate I2S communication from a microphone on an ESP8266
 +
* convert espnow data to UDP/VBAN on the receiving end
 +
* convert UDP/VBAN to audio on laptop
  
 
Related interesting stuff:
 
Related interesting stuff:
Line 33: Line 42:
 
== Result ==
 
== Result ==
 
ESP NOW broadcast just seems to work fine (not sure what prevented me from making it work earlier).
 
ESP NOW broadcast just seems to work fine (not sure what prevented me from making it work earlier).
I've set the WiFi channel to 1.
+
I've fixed the WiFi channel to 1.
  
 
On the receiving side, I use an ESP32.
 
On the receiving side, I use an ESP32.
Line 41: Line 50:
 
* send a message
 
* send a message
 
* that's it!
 
* that's it!
 +
 +
Transmission appears to be very fast, taking less than a millisecond for 10 messages in a row.
 +
However, with broadcast, the sending side does not receive (or wait for) any acknowledgements, the tx callback just reports the broadcast address, the rx callback reports nothing.
  
 
== References ==
 
== References ==
 
* https://www.espressif.com/sites/default/files/documentation/esp-now_user_guide_en.pdf
 
* https://www.espressif.com/sites/default/files/documentation/esp-now_user_guide_en.pdf

Latest revision as of 15:37, 17 March 2020

Project EspNowAudio
350px
Status Initializing
Contact bertrik
Last Update 2020-03-17

What

The idea is to experiment a bit more with ESP now, in particular in combination with audio transfer.

Stuff to learn:

Possible end result: A kind of zero-standby power intercom. When you press the button, an ESP8266 is powered up. It immediately starts transmitting audio from a digital I2S microphone over ESP now. The receiving end will probably be an ESP32, that receives the ESP now audio and converts into a standardized audio-over-ip protocol, e.g. VBAN.

Plans:

  • build an Arduino playground project so I can access the API from the command line and play with it
  • start with an ESP32 + INMP441

Next steps:

  • build a framework to stream the data and determine stream rate:
    • queue is filled with random data
    • queue is emptied by an espnow send process running in the main loop()
    • espnow completion callback notifies when next packet can be sent
  • investigate I2S communication from a microphone on an ESP8266
  • convert espnow data to UDP/VBAN on the receiving end
  • convert UDP/VBAN to audio on laptop

Related interesting stuff:

Result

ESP NOW broadcast just seems to work fine (not sure what prevented me from making it work earlier). I've fixed the WiFi channel to 1.

On the receiving side, I use an ESP32. On the sending side, I use an ESP8266:

  • init the esp now library
  • add the broadcast address as a peer
  • send a message
  • that's it!

Transmission appears to be very fast, taking less than a millisecond for 10 messages in a row. However, with broadcast, the sending side does not receive (or wait for) any acknowledgements, the tx callback just reports the broadcast address, the rx callback reports nothing.

References