From 1594d3214f3399e9058c6a59b5473b4eb4aa8efe Mon Sep 17 00:00:00 2001 From: penfold42 Date: Tue, 9 Jun 2026 13:58:52 +1000 Subject: [PATCH 1/2] Suppress serial error -1 on startup. This is caused by the serial hardware detecting a break condition on startup. In serial init just perform a single dummy read after a 5mS delay --- src/serialmididevice.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/serialmididevice.cpp b/src/serialmididevice.cpp index 3fe01e8f9..e108587c3 100644 --- a/src/serialmididevice.cpp +++ b/src/serialmididevice.cpp @@ -58,6 +58,10 @@ boolean CSerialMIDIDevice::Initialize (void) // Ensure CR->CRLF translation is disabled for MIDI links ser_options &= ~(SERIAL_OPTION_ONLCR); m_Serial.SetOptions(ser_options); + // initial dummy read to suppress SERIAL_ERROR_BREAK + CTimer::Get()->MsDelay(5); // short delay for hardware to awaken + char dummy; + m_Serial.Read (&dummy, 1); return res; } @@ -71,7 +75,7 @@ void CSerialMIDIDevice::Process (void) if (nResult <= 0) { if(nResult!=0) - LOGERR("Serial.Read() error: %d\n",nResult); + LOGERR("Serial.Read() error: %d",nResult); return; } From fc27b083b74059fc660ea602326b50fa49397ed9 Mon Sep 17 00:00:00 2001 From: penfold42 Date: Tue, 9 Jun 2026 14:48:32 +1000 Subject: [PATCH 2/2] enhance mdnspub loggnig to include port and servcetype --- src/net/mdnspublisher.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/net/mdnspublisher.cpp b/src/net/mdnspublisher.cpp index 49ae79b82..3b69bc649 100644 --- a/src/net/mdnspublisher.cpp +++ b/src/net/mdnspublisher.cpp @@ -84,7 +84,7 @@ boolean CmDNSPublisher::PublishService (const char *pServiceName, const char *pS m_ServiceList.InsertAfter (nullptr, pService); } m_Mutex.Release (); - LOGDBG ("Publish service %s", (const char *) pService->ServiceName); + LOGDBG ("Publish service %s %s:%d", pServiceType, (const char *) pService->ServiceName, usServicePort); m_Event.Set (); // Trigger resent for everything return TRUE; } @@ -387,4 +387,4 @@ void CmDNSPublisher::SetDataLength (void) assert (m_pWritePtr > m_pDataLen); *reinterpret_cast (m_pDataLen) = le2be16 (m_pWritePtr - m_pDataLen - sizeof (u16)); m_pDataLen = nullptr; -} \ No newline at end of file +}