Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dont work on Raspberry 2 #137

Open
GoogleCodeExporter opened this issue May 4, 2015 · 6 comments
Open

Dont work on Raspberry 2 #137

GoogleCodeExporter opened this issue May 4, 2015 · 6 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Installed newest Verion with help from wiki
2. Config it to autostart
3. restart
4. open localhost:8000
5. shows the things but I cant klick anything, nothing hapens
restart doesnt help
apt-get update and upgrade also not help
(sry for bad english)
...

WebIOPi version used?
=> Newest (0.7.1)

Python version used?
=> auto installed version on Ras..pi2 (newest)

Distro used? (WebIOPi has only been tested on Raspbian Wheezy)
=> Wheezy

Raspberry Pi board revision? (1 or 2)
=> Raspberry Pi 2

For Javascript side bugs, Browser?
=> tested with RaspberryPi2 Standartbrowser and newest Chrome on Win 8.1

Please provide any additional information below.
Completly install it new but it also not help



Original issue reported on code.google.com by [email protected] on 14 Feb 2015 at 2:37

@GoogleCodeExporter
Copy link
Author

WebIOPi currently does not support Raspberry Pi 2 yet, but some good things are 
coming. Stay tuned for updates.

I saw this for 0.7.1

Hopefully they can release the 0.7.2 for fixing the Pi2 soon!

Original comment by [email protected] on 15 Feb 2015 at 3:37

@GoogleCodeExporter
Copy link
Author

Still no feedback on Webiopi on Pi2... can we migrate to an alternate solution?

Original comment by [email protected] on 23 Feb 2015 at 4:17

@GoogleCodeExporter
Copy link
Author

WAiting for it .... urgently :P

Original comment by [email protected] on 8 Mar 2015 at 11:22

@GoogleCodeExporter
Copy link
Author

still waiting can we migrate to an alternate solution?

Original comment by [email protected] on 21 Mar 2015 at 9:58

@GoogleCodeExporter
Copy link
Author

I d'not understand the problems, found on the internet an articel the discriped 
excacly what to do, dit it and every thing works fine.

Read this articel an the subs to and you have the sollution.

http://www.raspberrypi.org/forums/viewtopic.php?f=63&t=98981

Good luck

Original comment by [email protected] on 22 Mar 2015 at 7:23

@GoogleCodeExporter
Copy link
Author

Here is a very simplex, yet useful  cgi script to control any of the regular 
GPIO ports (direction and value) via web:
#!/usr/bin/perl


#see if anything was clicked on
print "Content-type:text/html\n\n";

 read(STDIN,$form, $ENV{'CONTENT_LENGTH'});
     foreach $pair (split('&', $form)) {
         if ($pair =~ /(.*)=(.*)/) {  # found key=value;
         ($key,$value) = ($1,$2);     # get key, value.
         $value =~ s/\+/ /g;  # substitute spaces for + signs.
         $value =~ s/%(..)/pack('c',hex($1))/eg;
         $inputs{$key} = $value;   # Create Associative Array.
         }
     }

if($inputs{'function'})  {
if($inputs{'function'} eq "changedirection") {
 if($inputs{'direction'} eq "OUT") {$newdir="in";};
 if($inputs{'direction'} eq "IN") {$newdir="out";};
  system("/usr/local/bin/gpio -g mode $inputs{'gp'} $newdir");
}
if($inputs{'function'} eq "changevalue") {
 if($inputs{'newvalue'} eq "1") {$newval="0";};
 if($inputs{'newvalue'} eq "0") {$newval="1";};
  system("/usr/local/bin/gpio -g write $inputs{'gp'} $newval");
}
}

# get the status of the GPIO bus
open(DATA, "/usr/local/bin/gpio readall|grep -v \"+\"|grep -v wPi|");
@readall=<DATA>;
close(DATA);

print "<html><body>\n";
print "<table align=center cellpadding=5 border=1>\n";
foreach my $statline(@readall) {
chomp($statline);
$statline=~s/\s//g;
$statline=~s/\|/,/g;

($null,$bcm,$wpi,$name,$direction,$value,$phys,$null,$phys2,$value2,$direction2,
$name2,$wpi2,$bcm2)=split(/,/,$statline);
print "<tr >\n";
if($name=~/GPIO/) {
   if($value=="1") {$color="lightgreen"} else {$color="lightgrey"};
if($direction eq "OUT") {$value="<form action=./gpioweb.cgi method=post><input 
type=hidden  name=changevalue value=$value><input type=hidden name=function 
value=changevalue><input type=hidden name=gp value=$bcm><input type=hidden 
name=newvalue value=$value><br><input type=submit value=$value></form>";};
   if(length($phys)==1) {$phys="\ ".$phys;};
  print "<td align=center  bgcolor=$color width=5>$bcm</td><td align=center  bgcolor=$color width=25>$name</td><td align=center width=10 bgcolor=$color valign=center><form action=./gpioweb.cgi method=post><input type=hidden name=function value=changedirection><input type=hidden name=gp value=$bcm><input type=hidden name=direction value=$direction><br><input type=submit value=$direction></form></td><td align=center  width=5 bgcolor=$color>$value</td><td border=right align=center  width=8>$phys</td>";
} else {
   if(length($phys)==1) {$phys="\ ".$phys;};
 print "<td align=center  width=5>$bcm</td><td align=center   width=25>$name</td><td align=center width=10 >$direction</td><td align=center  width=5 >$value</td><td align=center  width=8 border=right>$phys</td>";
}
if($name2=~/GPIO/) {
   if($value2=="1") {$color="lightgreen"} else {$color="lightgrey"};
if($direction2 eq "OUT") {$value2="<form action=./gpioweb.cgi 
method=post><input type=hidden  name=changevalue value=$value2><input 
type=hidden name=function value=changevalue><input type=hidden name=gp 
value=$bcm2><input type=hidden name=newvalue value=$value2><br><input 
type=submit value=$value2></form>";};
  print "<td align=center  width=8 border=left>$phys2</td><td align=center  width=5 bgcolor=$color>$value2</td><td align=center width=10 bgcolor=$color><form action=./gpioweb.cgi method=post><input type=hidden name=function value=changedirection><input type=hidden name=gp value=$bcm2><input type=hidden name=direction value=$direction2><br><input type=submit value=$direction2></form></td><td align=center  width=25 bgcolor=$color>$name2</td><td align=center  width=5 bgcolor=$color>$bcm2</td>\n";
} else {
print "<td align=center  width=8 border=left>$phys2</td><td align=center  
width=5>$value2</td><td align=center width=10 >$direction2</td><td align=center 
 width=25>$name2</td><td align=center  width=5>$bcm2</td>\n";
}
print "</tr>\n";
}
print "</table>\n";
print "</body></html>";
exit;

Original comment by [email protected] on 14 Apr 2015 at 1:25

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant