Re: pyserial on freebsd 10.10 i386 [SOLVED]

2014-10-19 Thread Grant Edwards
On 2014-10-18, Nagy L?szl? Zsolt gand...@shopzeus.com wrote:

 Strangely, pyserial will accept the number 0, but then it tries to open 
 a device that exists on Linux only...

I'm sure Chris would be happy to accept a patch fixing that problem.

-- 
Grant


-- 
https://mail.python.org/mailman/listinfo/python-list


Re: pyserial on freebsd 10.10 i386 [SOLVED]

2014-10-19 Thread Mark Lawrence

On 19/10/2014 16:06, Grant Edwards wrote:

On 2014-10-18, Nagy L?szl? Zsolt gand...@shopzeus.com wrote:


Strangely, pyserial will accept the number 0, but then it tries to open
a device that exists on Linux only...


I'm sure Chris would be happy to accept a patch fixing that problem.



Sadly to some people a patch is a thing that mends your flat tyre or 
goes over your eye.


--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.

Mark Lawrence

--
https://mail.python.org/mailman/listinfo/python-list


pyserial on freebsd 10.10 i386

2014-10-18 Thread Nagy László Zsolt


I'm trying to open a serial port with pyserial on a Compaq Deskpro EN 
machine. Operating system is FreeBSD 10.10 RELEASE, i386.


root@merleg:~ # kldload scc
root@merleg:~ # python2.7 -m serial.tools.list_ports
no ports found
root@merleg:~ # whoami
root


Here are all the devices:

root@merleg:~ # ls /dev

acpicttyklogstdin   ttyva
ad0 cuau0   kmemstdout  ttyvb
ad0p1   cuau0.init  log sysmousettyvc
ad0p2   cuau0.lock  lpt0ttyu0   ttyvd
ad0p3   cuau1   lpt0.ctlttyu0.init  ttyve
ada0cuau1.init  mdctl   ttyu0.lock  ttyvf
ada0p1  cuau1.lock  mem ttyu1   ufssuspend
ada0p2  devctl  midistatttyu1.init  ugen0.1
ada0p3  devstat mixer0  ttyu1.lock  ugen0.2
agpgart fd  nfslock ttyv0   uhid0
apm fd0 nullttyv1   ukbd0
apmctl  fidopass0   ttyv2   urandom
atkbd0  geom.ctlpass1   ttyv3   usb
audit   gptid   pci ttyv4   usbctl
bpf io  ppi0ttyv5   xpt0
bpf0kbd0pts ttyv6   zero
cd0 kbd1random  ttyv7
console kbd2sndstat ttyv8
consolectl  kbdmux0 stderr  ttyv9


And here is what I see in dmesg:

root@merleg:~ # dmesg | grep uart

uart0: 16550 or compatible port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0

uart1: 16550 or compatible port 0x2f8-0x2ff irq 3 on acpi0

Obviously the question is: how do I open the COM port from pyserial on 
this machine?




--
https://mail.python.org/mailman/listinfo/python-list


Re: pyserial on freebsd 10.10 i386 [SOLVED]

2014-10-18 Thread Nagy László Zsolt
The port parameter of serial.Serial should be /dev/ttyu0 instead of 
COM1, and /dev/ttyu1 instead of COM2.


Strangely, pyserial will accept the number 0, but then it tries to open 
a device that exists on Linux only...


Anyway, problem solved.
--
https://mail.python.org/mailman/listinfo/python-list