The discussion of the Alien series of films and the props used in them is the aim, but if it's got Big Bugs and Big Guns, then they are welcome too!





Post new topic Reply to topic  [ 10 posts ] 
Author Message
 Post subject: Linux SDcard setup for Raspberry pi
PostPosted: Sat Sep 23, 2017 8:12 pm 

Country: United States
Download your image here:
https://www.raspberrypi.org/downloads/
noobs or raspbian will work. If you have a weird network setup or are using WEP like me you will need to download the full image and not the lite image. Also bear in mind the lite image will miss a lot of the simple components you might need on some of your builds.

on mac or PC run the sdcard formatter utility
https://www.sdcard.org/downloads/formatter_4/


open a terminal window
run: diskutil list
note your sdcard partition:
on mine it was /dev/rdisk2

change directory to your folder containing your image file(s) and run:
sudo dd bs=1m if=raspianstretch.img of=/dev/rdisk2
you will get output:
Password:
1768+1 records in
1768+1 records out
1854418944 bytes transferred in 125.531660 secs (14772520 bytes/sec)

Device will then auto mount. Dismount and you are ready to boot your raspberry pi.
Note the raspberry pi WILL NOT BOOT if it DOES NOT SEE a proper boot image.
Here is a quick search result for a page listing compatible cards: http://www.raspberry-pi.co.uk/2012/06/0 ... -sd-cards/

Rule of thumb: if you pay less than 10 for the card it might not work with your pi.
I found this out the hard way when I spent all morning trying to get a few Sdcards off of wish.com to work only to find that there is a firmware compatibility issue with the pis and certain cheap scares something to do with data image leveling and communications issues. Hopes are that this will get fixed soon.

Given the fact many builds are now starting to use these I am not sure if this is sticky worthy or not.

_________________
The impossible takes a while longer and goes over budget too...


Top
 Profile  
Reply with quote  
 Post subject: Initial OS setup
PostPosted: Sun Sep 24, 2017 2:07 pm 

Country: United States
OS setup.


Now since I am using web based security I had to hack my interface file in \etc\network

and change below the line : auto wlan0
allow-hotplug walnut
iface wlan0 net dhcp (it was manual)
# comment out the reference to the wpa supplicant
# replace dhcp with static above if you need an unchanging IP
# these are the options used to statically assign an IP address
# address 10.0.0.41
# netmask 255.255.255.0
# network 10.0.0.0
# broadcast 10.0.0.255
# gateway 10.0.0.1
wireless-essid your-ssid-here
wireless-key your-key-goes-here
wireless-channel 6
# use static ip with ad-hoc networks.
# wireless-mode ad-hoc
# iface default net dhcp

(add as shown if you do not see the lines in your interfaces file, then reboot after other adjustments made.)

since I was using nano invoked with the sudo command as per standard security measures (su - and staying as root is disabled by default)

now update your wpa_supplicant:
at the end hit enter and add:
network={
ssid="yourssidhere"
key_mgmt=NONE
web_key0="yourkeyhere"
}

hit cntrl+x and hit y and then enter.

now once you do all that
run:
sudo /etc/init.d/networking restart
sudo service wpa_supplicant stop
sudo service wpa_supplicant start
sudo ifdown wlan0
sudo ifup wlan0



You should see a stream of dhcp ack and offer messages indicating you are now getting an IP address.

If using ad-hoc networks, add this to /etc/rc.local
before the start scripts:

ifconfig wlan0 up
iwconfig wlan0 essid test

Now that you are on the network.

Update your pi:
run:
sudo apt-get update
wait
sudo apt-get dist-upgrade
sudo rpi-update
wait
y
and enter

Generally speaking update your pie to the latest version there are numerous performance issues and bugs that are rapidly being addressed and fixed and this especially applies with the raspberry pi.

_________________
The impossible takes a while longer and goes over budget too...


Last edited by knoxvilles_joker on Fri Sep 29, 2017 12:18 am, edited 4 times in total.

