piBeacon: 2- creating the SSD and configuring the rPi

Posted on
Sun Jan 17, 2016 11:41 pm
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

piBeacon: 2- creating the SSD and configuring the rPi

Create and install a (new) SD into the RPi and set it up with pibeacon:

you need plugin v >= 2022.174.89 for this to work

A) once for all SD
https://www.raspberrypi.com/software/operating-systems/
- download Raspberry Pi Imager App
- download "Raspberry Pi OS with desktop 32 bit image”, - currently bullseye or bookworm
but not "with recommended software..” that doubles the disk space and is not needed
and also not lite version, it is too lite, too many things missing
click "All download options" , pick from at All Rasperry Pi models”


on MAC:
- Install Raspberry Pi Imager

B) Start Raspberry Pi Imager

1. RPI device >> IT MATTERS WHICH RPI YOU SELECT<< not all OS run on all RPI, older RPi do not run on OS 12, bookworm does not run on rpi0w first version, RPI1, and RPI2

2.Operating System: select "use custom image" and select the OS image you just downloaded

3. Storage: slide the SD card into your mac; select your "sd media” ;

4. NEXT

5. Edit settings
in “General" set
user id = pi; password anything you like, but you must remember
set hostname eg rpi-kitchen, it is just a name
set locale (timezones etc) ;
if you want to use wifi set the proper parts (sid, uid, pwd)
in “Services" check >>>>> this is important, if not enabled, nothing will work <<<<<
-- Enable SSH, use password
— SAVE
YES
— answer Wifi question.
— All existing … erase: YES
— you will need to enter your mac password to execute
it will take some minutes to write and verify

6. Exit Raspberry Pi Imager when finished


C) Remove SD, slide SD into rpi, power up rpi, find its IP number


D) After rpi has started (first rpi start can take 5 minutes. It starts the graphical interface)
you can check if you can continue with (E): ping the RPI in a terminal , when it answers you can continue with (E)


E) In indigo :

1. if you create an SD for a new Pi: ( this is not needed if you replace an SD and the password is the same.)
menu / “Initial BASIC setup …":
— select rPi,
— CONFIRM
— On (don’t forget)
— set ip, userid, password
— CONFIRM
— CLOSE

2. menu / “Send/get Config…"
— select rpi,
— send "init + pgms + config + fonts etc (do only once after rpi install)"
it will set console auto login, setup all directories, copy files from the plugin directory to the rpi, download all libs for sensors and output devs and will reboot after < 320 secs.
It will reboot earlier if all is installed eg RPI-4 vs RPI-0
After the reboot the RPI should be up and running and finished


F) on RPI: if you want to check the progress of (E)

open terminal
ssh pi@ipnumber of rpi
enter password set in (B.5)

ps -ef | grep python | grep -v grep
if there are only programs like
master.py ... beaconloop.py …
no no adafruit or setStartupParams etc —> it is done


G) Finish setup of RPI, recommended

with "sudo raspi-config”
you can change things manually, like location, timezone etc.


!!!! To keep your rpi updated do this every 3 months and at new install !!!
sudo apt-get --yes -- assume-yes update

sudo apt-get —yes --assume-yes upgrade

sudo apt-get —yes --assume-yes auto remove

Or you can use indigo plugin menu / “Send/get Config…—> : “Upgrade opuses on rpi” that does the same

These steps might take 5 minutes … 1 hour


A reboot should be beneficial after everything is done
If the graphic interface is running (it should not) a simple "sudo reboot now" might not actually stop the rpi
you then need to do
sudo reboot -f
That is a HARD stop with restart, similar to a power cycle, just pending writes are finished before restart

That should be it.

The whole process takes < 15 minutes, mostly waiting for sd creation, initial boot of rpi, and wait at the end before final reboot

Posted on
Sat Feb 06, 2016 11:14 pm
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Re: piBeacon: creating the SSD and configuring the rPi

other utilities you could install on your SSD

VNC server
for convenience install vnc server to enable vnc sessions from mac on raspberry (graphic interface)
Code: Select all
sudo apt-get install tightvncserver

AVAHI apple fileshare utility
install AFP server to enable MAC to browse files
Code: Select all
sudo apt-get install avahi-daemon

