[pfSense Support] Crystalfontz CFA-635 USB LCD

2010-03-26 Thread Philippe Lang
Hi,

I'm trying to install a Crystalfontz CFA-635 USB LCD, but apparently, I'm doing 
something wrong.

I'm using pfSense 1.2.3, and lcdproc package v.0.5.2.

When plugging the lcd to the USB port 5 (internal port), lcd is well recognized:

  Kernel: ucom0: Crystalfontz Crystalfontz CFA635-USB LCD, class 0/0, rev 
2.00/6.00, addr 2 on uhub2

But then nothing appears on the LCD, only the default CrystalFontz demo message.

I have been testing different driver/port configurations, in particular what 
seems best: the CrystalFontz Packet driver, and the USB COM Port 1 
(dev/cuaU0) port.

An idea about what I'm doing wrong?

Best regards!

-
Attik System  web  : http://www.attiksystem.ch
Philippe Lang phone: +41 26 422 13 75
rte de la Fonderie 2  gsm  : +41 79 351 49 94
1700 Fribourg pgp  : http://keyserver.pgp.com 




PGP.sig
Description: PGP signature


[pfSense Support] Login with email address + curl don't work in local

2009-10-20 Thread Philippe
This message is the same than :
http://forum.pfsense.org/index.php/topic,19926.0.html

Hi pfSense users!

I'm new to pfSense and want to customize the captive portal. I want it to do
a simple thing: users on the LAN are redirected to the captive portal which
ask them for their email address. If the address is valid, they are
logged-in, else a message warn them of invalid email address.

I created login.php, a simple form which auto-post $PORTAL_REDIRURL$ and
$PORTAL_ACTION$ (they are not replaced in another php-only page).

It seems that I cannot execute php script more than ~200 bytes long in
login.php: the start of them is interpreted, and after a certain point,
script content is outputed as-is in the html source. It's why it splitted
the code into 2 php files:

form name=login_form method=post action=captiveportal-login.php
input type=hidden name=portal_redirurl 
value=$PORTAL_REDIRURL$
input type=hidden name=portal_action 
value=$PORTAL_ACTION$
input type=submit
/form

script language=JavaScript
login_form.submit();
/script


I want the second file, *captiveportal-login.php* to ask for the email
address, and connect as a defined user (ie: guest). I think the better way
to do this is that the script itself check email address and post to
$PORTAL_ACTION$.

Here is the simplified code of *captiveportal-login.php*:

if (!isset($_POST[email]))
{
showLoginForm($portal_action, $portal_redirurl);
die();
}

// Got a mail address
$email = trim($_POST[email]);

// If email if invalid, shows a failure message
if (!validEmail($email))
{
showLoginForm($portal_action, $portal_redirurl, 'HTMLThe mail you
entered is invalid!');
die();
}

// Got a valid email, post user and password to the portal login form
//*
echo server respond:  . Post($portal_action ,
auth_user=guestauth_pass=passw0rdredirurl=$portal_redirurlaccept=Continue);
//**

/**
Validate an email address.
Provide email address (raw input)
Returns true if the email address has the email
address format and the domain exists.
*/
function validEmail($email)
{
[... check email and set result in $isValid]
   return $isValid;
}


/**
 * Shows the login form
 */
function showLoginForm($portal_action, $portal_redirurl, $message = )
{

echo '
h2Login/h2
p
Please enter your email address to log-in to the portal.br /
b' .  $message . '/b
/p
p
form method=POST action=captiveportal-login.php
Email address:
input type=text name=email
input type=hidden name=portal_action value=' . 
$portal_action . '
input type=hidden name=portal_redirurl value=' . 
$portal_redirurl . '
input type=submit value=Connect
/form
/p';
}


/**
 * POST content to a page
 */
function Post($url, $post)
{
$ch = curl_init($url);
curl_setopt ($ch, CURLOPT_POST, 1);
curl_setopt ($ch, CURLOPT_POSTFIELDS,  $post);
$result =  curl_exec ($ch);
curl_close ($ch);

return $result;
}
?

My problem come from the Post function: I tried curl, fopen, readfile,
exec(curl)... It can post to and get the response from an external page, but
when I try getting $PORTAL_ACTION$ (for me *http://1.2.3.4:8000*) I get an
error saying that the destination is unreacheable or a timeout, or simply
nothing (instead exec('ls') shows me a result).

Do you think this code is the best way to do email-authentification?
Do you know why curl sucks so much in local?

Thanks for your help !


RE: [pfSense Support] potential pfsense hardware

2009-10-15 Thread Philippe LeCavalier
On Thu, 2009-10-15 at 15:32 +, Joseph L. Casale wrote:

 I'd rather have a Realtek if I had to.

I second that!

Cheers,
Phil


[pfSense Support] Strange DNS problem

2009-10-08 Thread Philippe LeCavalier
Hi Everyone,

As of late, pfsense somehow maps dns entries intended for remote hosts
to my local samba server. When I try to SSH to a clients network I'm
logged into my office file server. I'm not sure what else to write here
so if you think you can help me just ask questions.

Cheers,
Phil