Re: lock access to serial port

2008-03-19 Thread Andra
I tried ready-made commands for file locking, and turned to that LCK file just in case some permissions are wrong and that's the reason the commands fail. On 19 Marts, 15:43, Grant Edwards <[EMAIL PROTECTED]> wrote: > On 2008-03-18, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > how to get tty

Re: lock access to serial port

2008-03-19 Thread [EMAIL PROTECTED]
hmm, now it seems I get to the locking try: ser = serial.Serial(dev, 19200, rtscts=1, timeout=1) if ser.isOpen(): try: fcntl.lockf(ser,fcntl.LOCK_EX) but get into some weirdness - trying to lock does not time out! The script stops at this line and wai

Re: lock access to serial port

2008-03-19 Thread Grant Edwards
On 2008-03-18, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > how to get ttyS0 serial port for exclusive access? I have a python > script that uses this device with AT commands. I need that two > instances can call simultaneosuly this python script but only one of > them gets the device. I tried f

Re: lock access to serial port

2008-03-19 Thread [EMAIL PROTECTED]
not the goal setup but the way I tried it out - a webpage to send an sms to mobile phone. This is an php what calls a python script. A python script opens serial device, checks for gsm network, sends a message - on all the way I try to make sure that appropriate answers are received from the gsm de

Re: lock access to serial port

2008-03-19 Thread taco
[EMAIL PROTECTED] wrote: > hello group, > > how to get ttyS0 serial port for exclusive access? I have a python > script that uses this device with AT commands. I need that two > instances can call simultaneosuly this python script but only one of > them gets the device. I tried fcntl.flock, it wa

lock access to serial port

2008-03-18 Thread [EMAIL PROTECTED]
hello group, how to get ttyS0 serial port for exclusive access? I have a python script that uses this device with AT commands. I need that two instances can call simultaneosuly this python script but only one of them gets the device. I tried fcntl.flock, it was just ignored, put writtable file LCK

Re: access to serial port

2005-02-02 Thread Pawel Chrobak
> Keywords: python serial > Great, I needed exactly this information ( pyserial) . Thanks a lot ;) -- http://mail.python.org/mailman/listinfo/python-list

Re: access to serial port

2005-02-02 Thread Nick Coghlan
Pawe³ Chrobak wrote: Hi How to take access to serial port (rs232) ?? Is't possible?? Just tell me guy's where I can take o look The same place you should always look - Google. Keywords: python serial Cheers, Nick. -- Nick Coghlan | [EMAIL PROTECTED] | Brisbane,

Re: access to serial port

2005-02-02 Thread Diez B. Roggisch
> How to take access to serial port (rs232) ?? > Is't possible?? Just tell me guy's where I can take o look > Now I work under Windows XP but finally I need to make script to > communicate witch > GSM modem under Linux. There will be a typical AT commands As alwa

access to serial port

2005-02-02 Thread Pawe³ Chrobak
Hi How to take access to serial port (rs232) ?? Is't possible?? Just tell me guy's where I can take o look Now I work under Windows XP but finally I need to make script to communicate witch GSM modem under Linux. There will be a typical AT commands Thanks -- http://mail.python.o