Top
 Profile  
Reply with quote  
 Post subject: Set your keyboard nationality/localization options
PostPosted: Sun Sep 24, 2017 6:06 pm 

Country: United States
If you have issues mapping keys correctly. In the states run this:

setxkbmap -layout us

you can access raspberry pi configuration from the X-window session. If you don't have that type: "startx" without quotation marks and hit enter.

From the command line run:
sudo raspi-config

you can set localisation options there or from the GUI windows session.

_________________
The impossible takes a while longer and goes over budget too...


Last edited by knoxvilles_joker on Sun Sep 24, 2017 7:15 pm, edited 1 time in total.

Top
 Profile  
Reply with quote  
 Post subject: streaming camera
PostPosted: Sun Sep 24, 2017 6:55 pm 

Country: United States
sudo apt-get install vlc

streamer with the pi camera:

raspivid -h 600 -w 800 -o - -t 0 | cvlc -vvv stream:///dev/stdin --sout '#standard{access=http,mux=ts,dst=:8090}' :demux=h264

on client device:
launch vlc
open network
address http://x.x.x.x:8090

on the client pi run:

omxplayer -o hdmi http://x.x.x.x:8090

vlc will not work properly with the pi due to the software decoding quirks and lack of a VPU and use of CPU processing.

Update:
After losing the last card (I will tape it in for transport next time.) I had to rebuild the setup. As I always try to improve things and fix issues I had with the last go around I found these options offered better performance:

raspivid -h 600 -w 800 -o - -g 10 -fps 24 -b 5000000 -t 0 | cvlc -vvv stream:///dev/stdin --sout '#standard{access=http,mux=ts,dst=:8090}' :demux=h264

-fps is frames per second
-h and -w is the resolution
-b is the bitrate
-g is the refresh rate
-t is the time to save zero is not time limit
-o is the output file name (- equates to nothing)

The key for better performance is to lower resolution, buffer rates, and frame rates. You will still have a few seconds delay due to the way the protocols and hardware works. To put it in perspective the raspberry pi is equivalent to a 486 from 30 years ago from a processor and video stand point.

_________________
The impossible takes a while longer and goes over budget too...


Last edited by knoxvilles_joker on Wed Sep 26, 2018 1:38 am, edited 2 times in total.

Top
 Profile  
Reply with quote  
 Post subject: set script to launch at startup
PostPosted: Sun Sep 24, 2017 8:24 pm 

Country: United States
I have not had luck with this:
crontab -e
@reboot nohup /boot/camera.sh &

I instead have to do this:
sudo nano /etc/rc.local

before exit 0
add
nohup /boot/camera.sh &

add "sleep 30" or some other number within the camera.sh.
You want to have a login screen so you can kill the script really quick after boot up in case you need to tweak something as there will be no way to exit the camera.sh script otherwise.

_________________
The impossible takes a while longer and goes over budget too...


Top
 Profile  
Reply with quote  
 Post subject: Re: Network troubleshooting
PostPosted: Fri Sep 29, 2017 12:30 am 

Country: United States
OK first for wireless connections, IWLIST and IWCONFIG are your friends. Second the network setup with jessie and raspbian is a little iffy for the pi zero ws. I have tried to include sufficient information to cover getting it working from the command line.

You can manually set parameters with IWCONFIG that you can later save to /etc/network/interfaces.

for example:

sudo iwconfig wlan0 essid test mode ad-hoc channel 6

sets your interface wlan0 with an said of test in ad-hoc mode on channel 6 (default is channel 1 which tends to be congested.)

sudo ifconfig wlan0 down
sudo ifconfig wlan0 up

shuts down and starts back up interface wlan0.

ifconfig lists all active interfaces. If you do not see wlan0 or eth0 the interface is not online or up.

TO setup ad-hoc mode:

sudo iwconfig wlan0 mode ad-hoc
sudo iwconfig wlan0 esset yourssid

then run
iwconfig wlan0
if it says no cell associated then check your settings on both computers

