We have multiple cp2110 boards . Is there a way to upload the firmware image using XMODEM send command with HID and UART interface .
HOST ( COM5 ) -> HID -> UART -> HARD DRIVE
Hard drive is connected to system with HID and UART interface .
We need to install new firmware on the drive . Hence we need to run 'image upload' command and upload the firmware image with XMODEM send command .
Can any one share the pythenic way of doing it . If possible , please share the python class file used for image upload.
I uploaded some python scripts to wrap the hid to uart and hid device dlls, which should be helpful, here: https://www.silabs.com/community/interface/forum.topic.html/how_to_load_the_windowsdllfilesincprogramon-s8lO
As for the XMODEM protocol, you'll have to create that yourself, I didn't see any example of it in our test scripts.
Thanks . One last question , how do we establish serial communication to the drive ? Is this piece of code from your test sample file will establish serial connection to the hard drive ?
# HidUart_SetUartConfig(HID_UART_DEVICE device, DWORD baudRate, BYTE dataBits, BYTE parity, BYTE stopBits, BYTE flowControl);
def SetUartConfig(self, baud=115200, data=HID_UART.EIGHT_DATA_BITS,
parity=HID_UART.NO_PARITY, stop=HID_UART.SHORT_STOP_BIT, flow=HID_UART.NO_FLOW_CONTROL):
_DLL.HidUart_SetUartConfig(self.handle, baud, data, parity, stop, flow)
Can we make a COM port connected to the hard drive through HID/UART to act as serial device ?
The CP2110 will not appear as a COM port to your OS. I suppose it may be possible to wrap the HID functions in such a way that it looks like a COM port, but only to the program that has access to your wrapper. If you need a COM port interface, I would check out a CP210x part, like the CP2102N.
Thanks for the help . We have CP2110 Boards . Want to access the hard drive with COM port serial interface . Do you have any Python example for wrapping HID functions in such a way that it looks like COM port ( so that we can use python pyserial module to open the COM port )
Hmm.. Finding it very complicated !!!!
One should have an easy way to access serial port via COM