|
Post by Chris Iverson on Feb 26, 2019 1:21:16 GMT -5
You can actually probably find a solar panel that can run a Pi pretty easily. The biggest issue is energy storage.
Pis can run off of 5V, ~2amps. The main charger I have is 5V, 2.5amps, which never seems to give an undervoltage warning.
Maybe 5.5V, 2.5amp, to be sure.
That's a 12.5W - 13.75W requirement. That's not too bad to get.
Again, the only issue is retaining energy. You'd need some form of battery that can both power the Pi, and be recharged by the panels. Otherwise, you shut down once the sun goes down.
|
|
|
Post by tenochtitlanuk on Feb 26, 2019 3:28:36 GMT -5
Great minds think alike- look what desktop icon I'd allocated on my Linux Mint screen! Shows how glad I am that LB5 is out in the wild, if only in alpha- and can't wait to get home to my Pi's- I'm away on holiday at present.
|
|
|
Post by Chris Iverson on Feb 26, 2019 13:15:27 GMT -5
For those having problems with LB5 in 64-bit Linux, would you be able to post the results of running the ldd command on the LB5 executable?
ldd is a command that lists the dynamic shared libraries that will be loaded into the executable when it runs.
When I use it on my server, I get the following:
chris@shinoko:~/lb5-alpha$ ldd lin32-347 linux-gate.so.1 (0xf7f9b000) libX11.so.6 => /usr/lib/i386-linux-gnu/libX11.so.6 (0xf7e3d000) libpthread.so.0 => /lib/i386-linux-gnu/libpthread.so.0 (0xf7e1e000) librt.so.1 => /lib/i386-linux-gnu/librt.so.1 (0xf7e14000) libdl.so.2 => /lib/i386-linux-gnu/libdl.so.2 (0xf7e0f000) libm.so.6 => /lib/i386-linux-gnu/libm.so.6 (0xf7d0d000) libz.so.1 => /lib/i386-linux-gnu/libz.so.1 (0xf7cee000) libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xf7b12000) libxcb.so.1 => /usr/lib/i386-linux-gnu/libxcb.so.1 (0xf7ae6000) /lib/ld-linux.so.2 (0xf7f9d000) libXau.so.6 => /usr/lib/i386-linux-gnu/libXau.so.6 (0xf7ae2000) libXdmcp.so.6 => /usr/lib/i386-linux-gnu/libXdmcp.so.6 (0xf7adb000) libbsd.so.0 => /lib/i386-linux-gnu/libbsd.so.0 (0xf7abe000)
You can see that, except for a couple of base libraries, they're all pointing at libraries within i386-linux-gnu, indicating that they're 32-bit libraries.
Why are those two base libraries *not* shown as 32-bit libs?
Well, linux-gate.so.1 is not a library that actually exists; it is a virtual library that gets injected into every process, acting as a mechanism for making system calls. It is the 32-bit version of this library.
ld-linux.so.2 is the actual loader that launches 32-bit programs. When the kernel is asked to run a program, it checks the file to determine if it's a proper executable, and what architecture the executable is made for, and hands off to the appropriate launcher.
/lib/ld-linux.so.2 is the loader for 32-bit Linux ELF binaries.
If we check an actual 64-bit binary:
chris@shinoko:~/lb5-alpha$ ldd /bin/bash linux-vdso.so.1 (0x00007fff49efe000) libtinfo.so.5 => /lib/x86_64-linux-gnu/libtinfo.so.5 (0x00007f384998c000) libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f3849788000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f3849397000) /lib64/ld-linux-x86-64.so.2 (0x00007f3849ed0000)
We can see /lib64/ld-linux-x86-64.so.2 in the place of the 32-bit loader, as well as linux-vdso.so.1 replacing linux-gate.so.2. (VDSO = Virtual Dynamic Shared Object; a mechanism for exporting kernel-space routines and functions to usermode to allow them to be used without needing to do an expensive syscall trap and context switch for each call. linux-gate is a VDSO, as well, it's just the 32-bit version.)
Anyway, cutting off the flood of information I just learned and getting back on topic, checking the lb5 binary with ldd should let us see if it's properly resolving all dependencies to 32-bit versions, or if it's using a 64-bit version of one of those libs by mistake.
|
|
|
Post by metro on Feb 26, 2019 17:53:08 GMT -5
....from a user with no broblems starting lb5-347 in Linux but can't start RunBasic. I do not see any difference between the 3 programs requirements but two of them trigger a segmentation fault
root@Dell:/opt/rb101free# ldd rbp linux-gate.so.1 (0xf7f09000) libpthread.so.0 => /lib/i386-linux-gnu/libpthread.so.0 (0xf7ec4000) librt.so.1 => /lib/i386-linux-gnu/librt.so.1 (0xf7eba000) libdl.so.2 => /lib/i386-linux-gnu/libdl.so.2 (0xf7eb5000) libX11.so.6 => /usr/lib/i386-linux-gnu/libX11.so.6 (0xf7d6b000) libm.so.6 => /lib/i386-linux-gnu/libm.so.6 (0xf7c69000) libz.so.1 => /lib/i386-linux-gnu/libz.so.1 (0xf7c4a000) libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xf7a6e000) /lib/ld-linux.so.2 (0xf7f0b000) libxcb.so.1 => /usr/lib/i386-linux-gnu/libxcb.so.1 (0xf7a42000) libXau.so.6 => /usr/lib/i386-linux-gnu/libXau.so.6 (0xf7a3e000) libXdmcp.so.6 => /usr/lib/i386-linux-gnu/libXdmcp.so.6 (0xf7a37000) libbsd.so.0 => /lib/i386-linux-gnu/libbsd.so.0 (0xf7a1a000) root@Dell:/opt/rb101free#
laurie@Dell:~/rb101$ ldd rbp linux-gate.so.1 (0xf7f9c000) libpthread.so.0 => /lib/i386-linux-gnu/libpthread.so.0 (0xf7f57000) librt.so.1 => /lib/i386-linux-gnu/librt.so.1 (0xf7f4d000) libdl.so.2 => /lib/i386-linux-gnu/libdl.so.2 (0xf7f48000) libX11.so.6 => /usr/lib/i386-linux-gnu/libX11.so.6 (0xf7dfe000) libm.so.6 => /lib/i386-linux-gnu/libm.so.6 (0xf7cfc000) libz.so.1 => /lib/i386-linux-gnu/libz.so.1 (0xf7cdd000) libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xf7b01000) /lib/ld-linux.so.2 (0xf7f9e000) libxcb.so.1 => /usr/lib/i386-linux-gnu/libxcb.so.1 (0xf7ad5000) libXau.so.6 => /usr/lib/i386-linux-gnu/libXau.so.6 (0xf7ad1000) libXdmcp.so.6 => /usr/lib/i386-linux-gnu/libXdmcp.so.6 (0xf7aca000) libbsd.so.0 => /lib/i386-linux-gnu/libbsd.so.0 (0xf7aad000) laurie@Dell:~/rb101$
laurie@Dell:~/Downloads/lb5-347$ ldd lin32-347 linux-gate.so.1 (0xf7f83000) libX11.so.6 => /usr/lib/i386-linux-gnu/libX11.so.6 (0xf7e13000) libpthread.so.0 => /lib/i386-linux-gnu/libpthread.so.0 (0xf7df4000) librt.so.1 => /lib/i386-linux-gnu/librt.so.1 (0xf7dea000) libdl.so.2 => /lib/i386-linux-gnu/libdl.so.2 (0xf7de5000) libm.so.6 => /lib/i386-linux-gnu/libm.so.6 (0xf7ce3000) libz.so.1 => /lib/i386-linux-gnu/libz.so.1 (0xf7cc4000) libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xf7ae8000) libxcb.so.1 => /usr/lib/i386-linux-gnu/libxcb.so.1 (0xf7abc000) /lib/ld-linux.so.2 (0xf7f85000) libXau.so.6 => /usr/lib/i386-linux-gnu/libXau.so.6 (0xf7ab8000) libXdmcp.so.6 => /usr/lib/i386-linux-gnu/libXdmcp.so.6 (0xf7ab1000) libbsd.so.0 => /lib/i386-linux-gnu/libbsd.so.0 (0xf7a94000) laurie@Dell:~/Downloads/lb5-347$
|
|
|
Post by Carl Gundel on Feb 26, 2019 18:09:29 GMT -5
....from a user with no broblems starting lb5-347 in Linux but can't start RunBasic. I do not see any difference between the 3 programs requirements but two of them trigger a segmentation fault
<snip> It's interesting and perhaps helpful that some people are able to use Run BASIC and some are not, but being able to use LB5 347 does not indicate compatibility with Run BASIC because they are based on very different versions of VisualWorks Smalltalk.
|
|
|
Post by metro on Feb 26, 2019 18:26:42 GMT -5
....from a user with no broblems starting lb5-347 in Linux but can't start RunBasic. I do not see any difference between the 3 programs requirements but two of them trigger a segmentation fault
<snip> It's interesting and perhaps helpful that some people are able to use Run BASIC and some are not, but being able to use LB5 347 does not indicate compatibility with Run BASIC because they are based on very different versions of VisualWorks Smalltalk. Oh dear, does that mean for Rb1.0.2 you have to re-write in the new Smalltalk version?
|
|
|
Post by Carl Gundel on Feb 26, 2019 18:57:16 GMT -5
It's interesting and perhaps helpful that some people are able to use Run BASIC and some are not, but being able to use LB5 347 does not indicate compatibility with Run BASIC because they are based on very different versions of VisualWorks Smalltalk. Oh dear, does that mean for Rb1.0.2 you have to re-write in the new Smalltalk version? That would RB v2 and yes, but this would be a much easier port than LB because there’s no GUI to move over.
|
|
|
Post by metro on Feb 26, 2019 19:07:26 GMT -5
Oh dear, does that mean for Rb1.0.2 you have to re-write in the new Smalltalk version? That would RB v2 and yes, but this would be a much easier port than LB because there’s no GUI to move over. Brain fade , yes RB v2 is what I should have said. I admire your tenacity and commitment
thank for all the enjoyment you've given me (us) with LB & RB
|
|
|
Post by Carl Gundel on Feb 26, 2019 19:35:36 GMT -5
That would RB v2 and yes, but this would be a much easier port than LB because there’s no GUI to move over. Brain fade , yes RB v2 is what I should have said. I admire your tenacity and commitment
thank for all the enjoyment you've given me (us) with LB & RB
Oh, sure thing. Just do me a favor and tell everything that moves and breaths about Liberty BASIC and Run BASIC.
|
|
|
Post by donnybowers on Feb 26, 2019 21:35:27 GMT -5
Chris said: I played a game of hangman and won. LOL. Thanks for doing that. One of the biggest problems I've had with RB is finding examples of apps to test online. Both the hangman and the graphics seemed quite responsive and my internet has been moving a little slow this evening. I'm going to bookmark your sites for further reference. If I ever get my website off the ground I'll probably offer links to these sites if you don't mind. I'm sure I won't be getting any real traffic for the foreseeable future, so I'm sure your sites won't be swamped by it. LOL.
|
|
|
Post by Chris Iverson on Feb 26, 2019 22:15:34 GMT -5
I'd rather you not. I don't really mind if you do, but both of those are just demos that come with Run BASIC, and I can't provide any guarantee of uptime on that site. (The site itself will most likely remain up, but the question of RB is "will I bother to/remember to restart it?" When I restart the server, since it doesn't run as a service, and doesn't autostart on boot.)
The same demos are available to anyone who downloads the RB trial, and I'm pretty sure they're available at the RB website as one of its examples.
|
|
|
Post by donnybowers on Feb 27, 2019 2:52:12 GMT -5
You can actually probably find a solar panel that can run a Pi pretty easily. The biggest issue is energy storage. Pis can run off of 5V, ~2amps. The main charger I have is 5V, 2.5amps, which never seems to give an undervoltage warning. Maybe 5.5V, 2.5amp, to be sure. That's a 12.5W - 13.75W requirement. That's not too bad to get. Again, the only issue is retaining energy. You'd need some form of battery that can both power the Pi, and be recharged by the panels. Otherwise, you shut down once the sun goes down. So 13.75 x 24 hours = 330 watt hours per day I live at about the 44th parallel, so I average approximately 4 hours of solar per day. 330 / 4 = 82.5 So theoretically you would need at least 82.5 watts of solar panel(s) to produce the necessary wattage. Since you're probably going to use solar panels that are greater than 5.5 volts, there will be losses in the buck converter to lower the voltage. So a 100 watt panel would probably work assuming there are no other losses. The problem with power storage is that you need enough storage to get through cloudy days. Where I live, in the winter we can sometimes get a month or two where it's cloudy most of the time. Let's say we need to have a reserve of at least 1 week of power. 400 * 7 = 2800 watts = roughly 509 amp hours Since you never want to drain a lead acid battery more than 50%, you actually probably want about a 1000 amp hour battery bank if you use lead acid. You actually probably don't need this much in practice, because your Pi is not likely to use 2 amps all of the time unless you're running a really popular website. It will probably average more like about 1.5 amps per hour x 24 hours = 36 amp hours per day for about 252 amp hours per week. So we're probably looking at more like a 500 amp hour lead acid battery bank, assuming our calculations of how much reserve we need is right. 500 amp hours of battery bank could get pretty expensive. Maybe it would be better to just tell people that your site may go down sometimes late at night because it's totally run on a small solar energy system. LOL Then you could just use whatever size battery you could afford within reason. Personally, I will probably use a 100 or 200 watt solar panel and an old car battery converted to alum for this project if I ever do it. I would like to do it with RB, but I would have to be able to have it automatically start on boot up. I know it could easily be done with Apache, but not sure about RB.
|
|
|
Post by donnybowers on Feb 27, 2019 3:12:27 GMT -5
I'd rather you not. I don't really mind if you do, but both of those are just demos that come with Run BASIC, and I can't provide any guarantee of uptime on that site. (The site itself will most likely remain up, but the question of RB is "will I bother to/remember to restart it?" When I restart the server, since it doesn't run as a service, and doesn't autostart on boot.) The same demos are available to anyone who downloads the RB trial, and I'm pretty sure they're available at the RB website as one of its examples. That's okay. The idea was to have an example of an RB website that I could share with others on my website. I should go to the RB forum and suggest autostart on boot for one thing. I did find a couple of working sites one day somewhere in the RB forum. I can probably use those as examples, but if there's a lot of down time with RB it probably won't matter that much anyway. Uptime is important with any website. Too much downtime and people stop coming. I'll continue playing with the personal version, but at this point it kind of looks like more of a novelty type thing. Maybe there's a way to use a bash .sh file and a command line parameter to automatically start the server?
|
|
|
Post by metro on Feb 27, 2019 3:50:11 GMT -5
I'm sure Dan won't mind if I share his site. I could be wrong but I do not believe there is a more prolific producer of code for RunBasic than meerkat www.kneware.com/rbp/index.html
|
|
|
Post by meerkat on Feb 27, 2019 5:45:41 GMT -5
Another place to look is Rosetta Code. There are lots of examples of Run Basic here: RB on Rosetta CodeI running Run Basic behind Apache. Would be great if RB could use something other than SQLite because I have some systems that down time is not allowed and must run 24/7/365. Replication will allow that.
|
|