OpenSprinkler › Forums › OpenSprinkler Unified Firmware › Running OSPi Unified Firmware on RPi with no OSPi HW
- This topic has 16 replies, 2 voices, and was last updated 9 years, 1 month ago by akobari.
-
AuthorPosts
-
August 31, 2015 at 3:55 pm #40060
akobariParticipantHello,
Can someone please explain to me, if I can run OSPi Unified Firmware on RPi board without any Open Sprinkler Pi board attach to it? I know this sounds a bit crazy, why I am doing this, just want to get familiar with Unified Firmware before I get my hardware!
I have tried to create a standalone raspbian-wheezy.img version + OpenSprinklerGen2.git, on my RPi and as soon as it installed the firmware with “Done!” confirmation, the board freezes with no response at all. Also I have tried Ray’s combine image “ospi2new.img” and the result was the same, it crashed and stop working. So I was wondering if I must have the OPenSprinkler hardware connected to GPIO.Thanks in advance
August 31, 2015 at 6:21 pm #40061
akobariParticipantHere is the log file for running ospi2.img file . After successful SD card format and writing this image, after reboot the program stuck in i2c driver load:
[ 7.618468] bcm2708_i2c_init_pinmode(1,2)
[ 7.805487] bcm2708_i2c_init_pinmode(1,3)
[ 7.980748] bcm2708_i2c 20804000.i2c: BSC1 Controller at 0x20804000 (irq 79) (baudrate 100000)
[ 11.984147] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
[ 12.078828] random: nonblocking pool is initialized
[ 12.448077] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
[ 13.512393] i2c /dev entries driverThat’s why I was asking if it is waiting in I2c driver for ever to get some reply back from OpenSprinkler Hardware
August 31, 2015 at 7:09 pm #40062
SamerKeymasterYou can use the standard Raspberry Pi image and simply download and run the program as follows:
// Downloads the firmware code git clone https://github.com/OpenSprinkler/OpenSprinkler-Firmware // Enter the directory that contains the above code cd OpenSprinkler-Firmware // Compile the firmware (this step will also ask if you want to run on system startup) ./build.sh ospi // Run the program now (if you installed on system startup you could also start that way) ./OpenSprinkler
Hope that helps!
Update: You can even run the code on OS X, etc by using ‘build.sh demo’. The demo is also publicly available here: http://demo.opensprinkler.com.
August 31, 2015 at 8:10 pm #40065
akobariParticipantHi Samer,
Thanks for reply, I did exactly what you suggested, and the outcome is the same after git clone, and asking if I want auto start of the code during the boot, and answering YES, it prints “Done!” and nothing else happens! total freeze! unless if I reboot the board, and gain after reboot it freezez , Here is the out put:
areraspberrypi:~$ git clone https://github.com/OpenSprinkler/OpenSprinkler-Firmw
Cloning into ‘OpenSprinkler-Firmware’…
remote: Counting objects: 976, done.
remote: Compressing objects: 100% (16/16), done.
remote: Total 976 (delta 5), reused 0 (delta 0), pack-reused 960
Receiving objects: 100% (976/976), 567.32 KiB | 718 KiB/s, done.
Resolving deltas: 100% (668/668), done.
pi@raspberrypi:~$ cd OpenSprinkler-Firmware/
pi@raspberrypi:~/OpenSprinkler-Firmware$ sudo ./build.sh ospi
Building OpenSprinkler…
Do you want to start OpenSprinkler on startup? y
Adding OpenSprinkler launch script…
update-rc.d: using dependency based boot sequencing
Done!
pi@raspberrypi:~/OpenSprinkler-Firmware$Any idea whats going on? I have tried many different SD card, and many different source of power for RPi, no change!!
Thanks
August 31, 2015 at 8:13 pm #40066
SamerKeymasterSounds like something else is wrong if it’s locking up at the command line (the last line you copied). The firmware isn’t even running at that point and the compilation step already completed above.
You can answer the question with (n) to avoid the launch script setup.
Issues with random lockups tend to be related to weak power supplies, if I am not mistaken.
Also, you can also test this code on any 32/64-bit linux or OS X by using ./build.sh demo
August 31, 2015 at 8:56 pm #40068
akobariParticipantI am pretty sure that power source is OK, I also tried some other power source. I Noticed when it powers up during reboot, it’s trying to load I2C drivers, so I made the RPI image and then ran the “‘sudo raspi-config” script in order to Enable I2C in kernel, that help, because all RPi peripherals are Disable by default! I am not getting the frozen screen anymore , because of kernel I2C enabled. Now when I run the script sudo /etc/init.d/OpenSprinkler.sh restart, nothing happens, I looked at the file OpenSprinkler.sh in init.d directory and its empty very strange!!!
pi@raspberrypi:~$ ls -l /etc/init.d/OpenSprinkler.sh
-rwxr-xr-x 1 root root 0 Sep 1 01:38 /etc/init.d/OpenSprinkler.shAny idea?
Thanks
August 31, 2015 at 8:57 pm #40071
SamerKeymasterYou can run the code manually from within the program directory using: ./OpenSprinkler
August 31, 2015 at 9:12 pm #40072
akobariParticipantHi Samar,
Thanks again for your help, so I did ran the program in director itself, like this:
pi@raspberrypi:~$ cd OpenSprinklerGen2/
pi@raspberrypi:~/OpenSprinklerGen2$ ./OpenSprinkler &
[1] 2327
pi@raspberrypi:~/OpenSprinklerGen2$ ps
PID TTY TIME CMD
2311 ttyAMA0 00:00:01 bash
2327 ttyAMA0 00:00:00 OpenSprinkler
2428 ttyAMA0 00:00:00 ps
pi@raspberrypi:~/OpenSprinklerGen2$I can see the process is running but when I go to Chrome or Firefox and enter boradIP:8080, nothing happens! Can you tell me which one of these are correct code to get:
https://github.com/OpenSprinkler/OpenSprinkler-Firmware
or
https://github.com/OpenSprinkler/OpenSprinklerGen2.gitor does not matter!
August 31, 2015 at 9:16 pm #40074
SamerKeymasterI think you’ll notice the 2nd link takes you to the first link. That is to say, they are the same thing.
Can you try not backgrounding the task so we can see the console output?
August 31, 2015 at 9:33 pm #40075
akobariParticipantwhen I type this as a process, nothing comes out from console! cursor just sit there!
pi@raspberrypi:~/OpenSprinklerGen2$ sudo ./OpenSprinkler
Do you have a debug flag option?
Thanks
August 31, 2015 at 9:48 pm #40076
SamerKeymasterJust sitting there is not a bad thing, it means no error is being output.
What IP are you trying and is the computer on the same network that you are attempting to connect with?
When you run:
ifconfig
what IP do you see? Is this the IP you are using?You are welcome to try the upcoming 2.1.6 update (which currently does output some debug information) by doing the following clone command to see if anything changes:
git clone -b 2.1.6 https://github.com/OpenSprinkler/OpenSprinkler-Firmware
August 31, 2015 at 10:04 pm #40077
akobariParticipantI have already ping 192.168.2.26
C:\Documents and Settings\Ali>ping 192.168.2.26
Pinging 192.168.2.26 with 32 bytes of data:
Reply from 192.168.2.26: bytes=32 time<1ms TTL=64
Reply from 192.168.2.26: bytes=32 time<1ms TTL=64pi@raspberrypi:~$ ifconfig
eth0 Link encap:Ethernet HWaddr b8:27:eb:50:e4:06
inet addr:192.168.2.26 Bcast:192.168.2.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:56 errors:0 dropped:0 overruns:0 frame:0
TX packets:46 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:5316 (5.1 KiB) TX bytes:6244 (6.0 KiB)lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:8 errors:0 dropped:0 overruns:0 frame:0
TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1104 (1.0 KiB) TX bytes:1104 (1.0 KiB)and I am using port 8080, if that’s correct,
http://192.168.2.26:8080/ nothing, i used both chrome and firefox
August 31, 2015 at 10:06 pm #40078
SamerKeymasterWhen you say nothing, is there an error message?
Is there a blank screen? If there is a blank screen, does the browser have network access? If not, it won’t be able to render the UI. You are welcome to try this app: https://marketplace.firefox.com/statistics/app/opensprinkler
August 31, 2015 at 10:21 pm #40079
akobariParticipantHi Samer,
I just tried your 2.1.6 update version and now its much better, although I am still getting an empty /etc/init.d/OpenSprinkler.sh file, but when I try ./Opensprinkler in Firefox only (no luck on google chrome) I do get first page screen, which is fantastic progress, it shows password (I am not sure what it is) and “submit” under that, and your debug statement is coming like this:pi@raspberrypi:~$ cd OpenSprinkler-Firmware/
pi@raspberrypi:~/OpenSprinkler-Firmware$ ./OpenSprinkler
failed to open gpio direction for writing
failed to open gpio
failed to open gpio direction for writing
failed to open gpio
failed to open gpio direction for writing
failed to open gpio direction for writing
failed to open gpio
failed to open gpio
failed to open gpio
ailed to open gpio direction for writing
failed to open gpio direction for writing
failed to open gpio
/home/pi/OpenSprinkler-Firmware/
network established.
weather server ip:54:191:131:59
GET /weather0.py?loc=Boston,MA&key=&fwv=216&wto= HTTP/1.0
HOST: weather.opensprinkler.com
&scale=-1&rd=-1&tz=32&sunrise=367&sunset=1160&eip=409173545
failed to write value on pin failed to write value on pin failed to write value on pin failed to write value on pin failed to write value on pin failed to write value on pin failed to write value on pin failed to write value on pin failed to write value on pin failed to write value on pin failed to write value on pin failed to write value on pin failed to write value on pin failed to write value on pin failed to write value on pin failed to write value on pin failed to write value onAugust 31, 2015 at 10:28 pm #40080
akobariParticipantHi Samer,
Its strange, because both Firefox and Chrome shows this source code:
<!DOCTYPE html>
<html>
<head>
<meta name=”viewport” content=”width=device-width,initial-scale=1.0,minimum-scale=1.0,user-scalable=no”>
</head>
<body>
<script>var ver=216,ipas=0;</script>
<script src=”https://ui.opensprinkler.com/js/home.js”></script>
</body>
</html>but Chrome can not find https://ui.opensprinkler.com/js/home.js java script, so may be a setting my chrome is doing it!
August 31, 2015 at 10:32 pm #40081
SamerKeymasterCuriously, why does everything you type end with an exclamation mark?
Most likely you have some sort of ad blocker or “malware scanner” trying to help you?
The console messages you pasted earlier are only because you did not run the program as root (GPIO access requires root).
Anyways, glad you got it working.
August 31, 2015 at 10:33 pm #40082
akobariParticipantI found the password “opendoor” and it worked like a champ! excellent, so I had to use your latest version, 2.1.6 update nothing else worked for me, Now I have to figure out why its not working on chrome, next I will try IE and Safari, to see if it works, Thanks again for your help,
Ali,
-
AuthorPosts
- You must be logged in to reply to this topic.
OpenSprinkler › Forums › OpenSprinkler Unified Firmware › Running OSPi Unified Firmware on RPi with no OSPi HW