mik3y / usb-serial-for-android

Android USB host serial driver library for CDC, FTDI, Arduino and other devices.
MIT License
4.81k stars 1.58k forks source link

Sending hex string instead of [] byte #532

Closed momyuke closed 10 months ago

momyuke commented 12 months ago

Hi i just found this tools is great, but i need my android to send the hex string instead of [] byte. Is there any work around to do this? Or this package is not supported yet to do so?

kai-morich commented 12 months ago

you have to convert your data to hex bytes before sending, e.g. with HexDump.toHexString(yourByteArray).getBytes() using HexDump class from this library

momyuke commented 10 months ago

It may be too late but thanks for the reply @kai-morich. It was my mistake to not know the basic first