Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wonder What makes physicaloid.open() fail #36

Open
kotran88 opened this issue Apr 22, 2019 · 1 comment
Open

Wonder What makes physicaloid.open() fail #36

kotran88 opened this issue Apr 22, 2019 · 1 comment

Comments

@kotran88
Copy link

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...

@xxxajk
Copy link

xxxajk commented Apr 23, 2019

Make sure you are connecting the correct data pair.
https://i.stack.imgur.com/Aovh5.png

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants