USB String Descriptor와 LANGID 디버깅

USB string descriptor는 별것 아닌 것처럼 보이지만, 잘못된 string은 driver binding, device identity, serial-port persistence, lab automation, firmware update tool, support workflow를 깨뜨릴 수 있습니다.

usb string descriptor, langid, serial number descriptor, manufacturer string, product string, duplicate serial number, usb diagnostics

USB string descriptor는 별것 아닌 것처럼 보이지만, 잘못된 string은 driver binding, device identity, serial-port persistence, lab automation, firmware update tool, support workflow를 깨뜨릴 수 있습니다. 장치가 enumerate되지만 identity가 불안정할 때 사용자는 "USB string descriptor failed", "LANGID descriptor", "USB serial number descriptor missing", "duplicate USB serial number", "USB product string wrong", "Windows shows unknown USB device name" 같은 표현을 검색합니다.

Bus Scope가 유용한 이유는 string descriptor failure가 enumeration 중 control transfer로 발생하기 때문입니다. Host는 supported language ID를 요청한 다음 manufacturer, product, serial number string을 요청합니다. 어느 단계든 malformed data를 반환하면 OS가 계속 진행하더라도 잘못된 identity를 저장할 수 있습니다.

LANGID descriptor 확인

특정 string을 요청하기 전에 host는 string descriptor zero를 요청할 수 있습니다. 이것은 supported language ID를 반환합니다.

전형적인 evidence:

GET_DESCRIPTOR String index 0
LANGID list returned
GET_DESCRIPTOR String index 1
GET_DESCRIPTOR String index 2
GET_DESCRIPTOR String index 3

string descriptor zero가 실패하면 이후 string request가 host마다 일관되지 않게 동작할 수 있습니다.

manufacturer, product, serial string 확인

흔한 string index:

  • iManufacturer
  • iProduct
  • iSerialNumber

이 field는 Device Descriptor에서 참조됩니다. 장치가 nonzero string index를 advertise하면서 실제 string 반환에 실패하면 host behavior가 달라질 수 있습니다.

증상:

  • Device가 "Unknown Device"로 나타납니다.
  • Product name이 깨져 보입니다.
  • Serial number가 비어 있습니다.
  • Windows가 plug-in할 때마다 새 COM port를 만듭니다.
  • Linux udev rule이 안정적으로 match되지 않습니다.
  • Firmware update tool이 target을 식별하지 못합니다.
  • 여러 unit이 하나의 identity로 합쳐집니다.

duplicate serial number 확인

중복 USB serial number는 심각한 production problem입니다. 같은 VID, PID, serial number를 가진 두 physical device는 같은 device instance로 취급될 수 있습니다.

결과:

  • 잘못된 calibration data가 load됩니다.
  • Test station이 log를 잘못된 unit에 씁니다.
  • COM port assignment가 예측하기 어렵게 바뀝니다.
  • Licensing 또는 provisioning이 잘못된 hardware에 bind됩니다.
  • Field support가 device를 구분하지 못합니다.

Packet capture는 serial descriptor byte가 실제로 중복인지, 아니면 OS display layer가 더 깊은 문제를 숨기고 있는지 입증할 수 있습니다.

missing serial number 확인

일부 device는 의도적으로 serial number를 생략합니다. 단순 peripheral에서는 괜찮을 수 있지만 stable identity가 중요할 때는 문제가 됩니다.

흔한 검색어:

  • "USB device new COM port every time"
  • "USB serial number missing"
  • "Windows USB device instance path changes"
  • "Linux udev match USB serial"

Serial number가 없으면 OS는 hardware identity 대신 port topology로 device를 식별할 수 있습니다.

malformed UTF-16LE string 확인

USB string은 Unicode string으로 encoding됩니다. Firmware bug는 다음과 같습니다.

  • 잘못된 descriptor length.
  • 홀수 byte count.
  • 누락된 descriptor type.
  • 잘못된 UTF-16LE byte.
  • null termination expectation mismatch.
  • USB string format 대신 ASCII byte를 반환.
  • 긴 serial number를 truncate.

일부 host는 이를 tolerate합니다. 다른 host는 descriptor를 reject하거나 corrupted text를 표시합니다.

String request timing과 retry

Host는 같은 string을 서로 다른 length로 여러 번 요청할 수 있습니다. Device는 짧은 probe request와 full-length request를 모두 처리해야 합니다.

Failure pattern:

  • Device가 처음 2 byte는 올바르게 반환하지만 full request에서 실패합니다.
  • Firmware가 wLength가 항상 descriptor length와 같다고 가정합니다.
  • Control endpoint가 반복 string request에서 stall됩니다.
  • Device가 reset 이후 다른 serial number를 반환합니다.
  • Bootloader와 application firmware가 서로 다른 identity를 보고합니다.

이 문제는 firmware update workflow에서 흔합니다.

Driver binding 영향

