문제

The serial port must be over USB cable, from the phone to a computer.

In Java, I got it working by using the following code:

CommConnection comm = (CommConnection)Connector.open("comm:USB1");

// Now use comm to read and write data

How can I do this in Python for mobiles, specifically PyS60?

도움이 되었습니까?

해결책

I got this from here:

    import pys60usb
    usb = pys60usb.USBConnection()

    # Connect to port 1. Works with most S60 3rd devices.
    usb.connect( port = 1, mode = pys60usb.ECommExclusive )
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top