Grove and other Bosch modules strap SDO high, so the 0x76-only table
never initialized them. Add an alternate-address entry per Bosch sensor;
the bus scan still gates every probe, and all four drivers verify a chip
ID before claiming an address.
Each sensor type has a single static driver instance, so skip an entry
whose query is already active: the alternate address is a fallback, not
a second device.
Several table entries share an address and not every driver verifies a
chip ID: INA226::begin() only checks that the address ACKs, so an SHT4x
at 0x44 was also registered as an INA226 and reported junk current on a
second channel. Mark the address consumed once a driver initializes it
so later entries cannot re-claim the same device.
boards/tracker-t1000-e.json set the application's usb_product to
"T1000-E-BOOT". PlatformIO's nordicnrf52 builder turns that key into
-DUSB_PRODUCT, which lands in the USB device descriptor, so a running
node enumerates as "T1000-E-BOOT" while the Seeed bootloader enumerates
as "T1000-E". The firmware that is not the bootloader is the one wearing
the bootloader's name.
That misidentification is load-bearing in the web flasher.
flasher.meshcore.io calls navigator.serial.requestPort() with no filters,
so the row label in the browser's port chooser -- which the browser builds
from the USB iProduct string -- is the only signal the user has. The nRF52
flow prompts twice, once for the 1200-baud DFU touch and again for the
flash itself, with no re-enumeration watcher in between, and at that
second prompt the two candidate rows read:
T1000-E-BOOT (239a:8029) <- the application
T1000-E (2886:0057) <- the actual bootloader
which is backwards at the moment the user has to tell them apart.
The same define is also the Adafruit core's CFG_DEFAULT_NAME, so it is
what a companion advertises over BLE whenever the intended name is too
long for the GAP device-name attribute and setName() silently fails
(#1769). The string is user-visible over Bluetooth as well.
Name the application after the firmware it runs rather than after the
board. This deliberately differs from the hardware-name convention in the
other nRF52 board files ("WisCore RAK4631 Board", "Seeed Wio Tracker L1")
because the string's job here is to distinguish the running application
from a bootloader that will never claim to be MeshCore; "Seeed T1000-E"
would sit one word away from the bootloader's "T1000-E".
Upload and flashing are unaffected -- PlatformIO's port autodetect matches
on hwids (VID:PID), not on this string. On Linux the /dev/serial/by-id
symlink does change, from usb-Seeed_Studio_T1000-E-BOOT_<serial>-if00 to
usb-Seeed_Studio_MeshCore_T1000-E_<serial>-if00, so anything pinned to the
old path needs updating.
RadioLibWrapper::setTxPower() called setOutputPower() and nothing else. On
LR2021 that writes the PA config and TxParams, which are standby-only commands,
and it never re-arms the receiver.
This only affects LR2021 boards. recvRaw() has:
#if defined(USE_LR2021)
state = STATE_RX; // LR2021 stays in Rx after readData
#else
state = STATE_IDLE; // need another startReceive()
#endif
so on SX126x the next recvRaw() re-arms Rx anyway and the write is harmless,
while on LR2021 startReceive() is never called again on its own. A 'set tx'
issued while the radio was listening could therefore stop reception until the
next reboot. Observed a few times on an LR2021 repeater; recovery required a
power cycle.
Dispatcher's stuck-radio check does not catch it: isInRecvMode() reports the
wrapper's own `state` flag rather than the chip's actual mode, so it still
believes the radio is in Rx, and it only raises ERR_EVENT_STARTRX_TIMEOUT
without attempting recovery.
Fix: on LR2021, drop to standby via idle() before writing the PA config and let
checkRecv() re-arm Rx - the same pattern resetAGC() and
applySideDetectorConfig() already use. Other radios are left untouched.
Affects meshtracker_x1 and meshnology_w12 (both USE_LR2021).
Tested on hardware with an LR2021 repeater: six consecutive 'set tx' changes
(15/18/21/14/19/14), after which the radio kept receiving and forwarding
traffic (rawrx/rxpkts increasing, no missed IRQs). Noise-floor sampling also
kept updating, which only happens while state == STATE_RX.
The contact sync streams up to MAX_CONTACTS frames back to back, but
ArduinoSerialInterface never checked whether the stream could take
them: isWriteBusy() returned false unconditionally, so MyMesh's pacing
gate had no effect, and writeFrame() called write() without looking at
availableForWrite(). On ESP32 (HWCDC, 256 byte TX ring) a host that
stalls for a moment makes the driver drop queued bytes silently, which
tears a frame in half - and since the framing is length prefixed with
no checksum and no resync marker, the client stays desynchronised for
the rest of the session. Reported as 'the app disconnects while
syncing contacts' on devices with a large contact list.
Add opt-in flow control: report busy until a whole frame fits, and
drop frames as a unit instead of tearing them. Enable it for the
companion USB interface and give HWCDC a bigger TX buffer with a short
write timeout, mirroring what kiss_modem already does.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
ArduinoSerialInterface::isConnected() always returned true, so any
companion build with a USB interface believes a client is attached from
boot onwards. Two user visible effects:
- new message notifications never fire, because MyMesh only notifies
the UI (display, buzzer) while no client is connected
- on builds that also expose BLE the home screen shows '< Connected >'
instead of the BLE pairing PIN, so a freshly flashed device cannot be
paired at all
Add an optional connection check callback and wire it up per platform:
native USB-CDC (TinyUSB on nRF52/RP2040/ESP32 with USB_MODE=0) exposes
real DTR through (bool)Serial. The ESP32 USB-Serial-JTAG peripheral has
no DTR concept - it reports 'connected' as soon as the host enumerated
the device - so fall back to frame activity there. Plain UARTs keep the
previous assume-connected behaviour.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>