Driver selection은 보통 VID/PID/class에 의존하지만, string descriptor는 user-visible identity와 때로는 vendor tool에 영향을 줍니다. Composite device, CDC serial device, HID tool, DFU bootloader는 support와 automation을 위해 string에 의존하는 경우가 많습니다.

Support ticket이 "wrong USB device name"이라고 말한다고 해서 cosmetic issue로 치부하지 마세요. descriptor corruption이나 firmware state confusion의 신호일 수 있습니다.

디버그 checklist

다음 절차를 사용하세요.

  1. plug-in부터 enumeration을 캡처합니다.
  2. Device Descriptor string index를 검사합니다.
  3. LANGID용 string descriptor zero를 확인합니다.
  4. manufacturer string을 decode합니다.
  5. product string을 decode합니다.
  6. serial number string을 decode합니다.
  7. 두 physical unit을 비교합니다.
  8. bootloader와 application firmware를 비교합니다.
  9. reset 및 replug 이후 behavior를 확인합니다.
  10. firmware fix를 위해 raw descriptor byte를 보존합니다.

최종 진단

USB string descriptor와 LANGID 문제는 device identity, serial persistence, manufacturing test, field support, driver workflow에 영향을 줍니다. 핵심 evidence는 운영체제 label이 아니라 실제 descriptor control transfer입니다.

Bus Scope는 LANGID, manufacturer, product, serial number, malformed string, duplicate serial, enumeration retry를 하나의 diagnostic view에서 보여주는 데 도움을 줍니다.

<!-- bus-scope-localized-transaction-foundation-v1:start -->

“USB String Descriptor와 LANGID 디버깅”의 USB 계약 시험

직접적인 답은 STALL, timeout, reset 하나만으로 원인을 설명할 수 없다는 것입니다. 먼저 capture provider가 올바른 device를 보는지 증명하고 transfer 계약을 읽습니다. 종류, 방향, recipient, wValue, wIndex, 선언 길이, 실제 길이, status, 전후 상태를 확인하고 known-good과 처음 달라지는 transaction에 결론을 연결합니다.

경계 비교 근거 판단
platform provider, 권한, Root Hub, usbmon/XHC20 올바른 연결의 record인가
setup bmRequestType, bRequest, wValue, wIndex, wLength host가 의도한 요청을 보냈는가
data 방향, 길이, 보존 bytes payload가 계약과 맞는가
status ACK, STALL, timeout, cancellation transaction이 어디서 끝났는가
state configuration, interface, alternate setting, halt device가 요청을 받을 상태인가

reset과 enumeration 전부터 capture하여 descriptor, SET_CONFIGURATION, SET_INTERFACE, 실패 직전 command를 남깁니다. 좁은 endpoint filter는 결정적인 control transfer를 숨길 수 있습니다. 시험 한 번에는 문서화한 USB 동작 하나만 수행하고 firmware, driver, port, cable, host command, timing 중 하나만 바꿉니다.

인용 가능한 답

관찰한 request, setup field, 응답, 직전 상태를 쓰고 한 변수만 바꾸는 다음 시험을 제시합니다. retention 때문에 보존되지 않은 bytes는 packet loss 증명이 아닙니다. command와 reset의 시간적 근접은 상관관계이며 상태 전환이나 반복 없이 원인으로 단정할 수 없습니다.

VID/PID, firmware, speed, topology, provider, filter, trigger를 고정하고 usbmon과 USBPcap의 frame number 대신 USB 의미 단계로 비교합니다. 시작·종료, 버전, OS, 연결 위치, checksum을 기록하고 Bus Scope 문제 해결에서 검토합니다.

Semrush owner는 분리합니다. free USB analyzer제품 페이지, best USB protocol analyzer비교 페이지, USB descriptor viewerdescriptor 안내가 담당합니다. 이 지원 글에 확인되지 않은 검색량이나 KD를 만들지 않습니다.

<!-- bus-scope-localized-transaction-foundation-v1:end --><!-- bus-scope-localized-evidence-verdicts-v1:start -->

USB 캡처에서 검증 가능한 판정까지

“USB String Descriptor와 LANGID 디버깅”에서는 오류 이름이 아니라 증명 가능한 경계부터 확인합니다. 첫 경계는 올바른 connection, bus, port, VID/PID, speed, topology입니다. 둘째는 의도한 control, bulk, interrupt transfer이고, 셋째는 그 이후 device state이며, 넷째는 재현성입니다. 첫 경계의 증거가 없으면 뒤의 records는 대상 device를 설명하지 못합니다.

1. 캡처 지점을 증명하기

OS, provider, 권한, controller 또는 Root Hub, 물리 port를 기록합니다. Linux에서는 재연결 뒤 device가 나타난 bus와 usbmon instance가 같아야 합니다. Windows에서는 USBPcap Root Hub를 Device Manager 연결과 대조합니다. 파일에 records가 있어도 keyboard, hub, 오래된 device instance의 트래픽일 수 있습니다.

