Posts mit dem Label raspberry pi 2 werden angezeigt. Alle Posts anzeigen
Posts mit dem Label raspberry pi 2 werden angezeigt. Alle Posts anzeigen

Freitag, 1. Mai 2015

WOW-TO install Open Source Point of Sale

Dienstag, 21. April 2015

openEMR on a Raspberry Pi 2 Model B in combination with a 500GB USB.HDD

Inside, there is hidden a complete EMR administration system. The cigarettebox is only 4 measurement demo purpose, not 4 smoking....

- Raspberry Pi 2B
- 500 GB USB.HDD
- powercable
- WiFi USB.stick with antenna
:)

  • Note: It's an idea, a concept  but not a product! 
  • power supply needs some push
  • USB-contacts seem not to be too stable, so soldering might be a solution here, regarding
  • conditions in dev. world


The system is working as a complete autonomous stand-alone WiFi-system solution. It can support simultaneously some rooms nearby in a normal building. - You just need a "tablet-pc", a smartphone or any WiFi-driven gadget and connect to wifi SSID: http://10.11.10.11, then typing in browser the same http://10.11.10.11 and you will have instant access to your OpenEMR-system. It needs only about 4-5 watts/h, so it can be made in some way "out of the box". Put it in your briefcase - and secure it :). Solar powering is also an option, because 12 V is enough to operate the whole complex.... Grid in dev.countries often produces high voltage peaks, up to 1.000 V. This will destroy most electronic devices..

-----------------------------------------------------------------------------------------
At a 1st glance, it works like a charme.. 
Very interesting 4 ICT4D applications, i think.


 
just a little insight
 
-----------------------------------------------------
 
Here, a how-to tutorial, resp., how-i did it. You can do, but this will need some time. You may collaborate with any google account.

Samstag, 4. April 2015

KIWIX: complete WIKIPEDIA (12/2014) as a dump on a Raspberry Pi 2 w/external USB.harddisc drive

KIWIX wiki-data ressources are as follows:
total of about 28 Gigabytes. No problem for a 3 TerraByte USB.disc

http://oliverlorenz.com/blog/wikipedia-auf-dem-raspberry-pi/

moodle - blended e-learning with a Raspberry Pi 2 and an external USB.harddisk drive




WOW-TO install an external USB.drive in Raspberry Pi 2, without need to add an external power supply

Hi all over there

this WOW-TO article generates constantly a lot of traffic, from all over the globe.....I replaced it with a short collaborative online-documentation you should use from now. I will update this in intervalls.

You are invited to comment and/or contribute to make it even better.

Pls, just follow this link to reach the online document: Wow-to: Empowering USB.port current of a Raspb..


----------------------
People without any time may take a glance on this embedded version:

Freitag, 3. April 2015

automount USN in Raspberry Pi 2 B

Hier geht es darum, einen USB-Stick automatisch auf dem Raspi zu "mounten". Das bedeutet "einbinden oder montieren", so dass man über das Verzeichnissystem darauf zugreifen kann. 
Hierfür ist die Software "usbmount" geeignet, welche auf das "automatisch Einbinden" von USB-Sticks ausgelegt ist.

Mittwoch, 1. April 2015

USB - Stromversorgung - Erhöhung des Stromflusses durch SoftwareEingriff


Tutorial: https://docs.google.com/document/d/1Pk-KyhFfpn0N-uRCGs-bm5hmn8Jmk1apJg558RdnZn4/pub



Raspberry Pi 2 USB.drive tauglich machen:

sudo nano /boot/config.txt 
max_usb_current=1
sudo reboot

erst dann das USB.drive einstecken
-------------------------

http://www.plantoschka.com/plantoschka/2015/2/8/raspberry-pi-2-externe-25-festplatte

Notwendig dafür ist ein Eintrag in der config.txt. Diese findet ihr bei Raspbian unter /boot/config.txt und bei Openelec unter /flash/config.txt
Ganzen unten in die config.txt fügt ihr folgenden Eintrag hinzu:

max_usb_current=1
 
  • Setting max_usb_current=1 sets the available current over USB to 1.2A (default is 600mA)
  • This can help if you have a decent power supply (2A, at least) and need to power something like a small external HDD or something that needs 300+ mA.
  • This feature is only available on the B+ and Pi model 2 (at the time of this writing).
 
 
All that max_usb_current=1 does is to set GPIO38 high, which in turn 
turns on a FET, which connects a second 39K resistor in parallel to an 
existing one, on pin 5 of U13, the AP2553W6 USB power manager, lifting 
the current limit from 0.6A to double that (1.2A), see no possible 
scenario there why the PI resets because of that, except in case the 
gate of the FET Q4 is somehow shorted to GND. Which could be caused by a
 production fault. Inspect Q4, as look if there is solder shorting pins 
together. Also R6 (resistor mounted between gate of Q4 and GND) should 
be 100K not 0 Ohm. U13, Q4 and R6 should be near the USB ports.
 
 
 
 
http://www.raspberrypi.org/forums/viewtopic.php?f=29&t=100244
 
 
http://raspberrypi.stackexchange.com/questions/27708/is-setting-max-usb-current-1-to-give-more-power-to-usb-devices-a-bad-idea 