Next, make sure it runs at startup, enter
Code: Select all
sudo update-rc.d avahi-daemon defaults

Create a configuration file containing information about the server. Run:
Code: Select all
sudo nano /etc/avahi/services/afpd.service

Enter (or copy/paste) the following:
Code: Select all
<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
   <name replace-wildcards="yes">%h</name>
   <service>
      <type>_afpovertcp._tcp</type>
      <port>548</port>
   </service>
</service-group>

Press CTRL and x to exit, then press y to to save changes and return after confirming the location.

Restart Avahi:
Code: Select all
sudo /etc/init.d/avahi-daemon restart

if you want to use the VNC/graphics: start the following manually - it is not in autostart (not part of this package). Check the raspberry docs on the internet how to do it at boot time
Code: Select all
tightvncserver
startx

how to COPY an SSD

open terminal:
put ssd card into reader connected to your MAC
Code: Select all
 diskutil list

to find you ssd card (~ 8/16/GB total) ==> xx

copy image to desktop xx = your disk number
Code: Select all
sudo dd if=/dev/diskxx of=~/Desktop/raspberrypi.dmg

Code: Select all
diskutil unmountDisk /dev/diskxx

take old out and follow above steps to create a new SSD

Posted on
Thu Feb 11, 2016 5:25 pm
jblackburn offline
Posts: 77
Joined: Dec 11, 2013
Location: Quebec, Canada

Re: piBeacon: creating the SSD and configuring the rPi

Karl,

For VNC, I suggest you an alternative "x11vnc":

https://en.wikipedia.org/wiki/X11vnc

The only reason is "x11" will open the current sessions and not a "virtual'" one. If you have a RPi connected to a monitor, you want to access the current session..

NOTE: Good works!

Thanks!

Joel

Posted on
Thu Feb 11, 2016 9:36 pm
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Re: piBeacon: creating the SSD and configuring the rPi

Joel
Thanks for the link. Will definitely try it.

I am actually not using the graphical interface to the pi any more. All dev is done on the mac then I push it with ftp or mac file share to the pi's

The graphic interface uses quite a bit of cpu.
You might want to use it for the initial setup though

Also I will be posting a 4 gbytes ssd
Which you then need to expand with raspi-config. The 8 gbyte ssd works if you have a good ssd to put on. When there is anything bad on the ssd the copy does not work.
Karl


Sent from my iPhone using Tapatalk

Posted on
Thu Feb 11, 2016 11:07 pm
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Re: piBeacon: creating the SSD and configuring the rPi

actually I would be interested in a way to access the CONSOLE remotely. Not through SSH. SSH opens another terminal, but some of the messages go to the console and you can see them on your ssh session. Has anyone a link?

Karl

Posted on
Sun Feb 14, 2016 12:37 pm
dnomode offline
Posts: 366
Joined: Apr 12, 2008
Location: North Georgia

Re: piBeacon: creating the SSD and configuring the rPi

1- create SSD:
download SSD image either raspbian or the one posted in the iBeacon Download thread
unzip. That will create the RASPBERRY.DMG file or v2-rPi.img
https://www.raspberrypi.org/documentati ... ges/mac.md
###open terminal
Code: Select all
diskutil list

###put new SSD into reader connected to your MAC
Code: Select all
diskutil list

### find disky y=the disk that was just added between the two "diskutil list" calls it is likely 3 4 .. 10 depending on the number of disks you already have on your MAC
## i.e. . replace disky with disk6 or disk 9 etc. in the following:

###do an unmount to be able to format
Code: Select all
diskutil unmountDisk /dev/disky

###format:
Code: Select all
sudo newfs_msdos -F 16 /dev/disky


###copy to new ssd, use path to where ever you stored itThis might take 1+ hours!! (use rdisky not disky it is 4 times slower)
Code: Select all
sudo dd bs=1m if=pathtoYourSSDImage of=/dev/rdisky

###“eject"
Code: Select all
diskutil unmountDisk /dev/disky

take ssd out and insert into raspberryPi
new ssd should be ready to use