If using ad-hoc networks, add this to /etc/rc.local
before the start scripts:

ifconfig wlan0 up
iwconfig wlan0 essid test

_________________
The impossible takes a while longer and goes over budget too...


Top
 Profile  
Reply with quote  
 Post subject: Not all distress are the same
PostPosted: Mon Oct 02, 2017 11:38 am 

Country: United States
Apparently only NOOBS works OK with the pi zero w.

Jessie Stretch that I spent the past week on will not work properly with the motion tracker setup.

_________________
The impossible takes a while longer and goes over budget too...


Top
 Profile  
Reply with quote  
 Post subject: Re: Linux SDcard setup for Raspberry pi
PostPosted: Mon Sep 24, 2018 4:01 pm 

Country: United States
OK they came out with an updated version earlier this year in June.

On the newer version they changed the folder structures. It does not appear that they have fixed some of the pi zero w issues.

add this to /etc/network/interfaces by invoking this command
sudo nano /etc/network/interfaces

Below the last line add:

iface lo inet loopback
auto wlan0
allow-hotplug wlan0
iface wlan0 inet static
address x.x.x.x
netmask 255.255.255.0
gateway x.x.x.x
wireless-mode ad-hoc (default is infrastructure)
wireless-essid your-ssid-here
wireless-key your-key-here
wireless-channel 6 (or your set channel if not using FHSS in which case do not add this line)
iface default inet dhcp

For some reason dhcp was being very fussy and after building it this way I had internet connectivity. As I was using WEP for some other technical reasons and I live in the country physical hacking of the network is not a concern as I am so remote. If you are using WPA it might work out of the box without issues.

You will need to not use ad-hoc until you do all OS updates and install vlc player.

_________________
The impossible takes a while longer and goes over budget too...


Top
 Profile  
Reply with quote  
 Post subject: Re: Linux SDcard setup for Raspberry pi
PostPosted: Wed Sep 26, 2018 1:44 am 

Country: United States
Mod's Once, I get the smart gun and helmet camera working on this, this will be worth archiving, but will need to be periodically updated.

Linux keeps changing.

_________________
The impossible takes a while longer and goes over budget too...


Top
 Profile  
Reply with quote  
 Post subject: Re: Linux SDcard setup for Raspberry pi
PostPosted: Sat Oct 06, 2018 2:59 am 

Country: United States
OK after much trial and error I found that these settings had to be set.

on the client device displaying the streamed footage add the following to:
/etc/rc.local
ifconfig wlan0 up
iwconfig wlan0 essid test
(these force a driver communication and engage/activate the ad-hoc network setup. You will get no ad-hoc association until you run these commands, took me a week or two to hash that out)

I found that I had to set power settings by doing the following changes
in: /etc/lightdm/lightdm.conf
add: [SeatDefaults]
xserver-command=X -s 0 -dpms
in: ~/.config/lxsession/LXDE-pi/autostart
add:
@xset s 0 0
@xset s nonblank
@xset s no expose
@xset dams 0 0 0
(this is some more power settings)

On the device with the camera invoke the script this way:
in /etc/rc.local
add:
su pi -c 'nohup /boot/player.sh &'
(su pi -c must be used as vlc and cvlc can not be run as root and you will get access errors if you do not invoke the command this way. It took me almost a week to hash that out)

on both (make sure address is different on both but on same network)
in /etc/network/interfaces
add if not there:
auto wlan 0
iface wlan0 net static
address x.x.x.x
network x.x.x.0
netmask 255.255.255.0
gateway x.x.x.x
wireless-mode ad-hoc
wireless-ssid your-ssid
wireless-key your-key
wireless-channel # (1-11 (12 or 13 depending on your country)
iface default inet dhcp
iface lo net loopback
(this manually builds the interface and breaks dhcp incidentally)

in /boot/config.txt
add:
hdmi_blanking=1
(this is a power setting to keep the screen on)

_________________
The impossible takes a while longer and goes over budget too...


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron