piBeacon: 2- creating the SSD and configuring the rPi

Posted on
Fri Mar 25, 2016 3:45 pm
Swancoat offline
Posts: 477
Joined: Nov 20, 2009
Location: Houston

Re: piBeacon: creating the SSD and configuring the rPi

when i try to format the sd card it returns:
Code: Select all
newfs_msdos: /dev/disk5: bad FAT type


any idea what's going on here? bad SD card?

http://nerdhome.jimdo.com

Posted on
Fri Mar 25, 2016 4:49 pm
kw123 offline
User avatar
Posts: 5531
Joined: May 12, 2013
Location: Dallas, TX

Re: piBeacon: creating the SSD and configuring the rPi

are you sure that it is disk5?
do the diskutil list commands before and after you put in the ssd

that normally does not fail even with bad ssd sectors


and then:
only the copy command could fail if some sectors are bad--- use the 4G version that should be fault tolerant to bad sectors.

Karl

Posted on
Fri Mar 25, 2016 5:07 pm
kw123 offline
User avatar
Posts: 5531
Joined: May 12, 2013
Location: Dallas, TX

Re: piBeacon: creating the SSD and configuring the rPi

or the write protect switch on the SSD could be on

Posted on
Fri Mar 25, 2016 8:37 pm
Swancoat offline
Posts: 477
Joined: Nov 20, 2009
Location: Houston

Re: piBeacon: creating the SSD and configuring the rPi

I'm pretty certain I was using the correct disk, per the disk util command before and after. Plus, the size was stated to be 7.7 GB, which was pretty much 8 - not sure how they count it up on these things.

I tried to copy the disk image anyway... This is what happened. I have no idea if this is correct or not.
Code: Select all
Tivoli-Office:~ jswancoat$ newfs_msdos -F /dev/disk5
newfs_msdos: /dev/disk5: bad FAT type
Tivoli-Office:~ jswancoat$ sudo dd bs=1m if=/Users/jswancoat/Downloads/2016-02-26-raspbian-jessie-allrpi.img of=/dev/disk5
Password:
dd: /dev/disk5: end of device
7387+0 records in
7386+1 records out
7744786432 bytes transferred in 9365.287528 secs (826967 bytes/sec)

http://nerdhome.jimdo.com

Posted on
Fri Mar 25, 2016 9:34 pm
kw123 offline
User avatar
Posts: 5531
Joined: May 12, 2013
Location: Dallas, TX

piBeacon: creating the SSD and configuring the rPi

Looks ok

The difference 8/4 gbyte is:
8 gb has all sectors used
4 gb has 4 gb used and 4 gb empty

Please do not forget to

Set date time
Expand hArd disk

In sudo raspi-config

Sent from my iPhone using Tapatalk

Posted on
Tue Aug 09, 2016 4:56 am
andarv offline
Posts: 121
Joined: Jun 28, 2015
Location: Stockholm, Sweden

Re: piBeacon: 2- creating the SSD and configuring the rPi

Downloaded and installed the SSD img posted on rPi 3. But for some reason it didn't find any WiFi interface. Is that because it's a light install and depended on ethernet ?
Installed full Jessie from may instead and it now works.
But then I have to push the files from plugin to rPi, not really sure what that means?

Posted on
Tue Aug 09, 2016 11:54 am
kw123 offline
User avatar
Posts: 5531
Joined: May 12, 2013
Location: Dallas, TX

Re: piBeacon: 2- creating the SSD and configuring the rPi

If you do a blank install you need to follow the steps in install ssd
If you install the preconfigured
You need to configure wifi in the x terminal.


Sent from my iPhone using Tapatalk


[EDIT]
somehow the rpi needs to know the wifi ssd and passphrase.
you can either do it through a terminal session (with terminal commands) or through the graphical interface: connect keyboard, mouse and terminal to the rpi and then use mouse to setup wifi - top right of screen.