I'm getting the following error:
Code: Select all
 3.207759] ---[ end Kernel panic - not syncing: VFS: unable to mount root fs on unknown-block(179,2)


I used the rPi-v2.img to create the ssd and I've tried remaking the ssd 4 times. I alway get the same error.

Thanks for your help?
Edmond

Posted on
Sun Feb 14, 2016 2:19 pm
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Re: piBeacon: creating the SSD and configuring the rPi

Check out the ssd thread too.
You might have a bad ssd. As the image is exactly 8 gb if your ssd has some bad sectors the image does not fit on the new ssd. I will upload a 4 gb version. That should not have that problem. But you then need to expand it. It barely fits on 4 gb.
You could try a 16 gb that should work

Or you follow the manual download and install steps.


Sent from my iPhone using Tapatalk

Posted on
Sun Feb 14, 2016 9:49 pm
dnomode offline
Posts: 366
Joined: Apr 12, 2008
Location: North Georgia

Re: piBeacon: creating the SSD and configuring the rPi

You are correct. I used a 16 gb and it works great.

Thanks for your help.
Edmond


Sent from my iPhone using Tapatalk

Posted on
Sun Feb 14, 2016 10:44 pm
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Re: piBeacon: creating the SSD and configuring the rPi

you can also check out the 4GB now, its posted at http://forums.indigodomo.com/viewtopic.php?f=187&t=15152

Karl

Posted on
Sun Feb 14, 2016 11:05 pm
dnomode offline
Posts: 366
Joined: Apr 12, 2008
Location: North Georgia

Re: piBeacon: creating the SSD and configuring the rPi

Right on. Thanks Karl.

Edmond


Sent from my iPhone using Tapatalk

Posted on
Wed Mar 09, 2016 1:12 pm
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Re: piBeacon: creating the SSD and configuring the rPi

updated the SSD images http://forums.indigodomo.com/viewtopic.php?f=187&t=15152 with new op-sys from feb 26 2016. This works on all rPis: 0,1,2,3

1. 8 GByte will ALL libraries preinstalled,
2. 4 Gbyte with no libraries installed, but with bluetooth support , will take ~ 5 minutes to download all libraries after start

I suggest not to use the old images for new installs.
The radius version has some other configs on there that are not needed and might create some performance issues.


Karl

see discussion on first post on the pros and cons for 4/8 Gbyte

Posted on
Fri Mar 18, 2016 8:02 pm
CraftGeek offline
User avatar
Posts: 107
Joined: May 13, 2015

Re: piBeacon: creating the SSD and configuring the rPi

I have the latest allrpi image and on first boot of a new rPi3. It looks like it gets all the way through until it says "pi@raspberry:~ $ installLibs starting" with the curser under the "pi@" at the beginning of the line.
It has been there for an hour now. How long should this step take?

Sean

Posted on
Fri Mar 18, 2016 10:18 pm
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

piBeacon: creating the SSD and configuring the rPi

It should take ~5 minutes
Try
ps - ef | grep python
If anything is running
Might not if you have not configured the plugin

In the plugin do
Menu/config - enter indigo password ipnumber etc
Menu/setup rpi - enter ip number ... of your rpi
Then
Menu/send... Send config & reboot to rpi
That should do it

Initially the rpi will download all libraries will check Python version etc- that takes up to 5 minutes

But the rpi can not know YOUR ip numbers and passwords. The plugin will send everything (indigo ip userid password) to the rpi after you tell it which ip number... the rpi has




Sent from my iPhone using Tapatalk

Posted on
Fri Mar 18, 2016 10:30 pm
CraftGeek offline
User avatar
Posts: 107
Joined: May 13, 2015

Re: piBeacon: creating the SSD and configuring the rPi

I'll try that.

I think it is OK. I was expecting a few characters to the left of the cursor in the CLI command line. Typing commands (like startx) works fine. Also, the image loaded on another SD card booted in another rPi3 behaves exactly the same.

Thanks again.

Sean

Posted on
Sat Mar 19, 2016 6:00 am
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Re: piBeacon: creating the SSD and configuring the rPi

CraftGeek wrote:
"pi@raspberry:~ $ installLibs starting" with the curser under the "pi@" at the beginning of the ....

That is a print statement in the program and a standard UNIX reaction

You can see what's going on in the logfile ; do
tail /var/log/pibeacon
Karl



Sent from my iPhone using Tapatalk

Who is online

Users browsing this forum: No registered users and 2 guests