Donnerstag, 26. März 2015

Getting GPS working on a Raspberry Pi

 Getting GPS working on a Raspberry Pi

 
http://blog.retep.org/2012/06/18/getting-gps-to-work-on-a-raspberry-pi/

saving content:

One of the tasks I want to use a Raspberry PI for is to take over the duties of an existing ITX based linux box running my weather station. Now in theory that should be pretty simple as the current setup uses pywws to connect to the station and as that’s written in python it should work.
Now the Raspberry PI has no onboard Real time clock – which means it needs to use an NTP server to get the time when it starts. Usually you would use the default settings and allow the PI to connect to thenet for it’s time. Now this is fine if you have a working net connection but what if you are not connected to the net? You might be in the field running the PI on batteries.
As the other projects I have lined up for it is to connect my Meade LX200GPS telescope to the local network or to work with my (in prototype) radio telescopes so having an accurate clock is going to be required.
Now the obvious solution here is to use GPS as a time source. GPS works by having a constellation of satellites in orbit and each one carries a highly accurate atomic clock & broadcast both their current position and the time. A GPS receiver then receives these signals and, as long as it has enough satellites and workout where you are by comparing the times from those clocks.
So this article shows how to use A GPS receiver with the Rasperry PI – although these instructions are not specific to the PI.

The hardware

For this experiment I’m using a USB GPS receiver from Maplin – product code A73KF. I bought this several months ago when they had it on special offer for £19.99 – it usually retails for £29.99.


Raspberry PI with the A73KF GPS receiver plugged in
Now it comes with a CD for Windows machines but we don’t need it – as the majority of GPS receivers I know of use serial & this is no exception. When plugged in it appears as a serial port.
Plug it in and run lsusb
1
2
3
4
5
pi@raspberrypi:~$ sudo lsusb
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp.
Bus 001 Device 004: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port
Bus 001 Device 002: ID 0424:9512 Standard Microsystems Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
There the Prolific Technology entry is the GPS appearing as a serial port. If you look in /var/log/syslog you will also notice it will have created the port as /dev/ttyUSB0 as it’s the first serial port.

Using the PI as a GPS Receiver

Now the next step is to get the pi receiving data from the satellites. Now there is a suite of tools available for Linux called gpsd which we’ll install:
1
pi@raspberrypi:~$ sudo apt-get install gpsd gpsd-clients python-gps
Next we need to start the daemon:
1
pi@raspberrypi:~$ sudo gpsd /dev/ttyUSB0 -F /var/run/gpsd.sock
Ignore any messages from the console or in the log files, you may see it complaining about IPv6 but you can ignore that.

Viewing whats in the sky & your location

Now GPS doesn’t work indoors – as it needs a clear view of the sky so for this I’ve placed the PI on the window sill. Next I ssh into the pi and run cgps.
1
pi@raspberrypi:~$ cgps -s
The -s flag is there to tell the command not to write raw data to the screen as well as the processed data.
You should then get the following output:
┌───────────────────────────────────────────┐┌─────────────────────────────────┐
│    Time:       2012-06-18T15:05:10.0Z     ││PRN:   Elev:  Azim:  SNR:  Used: │
│    Latitude:    51.231848 N               ││  14    43    249    40      Y   │
│    Longitude:    0.514014 E               ││  25    75    283    37      Y   │
│    Altitude:   132.3 m                    ││   2    26    085    31      Y   │
│    Speed:      0.0 kph                    ││  12    56    070    18      Y   │
│    Heading:    0.0 deg (true)             ││   9    19    133    22      Y   │
│    Climb:      0.0 m/min                  ││  27    09    133    17      Y   │
│    Status:     3D FIX (1 secs)            ││   4    17    045    31      Y   │
│    GPS Type:                              ││  32    05    321    20      Y   │
│    Longitude Err:   +/- 8 m               ││  29    41    192    18      Y   │
│    Latitude Err:    +/- 9 m               ││  31    28    304    42      Y   │
│    Altitude Err:    +/- 27 m              ││                                 │
│    Course Err:      n/a                   ││                                 │
│    Speed Err:       +/- 68 kph            ││                                 │
│                                           ││                                 │
│                                           ││                                 │
│                                           ││                                 │
│                                           ││                                 │
│                                           ││                                 │
└───────────────────────────────────────────┘└─────────────────────────────────┘
Here you can see it’s receiving from 10 satellites and it has the time and your location. The 3D FIX section tells you it has enough data for a 3D fix on your location (i.e. altitude). The Err lines tell you the error in your position. If you leave it running you should see the Err values change every second or so.

Viewing GPS under X-Windows

Now above I showed how the GPS looks from an SSH connection but you can get a graphical display as well using the xgps client thats also been installed. Now if you have a monitor connected to the pi simply open a terminal and run xgps. However as I’ve not got a monitor against the window I’ve used ssh to connect to it from another machine. To get this to work you need to add -Y to the ssh command.
1
2
peter@somehost:~ $ ssh -Y pi@raspberrypi
pi@raspberrypi:~$ xgps
You should now get a window like the following open on your local machine – don’t worry if it takes a little while, it might take a second or two:

xgps running on a PI but being displayed on Mac OS-X

Setting the computer time using GPS

Now we have a working GPS we can now get the PI to use it for setting the time. To do this we need to configure ntp to use the GPS satellites as a time source. Now you should already have ntp installed but if not then you need to install it:
1
pi@raspberrypi:~$ sudo apt-get install ntp
Next you need to edit the file: /etc/ntp.conf and add a few lines to it defining the GPS. This can be either before or after the existing lines beginning with server:
1
2
3
4
5
# gps ntp
server 127.127.28.0 minpoll 4
fudge  127.127.28.0 time1 0.183 refid NMEA
server 127.127.28.1 minpoll 4 prefer
fudge  127.127.28.1 refid PPS
Now restart ntp:
1
pi@raspberrypi:~$ sudo service ntp restart
Now if you query the server you should after a while see it synchronize:
1
2
3
4
5
6
7
8
9
pi@raspberrypi:~$ ntpq -p
remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
*ns1.luns.net.uk 33.117.170.50    2 u   54   64    7   65.454    2.666   5.800
+resntp-b-vip.lo 127.151.91.34    3 u   45   64   17   55.704   -5.169   8.482
+bart.nexellent. 194.242.34.149   2 u   17   64   17   76.585   -4.271  57.595
+v01.s01.be.it2g 193.190.230.65   2 u   20   64   37   86.464   -2.374 228.460
xSHM(0)          .NMEA.           0 l   11   16  377    0.000  144.714   3.026
SHM(1)          .PPS.            0 l    -   16    0    0.000    0.000   0.000

A couple of notes:

You might find that ntp doesn’t connect to the gps at first. It appears that it starts gpsd up without the link to the serial port. What I find I have to do is:
1
2
3
pi@raspberrypi:~$ sudo killall gpsd
pi@raspberrypi:~$ sudo gpsd /dev/ttyUSB0 -F /var/run/gpsd.sock
pi@raspberrypi:~$ sudo service ntp restart
Once I’ve done this then after it gets a fix then it starts working. Sometimes running cgps and waiting for it to get a fix also fixes this.
I don’t know why this happens but it’s an issue I’ve yet to solve.


Mittwoch, 18. März 2015

WOW-TO convert a RaspberryPi 2 B into a standalone AP with REALTEK [EDIMAX] CHIP

WOW-TO convert a RaspberryPi 2 B into a standalone AP with REALTEK [EDIMAX] CHIP



Here is a short summary of all the commands (cooking-book like) without any of the comments above. So if you succeeded once, don’t care about comments, just do the essential work now:



sudo bash
sudo apt-get update && sudo apt-get upgrade -f && sudo apt-get dist-upgrade
sudo apt-get clean
sudo apt-get autoremove
sudo apt-get install git
sudo wget https://raw.github.com/Hexxeh/rpi-update/master/rpi-update -O /usr/bin/rpi-update && sudo chmod +x /usr/bin/rpi-update
sudo rpi-update
sudo reboot
sudo apt-get install isc-dhcp-server
sudo apt-get autoremove hostapd
wget https://github.com/jenssegers/RTL8188-hostapd/archive/v2.0.tar.gz
tar -zxvf v2.0.tar.gz
cd RTL8188-hostapd-2.0/hostapd
sudo make
sudo make install
sudo service hostapd restart
sudo nano /etc/dhcp/dhcpd.conf
#option domain-name "example.org";
#option domain-name-servers ns1.example.org, ns2.example.org;
authoritative;
subnet 10.10.10.0 netmask 255.255.255.0
{
range 10.10.10.20 10.10.10.80;
option broadcast-address 10.10.10.255;
option routers 10.10.10.1;
default-lease-time 600;
max-lease-time 7200;
option domain-name "local-network";
option domain-name-servers 8.8.8.8, 8.8.4.4;
}

sudo nano /etc/default/isc-dhcp-server
INTERFACES="wlan0"
sudo nano /etc/network/interfaces
iface wlan0 inet static
address 10.10.10.10
netmask 255.255.255.0
#iface wlan0 inet manual
#wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
#iface default inet dhcp
sudo nano /etc/sysctl.conf
net.ipv4.ip_forward=1
sudo sh -c "echo 1 > /proc/sys/net/ipv4/ip_forward"
sudo ifup wlan0
sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
sudo iptables -A FORWARD -i eth0 -o wlan0 -m state --state RELATED,ESTABLISHED -j ACCEPT
sudo iptables -A FORWARD -i wlan0 -o eth0 -j ACCEPT
sudo service isc-dhcp-server start
sudo service hostapd start
sudo update-rc.d hostapd enable
sudo update-rc.d isc-dhcp-server enable
sudo sh -c "iptables-save > /etc/iptables.ipv4.nat"
sudo nano /etc/network/interfaces
up iptables-restore < /etc/iptables.ipv4.nat
sudo nano /etc/rc.local
sleep 10 && service hostapd restart
sudo reboot