Re: [web2py] Re: pySerial - how to open port

2013-04-02 Thread The Organisation of Secret Shoppers
i see. sounds like a better plan :)
haha i think this little raspberry pi is quite amazing! :D i have never
encounter linux or other programming language (other than c++) till i met
R-pi. and i start  to enjoy learning them :)))
thanks again!!


On Tue, Apr 2, 2013 at 3:37 PM, Niphlod  wrote:

> yep, it should be less of a "memory hog" hungry on system resources.
> BTW, I have a raspberry too, but I never manage to find time to play with
> it.
>
>
> On Tuesday, April 2, 2013 2:22:00 AM UTC+2, The Organisation of Secret
> Shoppers wrote:
>
>> by that, do you mean to start the webserver by typing python web2py.py in
>> the terminal?
>>
>> thanks a lot! :D
>>
>>
>> On Mon, Apr 1, 2013 at 6:48 PM, Niphlod  wrote:
>>
>>> clearly it was due to a permission problem btw, if you don't need
>>> apache for anything else, given that the raspberry has "limited" resources
>>> it would be better to stick with web2py's "embedded" webserver rather than
>>> having it mounted on apache.
>>>
>>>
>>> On Monday, April 1, 2013 10:56:03 AM UTC+2, The Organisation of Secret
>>> Shoppers wrote:
>>>
 my web2py is forever "on". when i switch on my Raspberry-Pi, the web2py
 server is alive and i can access the webpage from another comp in the same
 network.
 Btw, thank you so much for your patience and help. :) It seems to work
 suddenly which i still could not figure out why! :/
 just that i'm still stuck at mapping URL, writing arguments and things
 like that. Is there any site with good complete examples? i couldn't digest
 the web2py manual without matching examples :(


 On Mon, Apr 1, 2013 at 4:28 PM, Niphlod  wrote:

> you need to take into consideration what changes between the web2py
> environment and the cherrypy one.
> assuming that you start cherrypy with something like this in a
> mywebserver.py
>
> import cherrypyclass HelloWorld(object):
> def index(self):
> return "Hello World!"
> index.exposed = True
>
> cherrypy.quickstart(HelloWorld())
>
>
> and do python mywebserver.py to start it, a very few things change
> between that process and the one you get doing
> web2py.py -a yourpassword
>
> with your app.
> are you starting web2py this way or is it "mounted" under apache ?
>
>
> On Monday, April 1, 2013 5:08:42 AM UTC+2, The Organisation of Secret
> Shoppers wrote:
>
>> I see... but how should i close the serial port opened by another
>> application? does shutting down the whole system close it? initially, i
>> created a normal python script just to communicate with the device 
>> through
>> the serial port. it succeeded. so i moved on to web2py but perhaps i 
>> missed
>> out something or use the wrong coding which led me to that error. i'm not
>> really sure where should i put things but i created a new def "test"
>> function and a default/test.html...
>>
>> attached is the w2p packed file.
>>
>> without doing anything to the python script, i installed cherrypy and
>> wrote a simple web app to test the communication and it worked. so i 
>> doubt
>> may be there is something wrong in my coding somewhere. :( i have added 
>> the
>> user to the dialout group too.
>>
>> sudo usermod -a -G dialout pi
>> sudo usermod -a -G dialout www-data
>>
>> the result is still the same...
>>
>>
>>
>>
>>
>>
>>
>> On Sat, Mar 30, 2013 at 6:52 AM, Rufus  wrote:
>>
>>> Perhaps it is already open by another process?
>>>
>>> I'm not a major linux user (yet) but in windows only one process can
>>> open the serial port at a time.  Perhaps
>>> "Permission denied" is the same as "In use".
>>>
>>> Also make sure you close it when, if your application doesn't
>>> terminate, as web2py doesn't, depending where
>>> and how you opened it.
>>>
>>>
>>>
>>>
>>> On Thursday, March 28, 2013 4:54:29 AM UTC-4, theoffi...@gmail.comwrote:
>>>
 Hello everyone.
 I would like to use web2py as my Raspberry Pi webserver. i need to
 send some serial data from the web application to Raspberry Pi and 
 send to
 a device. However, i encountered the error of " >>> ‘serial.serialutil.
 **SerialExcep**tion’> could not open port /dev/ttyAMA0: [Errno
 13] Permission denied: ‘/dev/ttyAMA0′ "

 I have been stuck at this for weeks and i can't seem to find any
 solution except moving on to using cherrypy and jquery. :( but i really
 wish to use web2py!

 So, i have this code below that could work fine using normal python
 script as well as cherrypy. in web2py, i put this under "default.py" 
 and
 create a new def for it.

 import serial
 import time

 seri

Re: [web2py] Re: pySerial - how to open port

2013-04-02 Thread Niphlod
yep, it should be less of a "memory hog" hungry on system resources.
BTW, I have a raspberry too, but I never manage to find time to play with 
it.

On Tuesday, April 2, 2013 2:22:00 AM UTC+2, The Organisation of Secret 
Shoppers wrote:
>
> by that, do you mean to start the webserver by typing python web2py.py in 
> the terminal? 
>
> thanks a lot! :D
>
>
> On Mon, Apr 1, 2013 at 6:48 PM, Niphlod >wrote:
>
>> clearly it was due to a permission problem btw, if you don't need 
>> apache for anything else, given that the raspberry has "limited" resources 
>> it would be better to stick with web2py's "embedded" webserver rather than 
>> having it mounted on apache.
>>
>>
>> On Monday, April 1, 2013 10:56:03 AM UTC+2, The Organisation of Secret 
>> Shoppers wrote:
>>
>>> my web2py is forever "on". when i switch on my Raspberry-Pi, the web2py 
>>> server is alive and i can access the webpage from another comp in the same 
>>> network.
>>> Btw, thank you so much for your patience and help. :) It seems to work 
>>> suddenly which i still could not figure out why! :/ 
>>> just that i'm still stuck at mapping URL, writing arguments and things 
>>> like that. Is there any site with good complete examples? i couldn't digest 
>>> the web2py manual without matching examples :( 
>>>  
>>>
>>> On Mon, Apr 1, 2013 at 4:28 PM, Niphlod  wrote:
>>>
 you need to take into consideration what changes between the web2py 
 environment and the cherrypy one.
 assuming that you start cherrypy with something like this in a 
 mywebserver.py

 import cherrypyclass HelloWorld(object):
 def index(self):
 return "Hello World!"
 index.exposed = True

 cherrypy.quickstart(HelloWorld**())


 and do python mywebserver.py to start it, a very few things change 
 between that process and the one you get doing
 web2py.py -a yourpassword

 with your app.
 are you starting web2py this way or is it "mounted" under apache ?


 On Monday, April 1, 2013 5:08:42 AM UTC+2, The Organisation of Secret 
 Shoppers wrote:

> I see... but how should i close the serial port opened by another 
> application? does shutting down the whole system close it? initially, i 
> created a normal python script just to communicate with the device 
> through 
> the serial port. it succeeded. so i moved on to web2py but perhaps i 
> missed 
> out something or use the wrong coding which led me to that error. i'm not 
> really sure where should i put things but i created a new def "test" 
> function and a default/test.html... 
>
> attached is the w2p packed file. 
>
> without doing anything to the python script, i installed cherrypy and 
> wrote a simple web app to test the communication and it worked. so i 
> doubt 
> may be there is something wrong in my coding somewhere. :( i have added 
> the 
> user to the dialout group too. 
>
> sudo usermod -a -G dialout pi
> sudo usermod -a -G dialout www-data
>
> the result is still the same... 
>
>
>
>
>
>
>
> On Sat, Mar 30, 2013 at 6:52 AM, Rufus  wrote:
>
>> Perhaps it is already open by another process?
>>
>> I'm not a major linux user (yet) but in windows only one process can 
>> open the serial port at a time.  Perhaps
>> "Permission denied" is the same as "In use".
>>
>> Also make sure you close it when, if your application doesn't 
>> terminate, as web2py doesn't, depending where
>> and how you opened it.
>>
>>
>>
>>
>> On Thursday, March 28, 2013 4:54:29 AM UTC-4, theoffi...@gmail.comwrote:
>>
>>> Hello everyone. 
>>> I would like to use web2py as my Raspberry Pi webserver. i need to 
>>> send some serial data from the web application to Raspberry Pi and send 
>>> to 
>>> a device. However, i encountered the error of " >> ‘serial.serialutil.
>>> **SerialException’> could not open port /dev/ttyAMA0: [Errno 
>>> 13] Permission denied: ‘/dev/ttyAMA0′ "
>>>
>>> I have been stuck at this for weeks and i can't seem to find any 
>>> solution except moving on to using cherrypy and jquery. :( but i really 
>>> wish to use web2py!
>>>
>>> So, i have this code below that could work fine using normal python 
>>> script as well as cherrypy. in web2py, i put this under "default.py" 
>>> and 
>>> create a new def for it. 
>>>
>>> import serial
>>> import time
>>>
>>> serialport= serial.Serial ("/dev/ttyAMA0", 9600, timeout=0.5)
>>> serialport.write("\x03LI1234\**x0D")
>>> response=serialport.readlines(**1)
>>> print response
>>> time.sleep(1)
>>>
>>> what could have been done wrongly? :(
>>>
>>> Read more details here: http://yvonnezoe.wordpress.**com
>>> /2013/03/14/web2py-web-app-**progress/ 
>>>

Re: [web2py] Re: pySerial - how to open port

2013-04-01 Thread The Organisation of Secret Shoppers
by that, do you mean to start the webserver by typing python web2py.py in
the terminal?

thanks a lot! :D


On Mon, Apr 1, 2013 at 6:48 PM, Niphlod  wrote:

> clearly it was due to a permission problem btw, if you don't need
> apache for anything else, given that the raspberry has "limited" resources
> it would be better to stick with web2py's "embedded" webserver rather than
> having it mounted on apache.
>
>
> On Monday, April 1, 2013 10:56:03 AM UTC+2, The Organisation of Secret
> Shoppers wrote:
>
>> my web2py is forever "on". when i switch on my Raspberry-Pi, the web2py
>> server is alive and i can access the webpage from another comp in the same
>> network.
>> Btw, thank you so much for your patience and help. :) It seems to work
>> suddenly which i still could not figure out why! :/
>> just that i'm still stuck at mapping URL, writing arguments and things
>> like that. Is there any site with good complete examples? i couldn't digest
>> the web2py manual without matching examples :(
>>
>>
>> On Mon, Apr 1, 2013 at 4:28 PM, Niphlod  wrote:
>>
>>> you need to take into consideration what changes between the web2py
>>> environment and the cherrypy one.
>>> assuming that you start cherrypy with something like this in a
>>> mywebserver.py
>>>
>>> import cherrypyclass HelloWorld(object):
>>> def index(self):
>>> return "Hello World!"
>>> index.exposed = True
>>>
>>> cherrypy.quickstart(HelloWorld**())
>>>
>>>
>>> and do python mywebserver.py to start it, a very few things change
>>> between that process and the one you get doing
>>> web2py.py -a yourpassword
>>>
>>> with your app.
>>> are you starting web2py this way or is it "mounted" under apache ?
>>>
>>>
>>> On Monday, April 1, 2013 5:08:42 AM UTC+2, The Organisation of Secret
>>> Shoppers wrote:
>>>
 I see... but how should i close the serial port opened by another
 application? does shutting down the whole system close it? initially, i
 created a normal python script just to communicate with the device through
 the serial port. it succeeded. so i moved on to web2py but perhaps i missed
 out something or use the wrong coding which led me to that error. i'm not
 really sure where should i put things but i created a new def "test"
 function and a default/test.html...

 attached is the w2p packed file.

 without doing anything to the python script, i installed cherrypy and
 wrote a simple web app to test the communication and it worked. so i doubt
 may be there is something wrong in my coding somewhere. :( i have added the
 user to the dialout group too.

 sudo usermod -a -G dialout pi
 sudo usermod -a -G dialout www-data

 the result is still the same...






 On Sat, Mar 30, 2013 at 6:52 AM, Rufus  wrote:

> Perhaps it is already open by another process?
>
> I'm not a major linux user (yet) but in windows only one process can
> open the serial port at a time.  Perhaps
> "Permission denied" is the same as "In use".
>
> Also make sure you close it when, if your application doesn't
> terminate, as web2py doesn't, depending where
> and how you opened it.
>
>
>
>
> On Thursday, March 28, 2013 4:54:29 AM UTC-4, theoffi...@gmail.comwrote:
>
>> Hello everyone.
>> I would like to use web2py as my Raspberry Pi webserver. i need to
>> send some serial data from the web application to Raspberry Pi and send 
>> to
>> a device. However, i encountered the error of " > ‘serial.serialutil.
>> **SerialException’> could not open port /dev/ttyAMA0: [Errno 13]
>> Permission denied: ‘/dev/ttyAMA0′ "
>>
>> I have been stuck at this for weeks and i can't seem to find any
>> solution except moving on to using cherrypy and jquery. :( but i really
>> wish to use web2py!
>>
>> So, i have this code below that could work fine using normal python
>> script as well as cherrypy. in web2py, i put this under "default.py" and
>> create a new def for it.
>>
>> import serial
>> import time
>>
>> serialport= serial.Serial ("/dev/ttyAMA0", 9600, timeout=0.5)
>> serialport.write("\x03LI1234\**x0D")
>> response=serialport.readlines(**1)
>> print response
>> time.sleep(1)
>>
>> what could have been done wrongly? :(
>>
>> Read more details here: http://yvonnezoe.wordpress.**com
>> /2013/03/14/web2py-web-app-**progress/
>>
>  --
>
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "web2py-users" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/**to
> **pic/web2py/8eBuyKi3uf8/**unsubsc**ribe?hl=en
> .
>  To unsubscribe from this group and all its topics, send an email to
> web2py+un...@**goog

Re: [web2py] Re: pySerial - how to open port

2013-04-01 Thread Niphlod
clearly it was due to a permission problem btw, if you don't need 
apache for anything else, given that the raspberry has "limited" resources 
it would be better to stick with web2py's "embedded" webserver rather than 
having it mounted on apache.

On Monday, April 1, 2013 10:56:03 AM UTC+2, The Organisation of Secret 
Shoppers wrote:
>
> my web2py is forever "on". when i switch on my Raspberry-Pi, the web2py 
> server is alive and i can access the webpage from another comp in the same 
> network.
> Btw, thank you so much for your patience and help. :) It seems to work 
> suddenly which i still could not figure out why! :/ 
> just that i'm still stuck at mapping URL, writing arguments and things 
> like that. Is there any site with good complete examples? i couldn't digest 
> the web2py manual without matching examples :( 
>
>
> On Mon, Apr 1, 2013 at 4:28 PM, Niphlod >wrote:
>
>> you need to take into consideration what changes between the web2py 
>> environment and the cherrypy one.
>> assuming that you start cherrypy with something like this in a 
>> mywebserver.py
>>
>> import cherrypyclass HelloWorld(object):
>> def index(self):
>> return "Hello World!"
>> index.exposed = True
>>
>> cherrypy.quickstart(HelloWorld())
>>
>>
>> and do python mywebserver.py to start it, a very few things change 
>> between that process and the one you get doing
>> web2py.py -a yourpassword
>>
>> with your app.
>> are you starting web2py this way or is it "mounted" under apache ?
>>
>>
>> On Monday, April 1, 2013 5:08:42 AM UTC+2, The Organisation of Secret 
>> Shoppers wrote:
>>
>>> I see... but how should i close the serial port opened by another 
>>> application? does shutting down the whole system close it? initially, i 
>>> created a normal python script just to communicate with the device through 
>>> the serial port. it succeeded. so i moved on to web2py but perhaps i missed 
>>> out something or use the wrong coding which led me to that error. i'm not 
>>> really sure where should i put things but i created a new def "test" 
>>> function and a default/test.html... 
>>>
>>> attached is the w2p packed file. 
>>>
>>> without doing anything to the python script, i installed cherrypy and 
>>> wrote a simple web app to test the communication and it worked. so i doubt 
>>> may be there is something wrong in my coding somewhere. :( i have added the 
>>> user to the dialout group too. 
>>>
>>> sudo usermod -a -G dialout pi
>>> sudo usermod -a -G dialout www-data
>>>
>>> the result is still the same... 
>>>
>>>
>>>
>>>
>>>
>>>
>>> On Sat, Mar 30, 2013 at 6:52 AM, Rufus  wrote:
>>>
 Perhaps it is already open by another process?

 I'm not a major linux user (yet) but in windows only one process can 
 open the serial port at a time.  Perhaps
 "Permission denied" is the same as "In use".

 Also make sure you close it when, if your application doesn't 
 terminate, as web2py doesn't, depending where
 and how you opened it.




 On Thursday, March 28, 2013 4:54:29 AM UTC-4, theoffi...@gmail.comwrote:

> Hello everyone. 
> I would like to use web2py as my Raspberry Pi webserver. i need to 
> send some serial data from the web application to Raspberry Pi and send 
> to 
> a device. However, i encountered the error of "  **SerialExcep**tion’> could not open port /dev/ttyAMA0: [Errno 13] 
> Permission denied: ‘/dev/ttyAMA0′ "
>
> I have been stuck at this for weeks and i can't seem to find any 
> solution except moving on to using cherrypy and jquery. :( but i really 
> wish to use web2py!
>
> So, i have this code below that could work fine using normal python 
> script as well as cherrypy. in web2py, i put this under "default.py" and 
> create a new def for it. 
>
> import serial
> import time
>
> serialport= serial.Serial ("/dev/ttyAMA0", 9600, timeout=0.5)
> serialport.write("\x03LI1234\**x**0D")
> response=serialport.readlines(1)
> print response
> time.sleep(1)
>
> what could have been done wrongly? :(
>
> Read more details here: http://yvonnezoe.wordpress.**com**
> /2013/03/14/web2py-web-app-**pro**gress/ 
>
  -- 
  
 --- 
 You received this message because you are subscribed to a topic in the 
 Google Groups "web2py-users" group.
 To unsubscribe from this topic, visit https://groups.google.com/d/**
 topic/web2py/8eBuyKi3uf8/**unsubscribe?hl=en
 .
  To unsubscribe from this group and all its topics, send an email to 
 web2py+un...@**googlegroups.com.

 For more options, visit 
 https://groups.google.com/**groups/opt_out
 .
  
  

>>>
>>>  -- 
>>  
>> --- 
>> You received this message because you are subscribed to a topic in the 
>> Google Groups "web

Re: [web2py] Re: pySerial - how to open port

2013-04-01 Thread The Organisation of Secret Shoppers
my web2py is forever "on". when i switch on my Raspberry-Pi, the web2py
server is alive and i can access the webpage from another comp in the same
network.
Btw, thank you so much for your patience and help. :) It seems to work
suddenly which i still could not figure out why! :/
just that i'm still stuck at mapping URL, writing arguments and things like
that. Is there any site with good complete examples? i couldn't digest the
web2py manual without matching examples :(


On Mon, Apr 1, 2013 at 4:28 PM, Niphlod  wrote:

> you need to take into consideration what changes between the web2py
> environment and the cherrypy one.
> assuming that you start cherrypy with something like this in a
> mywebserver.py
>
> import cherrypyclass HelloWorld(object):
> def index(self):
> return "Hello World!"
> index.exposed = True
>
> cherrypy.quickstart(HelloWorld())
>
>
> and do python mywebserver.py to start it, a very few things change between
> that process and the one you get doing
> web2py.py -a yourpassword
>
> with your app.
> are you starting web2py this way or is it "mounted" under apache ?
>
>
> On Monday, April 1, 2013 5:08:42 AM UTC+2, The Organisation of Secret
> Shoppers wrote:
>
>> I see... but how should i close the serial port opened by another
>> application? does shutting down the whole system close it? initially, i
>> created a normal python script just to communicate with the device through
>> the serial port. it succeeded. so i moved on to web2py but perhaps i missed
>> out something or use the wrong coding which led me to that error. i'm not
>> really sure where should i put things but i created a new def "test"
>> function and a default/test.html...
>>
>> attached is the w2p packed file.
>>
>> without doing anything to the python script, i installed cherrypy and
>> wrote a simple web app to test the communication and it worked. so i doubt
>> may be there is something wrong in my coding somewhere. :( i have added the
>> user to the dialout group too.
>>
>> sudo usermod -a -G dialout pi
>> sudo usermod -a -G dialout www-data
>>
>> the result is still the same...
>>
>>
>>
>>
>>
>>
>> On Sat, Mar 30, 2013 at 6:52 AM, Rufus  wrote:
>>
>>> Perhaps it is already open by another process?
>>>
>>> I'm not a major linux user (yet) but in windows only one process can
>>> open the serial port at a time.  Perhaps
>>> "Permission denied" is the same as "In use".
>>>
>>> Also make sure you close it when, if your application doesn't terminate,
>>> as web2py doesn't, depending where
>>> and how you opened it.
>>>
>>>
>>>
>>>
>>> On Thursday, March 28, 2013 4:54:29 AM UTC-4, theoffi...@gmail.comwrote:
>>>
 Hello everyone.
 I would like to use web2py as my Raspberry Pi webserver. i need to send
 some serial data from the web application to Raspberry Pi and send to a
 device. However, i encountered the error of " >>> **SerialExcep**tion’> could not open port /dev/ttyAMA0: [Errno 13]
 Permission denied: ‘/dev/ttyAMA0′ "

 I have been stuck at this for weeks and i can't seem to find any
 solution except moving on to using cherrypy and jquery. :( but i really
 wish to use web2py!

 So, i have this code below that could work fine using normal python
 script as well as cherrypy. in web2py, i put this under "default.py" and
 create a new def for it.

 import serial
 import time

 serialport= serial.Serial ("/dev/ttyAMA0", 9600, timeout=0.5)
 serialport.write("\x03LI1234\**x**0D")
 response=serialport.readlines(1)
 print response
 time.sleep(1)

 what could have been done wrongly? :(

 Read more details here: http://yvonnezoe.wordpress.**com**
 /2013/03/14/web2py-web-app-**pro**gress/

>>>  --
>>>
>>> ---
>>> You received this message because you are subscribed to a topic in the
>>> Google Groups "web2py-users" group.
>>> To unsubscribe from this topic, visit https://groups.google.com/d/**
>>> topic/web2py/8eBuyKi3uf8/**unsubscribe?hl=en
>>> .
>>> To unsubscribe from this group and all its topics, send an email to
>>> web2py+un...@**googlegroups.com.
>>>
>>> For more options, visit 
>>> https://groups.google.com/**groups/opt_out
>>> .
>>>
>>>
>>>
>>
>>  --
>
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "web2py-users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/web2py/8eBuyKi3uf8/unsubscribe?hl=en.
> To unsubscribe from this group and all its topics, send an email to
> web2py+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.co

Re: [web2py] Re: pySerial - how to open port

2013-04-01 Thread Niphlod
you need to take into consideration what changes between the web2py 
environment and the cherrypy one.
assuming that you start cherrypy with something like this in a 
mywebserver.py

import cherrypyclass HelloWorld(object):
def index(self):
return "Hello World!"
index.exposed = True

cherrypy.quickstart(HelloWorld())


and do python mywebserver.py to start it, a very few things change between 
that process and the one you get doing
web2py.py -a yourpassword

with your app.
are you starting web2py this way or is it "mounted" under apache ?

On Monday, April 1, 2013 5:08:42 AM UTC+2, The Organisation of Secret 
Shoppers wrote:
>
> I see... but how should i close the serial port opened by another 
> application? does shutting down the whole system close it? initially, i 
> created a normal python script just to communicate with the device through 
> the serial port. it succeeded. so i moved on to web2py but perhaps i missed 
> out something or use the wrong coding which led me to that error. i'm not 
> really sure where should i put things but i created a new def "test" 
> function and a default/test.html... 
>
> attached is the w2p packed file. 
>
> without doing anything to the python script, i installed cherrypy and 
> wrote a simple web app to test the communication and it worked. so i doubt 
> may be there is something wrong in my coding somewhere. :( i have added the 
> user to the dialout group too. 
>
> sudo usermod -a -G dialout pi
> sudo usermod -a -G dialout www-data
>
> the result is still the same... 
>
>
>
>
>
>
> On Sat, Mar 30, 2013 at 6:52 AM, Rufus  >wrote:
>
>> Perhaps it is already open by another process?
>>
>> I'm not a major linux user (yet) but in windows only one process can open 
>> the serial port at a time.  Perhaps
>> "Permission denied" is the same as "In use".
>>
>> Also make sure you close it when, if your application doesn't terminate, 
>> as web2py doesn't, depending where
>> and how you opened it.
>>
>>
>>
>>
>> On Thursday, March 28, 2013 4:54:29 AM UTC-4, theoffi...@gmail.com wrote:
>>
>>> Hello everyone. 
>>> I would like to use web2py as my Raspberry Pi webserver. i need to send 
>>> some serial data from the web application to Raspberry Pi and send to a 
>>> device. However, i encountered the error of " >> **SerialException’> could not open port /dev/ttyAMA0: [Errno 13] 
>>> Permission denied: ‘/dev/ttyAMA0′ "
>>>
>>> I have been stuck at this for weeks and i can't seem to find any 
>>> solution except moving on to using cherrypy and jquery. :( but i really 
>>> wish to use web2py!
>>>
>>> So, i have this code below that could work fine using normal python 
>>> script as well as cherrypy. in web2py, i put this under "default.py" and 
>>> create a new def for it. 
>>>
>>> import serial
>>> import time
>>>
>>> serialport= serial.Serial ("/dev/ttyAMA0", 9600, timeout=0.5)
>>> serialport.write("\x03LI1234\**x0D")
>>> response=serialport.readlines(**1)
>>> print response
>>> time.sleep(1)
>>>
>>> what could have been done wrongly? :(
>>>
>>> Read more details here: http://yvonnezoe.wordpress.**
>>> com/2013/03/14/web2py-web-app-**progress/ 
>>>
>>  -- 
>>  
>> --- 
>> You received this message because you are subscribed to a topic in the 
>> Google Groups "web2py-users" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/web2py/8eBuyKi3uf8/unsubscribe?hl=en.
>> To unsubscribe from this group and all its topics, send an email to 
>> web2py+un...@googlegroups.com .
>> For more options, visit https://groups.google.com/groups/opt_out.
>>  
>>  
>>
>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[web2py] Re: pySerial - how to open port

2013-03-31 Thread theofficialtoss
hmm, i used the exact same code for both cherrypy and web2py which is as 
mentioned above... 



On Thursday, March 28, 2013 5:13:20 PM UTC+8, Niphlod wrote:
>
> there's no way that a module running on cherrypy doesn't work under 
> web2py. 
> Seems a permission problem, so you need to start web2py with the same user 
> you're using for making that work with cherrypy.
>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[web2py] Re: pySerial - how to open port

2013-03-29 Thread Joe Barnhart
I think Niphlod is right. You need to add your user to teh "dialout" group.

http://dereenigne.org/linux/debianubuntu-serial-port-access

--Joe

On Thursday, March 28, 2013 1:54:29 AM UTC-7, theoffi...@gmail.com wrote:
>
> Hello everyone. 
> I would like to use web2py as my Raspberry Pi webserver. i need to send 
> some serial data from the web application to Raspberry Pi and send to a 
> device. However, i encountered the error of "  ‘serial.serialutil.SerialException’> could not open port /dev/ttyAMA0: 
> [Errno 13] Permission denied: ‘/dev/ttyAMA0′ "
>
> I have been stuck at this for weeks and i can't seem to find any solution 
> except moving on to using cherrypy and jquery. :( but i really wish to use 
> web2py!
>
> So, i have this code below that could work fine using normal python script 
> as well as cherrypy. in web2py, i put this under "default.py" and create a 
> new def for it. 
>
> import serial
> import time
>
> serialport= serial.Serial ("/dev/ttyAMA0", 9600, timeout=0.5)
> serialport.write("\x03LI1234\x0D")
> response=serialport.readlines(1)
> print response
> time.sleep(1)
>
> what could have been done wrongly? :(
>
> Read more details here: 
> http://yvonnezoe.wordpress.com/2013/03/14/web2py-web-app-progress/ 
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[web2py] Re: pySerial - how to open port

2013-03-29 Thread Rufus
Perhaps it is already open by another process?

I'm not a major linux user (yet) but in windows only one process can open 
the serial port at a time.  Perhaps
"Permission denied" is the same as "In use".

Also make sure you close it when, if your application doesn't terminate, as 
web2py doesn't, depending where
and how you opened it.



On Thursday, March 28, 2013 4:54:29 AM UTC-4, theoffi...@gmail.com wrote:
>
> Hello everyone. 
> I would like to use web2py as my Raspberry Pi webserver. i need to send 
> some serial data from the web application to Raspberry Pi and send to a 
> device. However, i encountered the error of "  ‘serial.serialutil.SerialException’> could not open port /dev/ttyAMA0: 
> [Errno 13] Permission denied: ‘/dev/ttyAMA0′ "
>
> I have been stuck at this for weeks and i can't seem to find any solution 
> except moving on to using cherrypy and jquery. :( but i really wish to use 
> web2py!
>
> So, i have this code below that could work fine using normal python script 
> as well as cherrypy. in web2py, i put this under "default.py" and create a 
> new def for it. 
>
> import serial
> import time
>
> serialport= serial.Serial ("/dev/ttyAMA0", 9600, timeout=0.5)
> serialport.write("\x03LI1234\x0D")
> response=serialport.readlines(1)
> print response
> time.sleep(1)
>
> what could have been done wrongly? :(
>
> Read more details here: 
> http://yvonnezoe.wordpress.com/2013/03/14/web2py-web-app-progress/ 
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[web2py] Re: pySerial - how to open port

2013-03-28 Thread Niphlod
there's no way that a module running on cherrypy doesn't work under web2py. 
Seems a permission problem, so you need to start web2py with the same user 
you're using for making that work with cherrypy.

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.