jcrouchley
Posts: 5
Joined: Mon Jun 11, 2012 3:26 pm

Python serial

Wed Sep 09, 2015 8:48 am

I am sucessfully using C# (via the Serial example) to read and write a WirelessThings USB device on a Pi2. Is it possible to use Python to do this?

ricl
Posts: 657
Joined: Wed Aug 26, 2015 11:55 am

Re: Python serial

Wed Sep 09, 2015 9:54 am

ricl : F/gamma = ma : Law ii(a) : https://climatedatablog.wordpress.com/2016/01/02/an-energy-challenge-2016/ #AnEnergyChallenge2016

jcrouchley
Posts: 5
Joined: Mon Jun 11, 2012 3:26 pm

Re: Python serial

Wed Sep 09, 2015 9:57 am

Thank you - unfortunately that does not answer the question - I can run Python apps on the RPi2 with Win IOT but I cannot see how to use the USB serial port. There doesn't appear to be a PySerial for this and I can't see how to connect to the underlying windows calls.

ame
Posts: 3172
Joined: Sat Aug 18, 2012 1:21 am
Location: New Zealand

Re: Python serial

Wed Sep 09, 2015 9:59 am

jcrouchley wrote:Thank you - unfortunately that does not answer the question - I can run Python apps on the RPi2 with Win IOT but I cannot see how to use the USB serial port. There doesn't appear to be a PySerial for this and I can't see how to connect to the underlying windows calls.
At the most recent close of play, the Pi's on-board UART is not available in Winiot, and there are no drivers for any USB serial dongles. Therefore there would be no point porting PySerial to Winiot.

I am sure Top Men are working on it.

ricl
Posts: 657
Joined: Wed Aug 26, 2015 11:55 am

Re: Python serial

Wed Sep 09, 2015 10:05 am

...there are no drivers for any USB serial dongle,,,
This guy would seem to disagree.

https://github.com/Jark/FTDISample
ricl : F/gamma = ma : Law ii(a) : https://climatedatablog.wordpress.com/2016/01/02/an-energy-challenge-2016/ #AnEnergyChallenge2016

ame
Posts: 3172
Joined: Sat Aug 18, 2012 1:21 am
Location: New Zealand

Re: Python serial

Wed Sep 09, 2015 10:10 am

ricl wrote:
...there are no drivers for any USB serial dongle,,,
This guy would seem to disagree.

https://github.com/Jark/FTDISample
But, I don't understand! He is not the manufacturer. Don't you know it's a rule that the manufacturer must provide Windows drivers for any hardware ever made, forever?

jcrouchley
Posts: 5
Joined: Mon Jun 11, 2012 3:26 pm

Re: Python serial

Wed Sep 09, 2015 10:12 am

There are drivers for USB serial, and I believe for any device that registers as USB CDC serial - I am using them successfully with C# - all I am asking is can I use them with Python?

ame
Posts: 3172
Joined: Sat Aug 18, 2012 1:21 am
Location: New Zealand

Re: Python serial

Wed Sep 09, 2015 10:23 am

jcrouchley wrote:There are drivers for USB serial, and I believe for any device that registers as USB CDC serial - I am using them successfully with C# - all I am asking is can I use them with Python?
I have just read that PySerial is written in pure Python. Therefore, since you are using Python (and it is working) you should be able to copy the PySerial source onto the device and just use it.

jcrouchley
Posts: 5
Joined: Mon Jun 11, 2012 3:26 pm

Re: Python serial

Wed Sep 09, 2015 10:32 am

I'll give it a go and let you know.

ricl
Posts: 657
Joined: Wed Aug 26, 2015 11:55 am

Re: Python serial

Wed Sep 09, 2015 10:35 am

But, I don't understand! He is not the manufacturer. Don't you know it's a rule that the manufacturer must provide Windows drivers for any hardware ever made, forever?
There is no rule that others cannot contribute.
ricl : F/gamma = ma : Law ii(a) : https://climatedatablog.wordpress.com/2016/01/02/an-energy-challenge-2016/ #AnEnergyChallenge2016

Return to “Windows 10 for IoT”