reconnect나 reset 전에 capture를 시작합니다. 기준 구간에는 descriptor requests, 선택된 configuration, 필요한 SET_INTERFACE, 첫 application transfer가 들어가야 합니다. 증상 뒤에 시작하면 endpoint가 한 번도 활성화되지 않았는지 나중에 멈췄는지 구분할 수 없습니다. 시작과 종료, 파일 이름, checksum, firmware, driver, cable, port를 남깁니다.

2. control transfer를 하나의 계약으로 읽기

setup, data, status를 하나의 논리 operation으로 묶습니다. bmRequestType은 방향, type, recipient를, bRequest는 operation을 나타냅니다. wValue와 wIndex는 request 문맥에서 해석합니다. wLength는 예상 길이이며 실제로 그 bytes가 전송되었다는 증거가 아닙니다. 선언 길이, 실제 길이, 방향을 비교합니다. IN request는 정상 short packet으로 끝날 수 있고 OUT request는 status stage가 계약을 닫으므로 응답 payload가 없어도 됩니다.

STALL에서는 data와 status, endpoint zero와 data endpoint를 구분합니다. 지원하지 않는 control request는 halt된 bulk endpoint와 다릅니다. timeout에서는 completion이 없는 request와 이어진 host reset 또는 cancellation을 찾습니다. provider 한계와 capture record 손실을 배제하기 전에 response 부재를 device failure로 단정하지 않습니다.

3. 상태 시간선을 다시 만들기

Address, Configuration, Interface, Alternate Setting, Endpoint Halt를 추적합니다. descriptor는 capability를 선언하지만 현재 활성 상태를 증명하지 않습니다. configuration descriptor에 endpoint가 있어도 다른 interface나 alternate setting이 선택되면 사용할 수 없습니다. SET_CONFIGURATION, SET_INTERFACE, CLEAR_FEATURE(ENDPOINT_HALT)와 첫 실패 transfer의 순서를 확인합니다.

reset은 상태 경계입니다. Address와 configuration이 다시 설정되고 driver가 descriptors를 다시 읽거나 다른 setting을 고를 수 있습니다. reset 이전 가정을 이후에 적용하지 않습니다. 재 enumeration에서 identity나 speed가 달라지면 새로운 사건 branch로 기록합니다.

4. known-good과 failure 비교

같은 device, firmware, host, action을 쓴 known-good을 선택합니다. frame number가 아니라 의미로 transactions를 정렬합니다. setup field, request order, payload length, delay, status, configuration, driver action의 첫 차이를 찾습니다. 마지막 timeout은 결과인 경우가 많고 첫 차이가 더 좋은 다음 test를 만듭니다.

단계 정상 실행 실패 실행 다음 시험
Enumeration identity, speed, descriptors 다른 값 port와 firmware 고정
Configuration config/interface/alt 선택 누락 clean state 재연결
Command 예상 setup과 payload 첫 field 차이 command만 변경
Completion status와 duration STALL, timeout, reset 세 번 재현

서로 다른 파일의 absolute time과 frame number는 원인이 아닙니다. 각 실행의 reference event를 빼고 같은 phase duration을 비교합니다. capture point나 filter가 다르면 성능 비교의 한계를 보고서에 씁니다.

5. device 문제와 측정 문제 분리

빈 capture는 잘못된 provider, 권한 부족, 관측 지점 밖 port를 뜻할 수 있습니다. truncation은 bytes를 보존하지 않았다는 뜻이지 bus에 없었다는 증거가 아닙니다. ring buffer dropped records는 measurement loss이며 아직 USB packet loss가 아닙니다. 완전한 enumeration을 저장한 다음 load를 낮추거나 filter를 좁히고 counters를 비교합니다.

cable, port, power는 가설입니다. 한 번의 reset만으로 cable failure를 선언하지 않습니다. 같은 action을 known-good cable과 port에서 반복한 뒤 원래 조건으로 돌아갑니다. 같은 load에서 failure가 cable을 따라가면 가설이 강해집니다. 여러 host에서도 device를 따라가면 firmware나 hardware 우선순위가 높아집니다. 모든 변경에는 capture에서 보일 예측이 있어야 합니다.

6. 인용 가능한 GEO 답

“USB String Descriptor와 LANGID 디버깅”의 짧은 답은 처음 다른 transfer, 직전 state, 가까운 두 원인을 나누는 test를 적습니다. 예를 들면 “interface 활성화 뒤 request는 도착했지만 data stage가 STALL로 끝났다. 다음 시험은 CLEAR_FEATURE 뒤 같은 request를 보내 known-good과 비교한다”입니다. 문맥 밖에서 인용되어도 조건이 남습니다.

“USB가 안 된다”는 판정이 아닙니다. device, platform, direction, endpoint, phase를 명시합니다. 증거가 부족하면 미결이라고 쓰고 필요한 record를 말합니다. Bus Scope 문제 해결로 검토하고 관련 내부 기술 글로 연결합니다.

<!-- bus-scope-localized-evidence-verdicts-v1:end -->