When you use a "blank" new SSD with the latest op-sys you must all the steps described in the first post of this thread. Then define the Wifi setup, THEN "push" the latest py programs to the rpi with the plugin:
define the rpi IP number, password, userid,.. in setup rpi; then send ... to rpi

Karl

Posted on
Tue Aug 09, 2016 3:29 pm
andarv offline
Posts: 121
Joined: Jun 28, 2015
Location: Stockholm, Sweden

Re: piBeacon: 2- creating the SSD and configuring the rPi

Tanx for the clarifications, didn't realize all the push options in the plugin. Hopefully it will all work tomorrow when I try with the beacons.
My neighbors cut my fiber when digging so everything is really cumbersome with only a Hotspot on cellphone.
Didn't notice the time difference between Mac and rPi at first.

Posted on
Tue Aug 09, 2016 3:36 pm
kw123 offline
User avatar
Posts: 5531
Joined: May 12, 2013
Location: Dallas, TX

Re: piBeacon: 2- creating the SSD and configuring the rPi

the trick (nice feature) is that the plugin does all the work ONCE there a connection to the rpi.
no need to do anything anymore on the rpi, updates, configs etc all done by the plugin.

Posted on
Tue Aug 09, 2016 3:49 pm
andarv offline
Posts: 121
Joined: Jun 28, 2015
Location: Stockholm, Sweden

Re: piBeacon: 2- creating the SSD and configuring the rPi

Maybe I'm missing something, but for me step 2 in this description, setup of WiFi wasn't possible?
At least not in X, it only said that there where no interface. Tried in cli as well but couldn't confirm that the configuration worked.

Right now it's a clean Jessie install with the config from the plugin.

Posted on
Wed Aug 10, 2016 10:04 am
kw123 offline
User avatar
Posts: 5531
Joined: May 12, 2013
Location: Dallas, TX

Re: piBeacon: 2- creating the SSD and configuring the rPi

the key is :
f you use a plain raspberry jessie image you must do:
1.add the start beacon python programs to the boot file:
sudo nano /etc/rc.local
add line
Code: Select all
(sleep 10; python /home/pi/callbeacon.py &)
before exit 0

2.. expand hard disk and set timezone, change password like above with sudo rasps-config ( the (temp... ) sensors will need some more libraries)

Karl

Posted on
Wed Aug 10, 2016 10:12 am
kw123 offline
User avatar
Posts: 5531
Joined: May 12, 2013
Location: Dallas, TX

Re: piBeacon: 2- creating the SSD and configuring the rPi

to get wifi working you could edit the file
interfaces.x (likely 0)
Code: Select all
auto lo
iface lo inet loopback
auto eth0
allow-hotplug eth0
iface eth0 inet dhcp

allow-hotplug wlan0
auto wlan0
iface wlan0 inet static
   address 192.168.1.20  <== change this
   netmask 255.255.255.0   <== may be this
   gateway 192.168.1.1  <== may be this
   wpa-ssid xxx <== change this
   wpa-passphrase  xxx. <== change this
   dns-nameservers 8.8.8.8   8.8.8.4
#iface default inet dhcp

change the ip numbers ssid, passphrase etc

then run
sudo python interface.py
that will move the file in place (its a simple copy command)
then reboot and your wifi should be working

Karl

Posted on
Wed Aug 10, 2016 12:13 pm
andarv offline
Posts: 121
Joined: Jun 28, 2015
Location: Stockholm, Sweden

Re: piBeacon: 2- creating the SSD and configuring the rPi

This is what I do on your img file (this last time)
1. ssh to rPi - raspi-config change timezone to Stockholm and expand. Reboot
After that the rPi doesn't respond to ssh,this has happened last 3-4 installs. Previously a have also edited wpa_supplicant with same result?

Now I'll try on a fresh Jessie again. In the plugin, what option shall I use to push all necessary files for piBeacon?

