========================================================================
I use Bay-trail platform device to implement the COM with MBM image.
1. Connect to target device by SSH connection.
2. Check currently available USART interface by using "devcon" command.
ssh> devcon status *pnp0501
ACPI\PNP0501\0
Name: Communications Port
Driver is running.
ACPI\PNP0501\1
ACPI\PNP0501\1
Name: Communications Port
Driver is running.
2 matching device(s) found.
3. Specify USART interface. (In below command, I try to assign port 0 be named "SER1:")
ssh> reg add "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\enum\acpi\pnp0501\0\Device Parameters" /v PortName /t REG_SZ /d "SER1"
The operation completed successfully.
4. Set USART interfaces as removable.
ssh> reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\DeviceOverrides\*PNP0501\LocationPaths\*" /v Removable /t REG_DWORD /d 1
The operation completed successfully.
5. Reboot system to make above settings effective.
ssh> shutdown /r
6. Use GitHub sample code to check the USART are correct.
中文
========================================================================
使用 Bay-trail 平台的板子,使用 MBM image,實作 COM 的初始化。
1. 使用 SSH 連線至 device
2. 輸入"devcon status *pnp0501"
ssh> devcon status *pnp0501
ACPI\PNP0501\0
Name: Communications Port
Driver is running.
ACPI\PNP0501\1
ACPI\PNP0501\1
Name: Communications Port
Driver is running.
2 matching device(s) found.
3. 新增以下機碼去註冊 COM port (以下機碼是初始化 port 0 並命名為"SER1")
ssh> reg add
"HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\enum\acpi\pnp0501\0\Device
Parameters" /v PortName /t REG_SZ /d "SER1"
The operation completed successfully.
4. 新增以下機碼,設定為可卸除式裝置
ssh> reg add
"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\DeviceOverrides\*PNP0501\LocationPaths\*"
/v Removable /t REG_DWORD /d 1
The operation completed successfully.
5. 重開機讓設定啟動
ssh> shutdown /r
6. 使用 GitHub 上的範例程式去測試是否成功掃到 COM ports。