Release fw 0.8.5: BT1035 I2S boot init and hardware doc alignment.
Switch BT1035 bring-up from Line-In to I2S slave (AT+AUXCFG=3, AT+I2SCFG=67) to match the ADAU1701 PCM routing, confirm 2 kΩ I2C pull-ups on R1/R16, and sync firmware docs, AGENTS rules, and the DATASHEET bundle. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -37,7 +37,8 @@ namespace core {
|
||||
*/
|
||||
enum class Bt1035AtCommand {
|
||||
Ping, ///< AT — link check.
|
||||
AuxLineIn, ///< AT+AUXCFG=1 — wired Line-In from ADAU1701 (mandatory).
|
||||
I2sMode, ///< AT+AUXCFG=3 — I2S input from ADAU1701 (mandatory).
|
||||
I2sSlave48k32, ///< AT+I2SCFG=67 — I2S slave 48 kHz 32-bit (§5.1.4).
|
||||
PairDiscoverable, ///< AT+PAIR=1 — enter BR/EDR/BLE discoverable mode.
|
||||
PairHidden, ///< AT+PAIR=0 — leave discoverable mode.
|
||||
A2dpStat, ///< AT+A2DPSTAT — read A2DP link state.
|
||||
@@ -83,7 +84,10 @@ enum class Bt1035AtResponseKind {
|
||||
};
|
||||
|
||||
/** Number of commands in bootInitSequence(). */
|
||||
inline constexpr std::size_t kBt1035BootInitCommandCount = 2U;
|
||||
inline constexpr std::size_t kBt1035BootInitCommandCount = 3U;
|
||||
|
||||
/** Feasycom programming guide §5.1.4: I2S slave, 48 kHz, 32-bit. */
|
||||
inline constexpr std::uint8_t kBt1035I2sSlave48k32Param = 67U;
|
||||
|
||||
/**
|
||||
* @brief buildBt1035AtLine — serialise a command with CRLF terminator.
|
||||
@@ -102,7 +106,7 @@ inline constexpr std::size_t kBt1035BootInitCommandCount = 2U;
|
||||
* @brief bootInitSequence — mandatory bring-up commands in order.
|
||||
*
|
||||
* @dname bootInitSequence
|
||||
* @return Ping then AuxLineIn (AT+AUXCFG=1).
|
||||
* @return Ping, I2sMode (AUXCFG=3), I2sSlave48k32 (I2SCFG=67).
|
||||
* @pubstate none
|
||||
*
|
||||
* @author Michele Bigi
|
||||
@@ -165,6 +169,21 @@ parseBt1035A2dpStatResponse(std::string_view response);
|
||||
*/
|
||||
[[nodiscard]] std::string buildBt1035SetAutoConnLine(std::uint8_t times);
|
||||
|
||||
/**
|
||||
* @brief buildBt1035SetNameLine — AT+NAME with optional MAC suffix flag.
|
||||
*
|
||||
* @dname buildBt1035SetNameLine
|
||||
* @param name BR/EDR local name (1--31 ASCII bytes per Feasycom §5.1.16).
|
||||
* @param enableMacSuffix false sends Param2=0 (disable module suffix).
|
||||
* @return Full AT line including CRLF.
|
||||
* @pubstate none
|
||||
*
|
||||
* @author Michele Bigi
|
||||
* @date 2026-07-08
|
||||
*/
|
||||
[[nodiscard]] std::string buildBt1035SetNameLine(std::string_view name,
|
||||
bool enableMacSuffix = false);
|
||||
|
||||
/**
|
||||
* @brief parseBt1035NameResponse — extract +NAME= value.
|
||||
*
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace core {
|
||||
struct CompanionChipStatus {
|
||||
bool si4684Ready; ///< Si4684 HOST_LOAD completed.
|
||||
bool adau1701Ready; ///< ADAU1701 SigmaStudio download completed.
|
||||
bool bt1035Ready; ///< BT1035 Line-In init (AT+AUXCFG=1) completed.
|
||||
bool bt1035Ready; ///< BT1035 I2S init (AUXCFG=3 + I2SCFG=67) completed.
|
||||
};
|
||||
|
||||
} // namespace core
|
||||
|
||||
@@ -101,8 +101,10 @@ std::string buildBt1035AtLine(Bt1035AtCommand command)
|
||||
switch (command) {
|
||||
case Bt1035AtCommand::Ping:
|
||||
return "AT\r\n";
|
||||
case Bt1035AtCommand::AuxLineIn:
|
||||
return "AT+AUXCFG=1\r\n";
|
||||
case Bt1035AtCommand::I2sMode:
|
||||
return "AT+AUXCFG=3\r\n";
|
||||
case Bt1035AtCommand::I2sSlave48k32:
|
||||
return "AT+I2SCFG=67\r\n";
|
||||
case Bt1035AtCommand::PairDiscoverable:
|
||||
return "AT+PAIR=1\r\n";
|
||||
case Bt1035AtCommand::PairHidden:
|
||||
@@ -129,11 +131,21 @@ std::string buildBt1035SetAutoConnLine(std::uint8_t times)
|
||||
return "AT+AUTOCONN=" + std::to_string(times) + "\r\n";
|
||||
}
|
||||
|
||||
std::string buildBt1035SetNameLine(std::string_view name, bool enableMacSuffix)
|
||||
{
|
||||
if (name.empty() || name.size() > 31U) {
|
||||
return {};
|
||||
}
|
||||
return std::string("AT+NAME=") + std::string(name) + ","
|
||||
+ (enableMacSuffix ? "1" : "0") + "\r\n";
|
||||
}
|
||||
|
||||
std::array<Bt1035AtCommand, kBt1035BootInitCommandCount> bootInitSequence() noexcept
|
||||
{
|
||||
return std::array<Bt1035AtCommand, kBt1035BootInitCommandCount>{
|
||||
Bt1035AtCommand::Ping,
|
||||
Bt1035AtCommand::AuxLineIn,
|
||||
Bt1035AtCommand::I2sMode,
|
||||
Bt1035AtCommand::I2sSlave48k32,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -28,13 +28,24 @@ namespace {
|
||||
std::cerr << "init sequence size mismatch\n";
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
if (sequence[1U] != core::Bt1035AtCommand::AuxLineIn) {
|
||||
std::cerr << "AUXCFG=1 must be in init sequence\n";
|
||||
if (sequence[1U] != core::Bt1035AtCommand::I2sMode) {
|
||||
std::cerr << "I2S mode must be in init sequence\n";
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
const std::string aux = core::buildBt1035AtLine(core::Bt1035AtCommand::AuxLineIn);
|
||||
if (aux != "AT+AUXCFG=1\r\n") {
|
||||
std::cerr << "AUXCFG command line mismatch\n";
|
||||
if (sequence[2U] != core::Bt1035AtCommand::I2sSlave48k32) {
|
||||
std::cerr << "I2SCFG must be in init sequence\n";
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
const std::string i2sMode =
|
||||
core::buildBt1035AtLine(core::Bt1035AtCommand::I2sMode);
|
||||
if (i2sMode != "AT+AUXCFG=3\r\n") {
|
||||
std::cerr << "AUXCFG=3 command line mismatch\n";
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
const std::string i2sCfg =
|
||||
core::buildBt1035AtLine(core::Bt1035AtCommand::I2sSlave48k32);
|
||||
if (i2sCfg != "AT+I2SCFG=67\r\n") {
|
||||
std::cerr << "I2SCFG=67 command line mismatch\n";
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
return EXIT_SUCCESS;
|
||||
@@ -117,6 +128,11 @@ namespace {
|
||||
std::cerr << "AUTOCONN command line mismatch\n";
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
if (core::buildBt1035SetNameLine("DigiRadio-A1B2", false)
|
||||
!= "AT+NAME=DigiRadio-A1B2,0\r\n") {
|
||||
std::cerr << "NAME set command line mismatch\n";
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user