Complete implementation of Spanish (es-419) language support: - Canonical catalogs and data: messages/es.json, data/es/**, lib/data/es/**, public/exemplos/es/** - Canonical slugs: /es/series, /es/catalogo, /es/comparacion, /es/componentes, /es/diagnostico, /es/frameworks, /es/glosario, /es/selector, /es/acerca - Dedicated search index at /api/busca/es with Spanish accent normalization - Strict exclusion of book references in Spanish routes and catalogs - Language selector and root negotiation with es active (ENABLED_LOCALES = ['pt', 'en', 'es']) - Extended verification suite: check-i18n, smoke-imagem and verifica-vazamentos Co-Authored-By: Antigravity <noreply@google.com>
160 lines
7.9 KiB
React
160 lines
7.9 KiB
React
import { paginaMeta, jsonLd } from "@/lib/seo";
|
|
|
|
export async function generateMetadata({ params }) {
|
|
const { locale } = await params;
|
|
const isEn = locale === "en";
|
|
const isEs = locale === "es";
|
|
return paginaMeta({
|
|
titulo: isEs
|
|
? "Diagnóstico de errores comunes en ESP32: Guía profesional"
|
|
: isEn
|
|
? "Common ESP32 Errors & Diagnostics: Professional Guide"
|
|
: "Diagnóstico de Erros Comuns no ESP32: Guia Profissional",
|
|
descricao: isEs
|
|
? "Guía técnica definitiva para identificar y solucionar Brownout, Guru Meditation, Task Watchdog, Stack Overflow, fugas de memoria y fallas de arranque en ESP32 (Arduino y ESP-IDF)."
|
|
: isEn
|
|
? "Definitive technical guide to identify and fix Brownout, Guru Meditation, Task Watchdog, Stack Overflow, memory leaks, and boot issues on ESP32 (Arduino & ESP-IDF)."
|
|
: "Guia técnico definitivo para identificar e resolver Brownout, Guru Meditation, Task Watchdog, Stack Overflow, vazamento de memória e falhas de boot no ESP32 (Arduino e ESP-IDF).",
|
|
caminho: "/diagnostico",
|
|
locale,
|
|
keywords: isEs
|
|
? [
|
|
"errores comunes ESP32",
|
|
"brownout detector was triggered",
|
|
"guru meditation error",
|
|
"task watchdog got triggered",
|
|
"stack canary watchpoint triggered",
|
|
"cómo depurar ESP32",
|
|
"ESP32 reiniciando en bucle",
|
|
"failed to connect to esp32",
|
|
]
|
|
: isEn
|
|
? [
|
|
"common ESP32 errors",
|
|
"brownout detector was triggered",
|
|
"guru meditation error",
|
|
"task watchdog got triggered",
|
|
"stack canary watchpoint triggered",
|
|
"how to debug ESP32",
|
|
"ESP32 bootloop rebooting",
|
|
"failed to connect to esp32",
|
|
]
|
|
: [
|
|
"erros comuns ESP32",
|
|
"brownout detector was triggered",
|
|
"guru meditation error",
|
|
"task watchdog got triggered",
|
|
"stack canary watchpoint triggered",
|
|
"como debugar ESP32",
|
|
"ESP32 reiniciando em loop",
|
|
"failed to connect to esp32",
|
|
],
|
|
});
|
|
}
|
|
|
|
const faqsPt = [
|
|
{
|
|
pergunta: "O que causa o erro 'Brownout detector was triggered' no ESP32?",
|
|
resposta: "Ocorre quando a tensão no pino 3V3 cai abaixo de 2.8V ~ 2.43V devido a picos rápidos de corrente do rádio Wi-Fi/BLE (superando 500mA), cabos USB finos ou regulador LDO inadequado. A solução de engenharia envolve adicionar capacitores Low-ESR de 10µF a 100µF próximos ao VCC e usar LDOs robustos de 600mA+.",
|
|
},
|
|
{
|
|
pergunta: "Como resolver o 'Guru Meditation Error (LoadProhibited)'?",
|
|
resposta: "LoadProhibited indica tentativa de acessar um ponteiro nulo (NULL) ou inválido na memória. A solução consiste em usar o Espressif Exception Decoder ou addr2line para localizar a linha exata no código e implementar validações defensivas como if (ponteiro != NULL).",
|
|
},
|
|
{
|
|
pergunta: "Por que o Task Watchdog Timer (TWDT) dispara no FreeRTOS?",
|
|
resposta: "O TWDT dispara quando uma tarefa de prioridade maior monopoliza a CPU em um loop bloqueante (ex: while(1) sem vTaskDelay), impedindo a tarefa IDLE de alimentar o watchdog do sistema operacional.",
|
|
},
|
|
{
|
|
pergunta: "Por que conexões HTTPS e TLS falham com código -0x2700 no ESP32?",
|
|
resposta: "Porque ao ligar, o ESP32 inicia o relógio interno no ano de 1970. O validador de certificados TLS considera o certificado do servidor inválido por estar no 'futuro'. Sincronizar o relógio via SNTP (configTime) antes da conexão resolve o problema.",
|
|
},
|
|
];
|
|
|
|
const faqsEn = [
|
|
{
|
|
pergunta: "What causes 'Brownout detector was triggered' on ESP32?",
|
|
resposta: "It occurs when the 3V3 rail drops below 2.8V ~ 2.43V during rapid Wi-Fi/BLE radio current spikes (often exceeding 500mA), caused by thin USB cables or an undersized LDO regulator. The engineering solution involves placing 10µF to 100µF Low-ESR bypass capacitors near VCC and using 600mA+ robust LDO regulators.",
|
|
},
|
|
{
|
|
pergunta: "How to resolve 'Guru Meditation Error (LoadProhibited)'?",
|
|
resposta: "LoadProhibited indicates an attempt to read from or write to a null (NULL) or invalid memory address. The fix involves using the Espressif Exception Decoder or addr2line to pinpoint the source line and applying defensive checks such as if (ptr != NULL).",
|
|
},
|
|
{
|
|
pergunta: "Why does the Task Watchdog Timer (TWDT) trigger in FreeRTOS?",
|
|
resposta: "The TWDT triggers when a high-priority task monopolizes the CPU in a tight blocking loop (e.g. while(1) without vTaskDelay), starving the lower-priority IDLE task that feeds the operating system watchdog.",
|
|
},
|
|
{
|
|
pergunta: "Why do HTTPS and TLS connections fail with error -0x2700 on ESP32?",
|
|
resposta: "On boot, the ESP32 internal system clock starts at epoch year 1970. The TLS certificate validator rejects the server certificate because its validity dates appear in the distant 'future'. Synchronizing time via SNTP (configTime) prior to initiating TLS connections resolves the issue.",
|
|
},
|
|
];
|
|
|
|
const faqsEs = [
|
|
{
|
|
pergunta: "¿Qué causa el error 'Brownout detector was triggered' en el ESP32?",
|
|
resposta: "Ocurre cuando la tensión en el pin 3V3 cae por debajo de 2.8V ~ 2.43V debido a picos rápidos de corriente de la radio Wi-Fi/BLE (que superan los 500mA), cables USB delgados o un regulador LDO inadecuado. La solución de ingeniería implica agregar condensadores Low-ESR de 10µF a 100µF cerca de VCC y usar reguladores LDO robustos de más de 600mA.",
|
|
},
|
|
{
|
|
pergunta: "¿Cómo solucionar el 'Guru Meditation Error (LoadProhibited)'?",
|
|
resposta: "LoadProhibited indica un intento de acceder a un puntero nulo (NULL) o inválido en la memoria. La solución consiste en utilizar Espressif Exception Decoder o addr2line para localizar la línea exacta en el código e implementar comprobaciones defensivas como if (puntero != NULL).",
|
|
},
|
|
{
|
|
pergunta: "¿Por qué se activa el Task Watchdog Timer (TWDT) en FreeRTOS?",
|
|
resposta: "El TWDT se activa cuando una tarea de mayor prioridad monopoliza la CPU en un bucle bloqueante (por ejemplo: while(1) sin vTaskDelay), impidiendo que la tarea IDLE alimente el watchdog del sistema operativo.",
|
|
},
|
|
{
|
|
pergunta: "¿Por qué fallan las conexiones HTTPS y TLS con el código -0x2700 en ESP32?",
|
|
resposta: "Porque al encenderse, el reloj interno del ESP32 comienza en el año 1970. El validador de certificados TLS considera inválido el certificado del servidor por estar en el 'futuro'. Sincronizar el reloj mediante SNTP (configTime) antes de la conexión resuelve el problema.",
|
|
},
|
|
];
|
|
|
|
export default async function DiagnosticoLayout({ children, params }) {
|
|
const { locale } = await params;
|
|
const isEn = locale === "en";
|
|
const isEs = locale === "es";
|
|
const faqs = isEs ? faqsEs : isEn ? faqsEn : faqsPt;
|
|
|
|
return (
|
|
<>
|
|
<script
|
|
type="application/ld+json"
|
|
dangerouslySetInnerHTML={{
|
|
__html: JSON.stringify(
|
|
jsonLd.trilha([
|
|
{ nome: isEs ? "Inicio" : isEn ? "Home" : "Início", caminho: isEs ? "/es" : isEn ? "/en" : "/" },
|
|
{ nome: isEs ? "Diagnóstico y errores comunes" : isEn ? "Diagnostics & Common Errors" : "Diagnóstico & Erros Comuns", caminho: isEs ? "/es/diagnostico" : isEn ? "/en/diagnostics" : "/diagnostico" },
|
|
])
|
|
),
|
|
}}
|
|
/>
|
|
<script
|
|
type="application/ld+json"
|
|
dangerouslySetInnerHTML={{
|
|
__html: JSON.stringify(
|
|
jsonLd.perguntas(faqs)
|
|
),
|
|
}}
|
|
/>
|
|
<script
|
|
type="application/ld+json"
|
|
dangerouslySetInnerHTML={{
|
|
__html: JSON.stringify(
|
|
jsonLd.aplicacaoWeb({
|
|
nome: isEs ? "Guía de diagnóstico y errores en ESP32" : isEn ? "ESP32 Error Diagnostics & Debugging Guide" : "Guia de Diagnóstico e Erros no ESP32",
|
|
descricao: isEs
|
|
? "Herramienta y guía técnica de análisis de fallas, pánicos de CPU y decodificación de registros en ESP32."
|
|
: isEn
|
|
? "Technical guide and log decoder for troubleshooting CPU panics, crashes, and exceptions on ESP32."
|
|
: "Ferramenta e guia técnico de análise de falhas, pânicos de CPU e decodificação de logs no ESP32.",
|
|
caminho: isEs ? "/es/diagnostico" : isEn ? "/en/diagnostics" : "/diagnostico",
|
|
locale,
|
|
})
|
|
),
|
|
}}
|
|
/>
|
|
{children}
|
|
</>
|
|
);
|
|
}
|