Posted on
Wed Aug 10, 2016 4:36 pm
andarv offline
Posts: 121
Joined: Jun 28, 2015
Location: Stockholm, Sweden

Re: piBeacon: 2- creating the SSD and configuring the rPi

It's all working now, thanks for the answers.

Not really sure what made this last install work. Running your SSD install and edited interface.0 as you described above, this was the only part that the plugin wasn't able to configure.

Posted on
Sat Nov 26, 2016 5:10 pm
andarv offline
Posts: 121
Joined: Jun 28, 2015
Location: Stockholm, Sweden

Re: piBeacon: 2- creating the SSD and configuring the rPi

Hi Karl,

Have one rPi up and running since august and it's really reliable, I had some difficulties setting it up

Now It's time to expand with a few more rPi with a few sensors. But it seems i stumble into some problems with these aswell.

SSD img from 2016-11-22
Install works great, I'm connecting wifi, setting timezone, expand an PW (also wifi region, but not much more)

Then into the plugin and trying to setup pi servers with IP. ( I know I skip one step in your guide, connecting with ethernet but since wifi works??)
Code: Select all
23:53:14             -pi=         1
23:53:14             -valuesDict= UiValuesDict : (dict)
     MSG : Pi server configuration set (string)
     beaconOrSensor : iBeacon rPi (string)
     confirmPiServer :  (string)
     confirmPiServerConfig :  (string)
     enablePiEntries : false (bool)
     enableRebootCheck : restartLoop,- (string)
     infoLabel11 :  (string)
     ipNumberPi : 192.168.1.21 (string)
     passwordPi : uioasx123 (string)
     piOnOff : 1 (string)
     piServerNumber : 1 (string)
     rPiVersion : 0 (string)
     userIdPi : pi (string)
23:53:14             -RPI=        {u'ipNumberPiSendTo': u'192.168.1.21', u'sensorRefreshSecs': u'90.0', u'enableSPIpinsAsGpio': u'0', u'sensorList': '', u'ipNumberPi': u'192.168.1.21', u'piUpToDate': 0, u'piDevId': 0, u'piNumberReceived': u'', u'enableTXpinsAsGpio': u'0', u'output': {}, u'rPiVersion': 0, u'piOnOff': u'1', u'enableRebootCheck': u'restartLoop,-', u'passwordPi': u'uioasx123', u'input': {}, u'enableiBeacons': u'1', u'userIdPi': u'pi', u'piMAC': u''}

the trying to send config to rPi server
Code: Select all
00:05:10             -updating pi server config for # 1
00:05:10             - ping return-code: 0
00:05:10             -updating pi server config for # 1  executing
/usr/bin/expect '/Library/Application Support/Perceptive Automation/Indigo 7/Plugins/piBeacon.indigoPlugin/Contents/Server Plugin/update.exp' pi uioasx123 192.168.1.21 1 /Users/Anders/documents/piBeacon/ '/Library/Application Support/Perceptive Automation/Indigo 7/Plugins/piBeacon.indigoPlugin/Contents/Server Plugin/pi' 15
00:05:16             -setup Pi ok:
spawn sftp -o ConnectTimeout=15 pi@192.168.1.21
pi@192.168.1.21's password:
Connected to 192.168.1.21.
sftp> mkdir /home/pi/pibeacon
Couldn't create directory: Failure

sftp> mkdir /home/pi/pibeacon/fonts
Couldn't create directory: Failure

sftp> mkdir /home/pi/pibeacon/displayfiles
Coul
....

sftp> sftp> lcd '/Users/Anders/documents/piBeacon//rejected'
get /home/pi/pibeacon/rejects 'rejects.1'
sftp> File "/home/pi/pibeacon/rejects" not found.

sftp> rm /home/pi/pibeacon/reject*
Removing /home/pi/pibeacon/reject*
Couldn't delete file: No such file or directory

sftp> quit


