<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[M5Stack Core+Base WIFI issue]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">I am trying to build an audio streaming project on M5Stack, it is a really good prototyping platform!<br />
Now I got a WIFI issue: UDP packets will become significantly lost if I connect with bases, but there is no problem if I just uses core.<br />
Here is my testing program (sending null RTP packets to my phone)</p>
<p dir="auto">===<br />
#include "WiFi.h"<br />
#include "AsyncUDP.h"</p>
<p dir="auto">const char * ssid = "xxxxx";<br />
const char * password = "xxxxx";</p>
<p dir="auto">AsyncUDP udp;</p>
<p dir="auto">void setup()<br />
{<br />
Serial.begin(115200);<br />
WiFi.mode(WIFI_STA);<br />
WiFi.begin(ssid, password);<br />
if (WiFi.waitForConnectResult() != WL_CONNECTED) {<br />
Serial.println("WiFi Failed");<br />
while(1) {<br />
delay(1000);<br />
}<br />
}</p>
<p dir="auto">}</p>
<p dir="auto">#define RTP_PAYLOAD_SIZE            160 //=8K/50</p>
<p dir="auto">/** RTP header constants */<br />
#define RTP_VERSION                 0x80<br />
#define RTP_TIMESTAMP_INCREMENT     160 //=8K/50<br />
#define RTP_SSRC                    0<br />
//#define RTP_PAYLOADTYPE             0 //=u-law<br />
#define RTP_PAYLOADTYPE             8 //=a-law<br />
#define RTP_MARKER_MASK 0x80</p>
<p dir="auto">unsigned rtp_seq = 0, rtp_timestamp = 0;</p>
<h1>void loop()<br />
{<br />
delay(10);<br />
AsyncUDPMessage rtp;<br />
rtp.write(RTP_VERSION);<br />
rtp.write(RTP_PAYLOADTYPE);<br />
rtp.write((rtp_seq&gt;&gt;8)&amp;0xFF);<br />
rtp.write((rtp_seq)&amp;0xFF);<br />
rtp.write((rtp_timestamp&gt;&gt;24)&amp;0xFF);<br />
rtp.write((rtp_timestamp&gt;&gt;16)&amp;0xFF);<br />
rtp.write((rtp_timestamp&gt;&gt;8)&amp;0xFF);<br />
rtp.write((rtp_timestamp)&amp;0xFF);<br />
rtp.write(0); //SSRC<br />
rtp.write(0); //SSRC<br />
rtp.write(0); //SSRC<br />
rtp.write(0); //SSRC<br />
for (int i = 0; i &lt; RTP_PAYLOAD_SIZE; i++)<br />
rtp.write(0);<br />
udp.sendTo(rtp, IPAddress(192,168,0,222), 55555);<br />
//rtp_seq++;<br />
//rtp_timestamp += RTP_TIMESTAMP_INCREMENT;<br />
<a href="//udp.broadcastTo" target="_blank" rel="noopener noreferrer nofollow ugc">//udp.broadcastTo</a>("Anyone here?", 1234);<br />
}</h1>
<p dir="auto">RtpSpk app: <a href="https://play.google.com/store/apps/details?id=com.rtpspk" target="_blank" rel="noopener noreferrer nofollow ugc">https://play.google.com/store/apps/details?id=com.rtpspk</a></p>
<p dir="auto">Results:</p>
<p dir="auto">Bitrate is normal if I use core only:<br />
<img src="/assets/uploads/files/1560511591387-wifi-good.png" alt="3_1560511587935_WIFI good.png" class=" img-fluid img-markdown" /> <img src="/assets/uploads/files/1560511591199-wifi-good.jpg" alt="2_1560511587935_WIFI good.jpg" class=" img-fluid img-markdown" /></p>
<p dir="auto">Bitrate is small if I connect to base:<br />
<img src="/assets/uploads/files/1560511591349-wifi-bad.png" alt="1_1560511587935_WIFI bad.png" class=" img-fluid img-markdown" /> <img src="/assets/uploads/files/1560511590804-wifi-bad.jpg" alt="0_1560511587934_WIFI bad.jpg" class=" img-fluid img-markdown" /></p>
<p dir="auto">Can anyone help me for this issue? How to solve UDP packet lost when using bases? Thanks a lot!</p>
<p dir="auto">BRs,<br />
-Engin</p>
]]></description><link>https://community.m5stack.com/topic/1082/m5stack-core-base-wifi-issue</link><generator>RSS for Node</generator><lastBuildDate>Thu, 30 Apr 2026 20:37:33 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/1082.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 14 Jun 2019 11:42:36 GMT</pubDate><ttl>60</ttl></channel></rss>