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 " <class 
> ‘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.


Reply via email to