But there it stops, after waiting and restarting i still don't get any new rPi, what I'm missing?
it's trying to communicate
Code: Select all
   WebServer                       access denied "http://192.168.1.10:8176/variables/pi_IN_12" from karlwachs @ 192.168.1.21


Looking at the logs i found some other info
Code: Select all
00:05:04             -pi server # 1  ip# 192.168.1.21  has not send a message in the last 1480201504 seconds
00:05:08             -rPi sendConfig Files to pi 1
00:05:09             -updating pi server files
00:05:09             -in Line '6562' has error=''key not found in database''
00:05:09             -RPI:1 devid:address : B8:27:EB:8B:D5:61


The thing is that this touches another problem I have.
The device:address isn't correct - that's the same address the plugin have on rpi 0 which isn't correct either, that is (I think) eth mac on rpi0.
Code: Select all
23:43:03 pi configuration-Parameters for each rPi       
23:43:04 pi configuration-  # R# 0/1 IP#            Vers   beacon-MAC        indigoName            Pos X,Y,Z    indigoID UserID       Password            If-rPI-Hangs  SensorAttached
23:43:04 pi configuration-  0  0 1   192.168.1.20    2,3,0 B8:27:EB:8B:D5:61 Pi-0-Entry                   ,,   842603009 pi           uioasx123           restartLoop,-               
23:43:04 pi configuration-
23:43:04 pi configuration-EXPERT parameters for each PI:----------
23:43:04 pi configuration-delete History after xSecs   86400
23:43:04 pi configuration-MaxCall BLE bfsend           900
23:43:04 pi configuration-Max Parse Seconds            1.0
23:43:04 pi configuration-ask BLE for x Msgs           20
23:43:04 pi configuration-colct x secs bf snd          60
23:43:04 pi configuration-reboot pi after xSecs        9999999999999
23:43:04 pi configuration-port# on rPi 4 GPIO commands 9999
23:43:04 pi configuration-
23:43:04 pi configuration-#  defined beacons-------------
23:43:04 pi configuration-#  Beacon MAC        indigoName               Status             type    txMin ignore sigDlt b-lvl   LastUp[s] ExpTime updDelay   created
23:43:04 pi configuration-1  00:EA:23:41:A4:84 b-GreenXY                up                other      999      0    999   100         136      90        0 2016-08-10 22:10:36
23:43:04 pi configuration-2  00:EA:23:28:AC:A4 b-BlackXY                up                other      999      0    999   100         136      90        0 2016-08-10 22:10:36
23:43:04 pi configuration-1  B8:27:EB:8B:D5:61 Pi-0-Entry               up                  rPi      999      0    999   100         136      90      300 2016-08-10 22:10:36
23:43:04 pi configuration-1  00:EA:23:40:9D:74 b-WhiteXY                expired           other      999      0    999   100       43659      90        0 2016-08-10 22:10:36
23:43:04 pi configuration----------------------- Parameters END ----------------------
23:43:04             - path to plugin: /Library/Application Support/Perceptive Automation/Indigo 7/Plugins/piBeacon.indigoPlugin/Contents/Server Plugin/
23:43:04             -starting device:  b-BlackXY  130232609
23:43:04             -starting device:  b-GreenXY  1859901461
23:43:04             -starting device:  b-WhiteXY  241852119
23:43:04             -starting device:  Pi-0-Entry  842603009
23:43:04             -changed=true or force 00:EA:23:40:9D:74  expired
23:43:04             -changed=true or force 00:EA:23:41:A4:84  down
23:43:04             -changed=true or force B8:27:EB:8B:D5:61  down
23:43:04             -changed=true or force 00:EA:23:28:AC:A4  down
23:43:04             -updating pi server files
23:43:04             -in Line '6562' has error=''key not found in database''
23:43:04             -RPI:1 devid:address : B8:27:EB:8B:D5:61

Who is online

Users browsing this forum: No registered users and 1 guest