Page 1 of 1

WebApp with Apache and mod_wsgi?

PostPosted: Mon Apr 20, 2015 9:47 am
by abc
Can the WebApp be configured to work with apache and mod_wsgi? If so how? I am currently not familiar with WSGI.

Thanks.
Also has anyone written a simple virtual text keypad for ad2usb? Just a single file script that opens the serial port parses the LCD messages into two lines using standard ANSI cursor moment so it will work in a putty ssh session? If not I will write one myself.

Re: WebApp with Apache and mod_wsgi?

PostPosted: Mon Apr 20, 2015 10:00 am
by kevin
mod_wsgi isn't particularly the best fit for running Python WSGI applications but it is possible - that said, we use nginx.

First off, I'd reason that it takes a lot of effort to understand Apache's request processing model and to configure it correctly, especially with respect to mod_wsgi.


As far as the application you are describing, I am not aware!

Re: WebApp with Apache and mod_wsgi?

PostPosted: Tue Apr 21, 2015 10:33 am
by abc
I really am just looking for a simple integration with a standard Linux distro like CentOS. But it sounds like the simplest thing then would be to install Gunicorn and Ngnix on the system?

As for the virtual text terminal. I have one up an running - still needs a few tweaks - but works (just a Perl script). One of the things I still need to do is translate the extended characters into the correct printable characters. I am talking about the block character like ff
when you are in the zone programming mode and it flashes a block vs the number - ff vs 0 (as the cursor location).

Is there a list of all these characters and what they are? (I search around and did not find it).
Like ff = block. This does not seem to map the the standard ASCII extended set.
Also is there a way to distinguish between these extended characters and regular text?

Thanks.

Re: WebApp with Apache and mod_wsgi?

PostPosted: Tue Apr 21, 2015 11:13 am
by kevin
nginx and gunicorn should be available from repositories in CentOS no problem - yes, this is the easiest way to do it in my opinion.


If you look at the alarmdecoder library you can see how the position of the cursor is calculated from the panel data

if int(self.panel_data[19:21], 16) & 0x01 > 0:
# Current cursor location on the alpha display.
self.cursor_location = int(self.panel_data[21:23], 16)

http://www.alarmdecoder.com/wiki/index.php/Protocol describes the protocol so you can write your own - but I highly suggest using the python library we have provided to save yourself some trouble.