Skip to content

Wonder What makes physicaloid.open() fail #36

@kotran88

Description

@kotran88

Hello :)
I tested with node mcu(with cp2102) and works quite well.
but I made custom pcb with cp2102 and usb-c .
when I attach it to my phone,
my custom pcb is wired like
cp2102's D+ and D- is connected to usb-c 's D+ and D-
and cp2102 ' rx tx is connected to mcu's tx,rx

I connect my custom pcb to phone and it detects cp2102 well as code below.

UsbManager manager = (UsbManager) getSystemService(Context.USB_SERVICE);
        HashMap<String, UsbDevice> deviceList = manager.getDeviceList();

and I open physicaloid as below

    mPhysicaloid = new Physicaloid(mContext);
    mPhysicaloid.setBaudrate(9600);
    mPhysicaloid.open();

if (mPhysicaloid.isOpened()) {
//success
//when I tested with node mcu, it always success
}else{
//failed
//but with my custom pcb with cp2102 and usb-c keep failed.
}

I don't get it why mPhysicaloid is not opened...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions