This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// To compile this program, you need to install: | |
// sudo apt-get install libbluetooth-dev | |
// Then you can compile it with: | |
// cc scanner.c -lbluetooth -o scanner | |
// You can then run it with: | |
// ./scanner | |
// Copyright (c) 2021 David G. Young | |
// Copyright (c) 2015 Damian Kołakowski. All rights reserved. | |
// License: BSD 3. See: https://github.com/davidgyoung/ble-scanner |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.davidgyoungtech.instantapptransmitter.feature; | |
import android.bluetooth.le.AdvertiseCallback; | |
import android.bluetooth.le.AdvertiseSettings; | |
import android.support.v7.app.AppCompatActivity; | |
import android.os.Bundle; | |
import android.widget.TextView; | |
import org.altbeacon.beacon.Beacon; | |
import org.altbeacon.beacon.BeaconParser; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
MY_AAR_NAME="my-library" # Set this to whatever your aar looks like, e.g. my-library.aar | |
rm -rf build/outputs/aar/$MY_AAR_NAME | |
AAR_FILE=`ls build/outputs/aar/$MY_AAR_NAME*.aar | grep -v debug | head -1` | |
OS_AAR_FILE=`ls ./android-beacon-library/build/outputs/aar/*.aar | grep -v debug | head -1` | |
OS_AAR_TAR_GZ_FILE=`ls ./android-beacon-library/build/outputs/aar/*.gz | grep -v debug | head -1` | |
cp $OS_AAR_TAR_GZ_FILE build/outputs/aar/ | |
cp $OS_AAR_FILE build/outputs/aar/ | |
TARGZ_FILE=`echo "$AAR_FILE" | sed -e 's/aar/tar.gz/g'` | |
mkdir build/outputs/aar/$MY_AAR_NAME |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Davids-MacBook-Pro:android-beacon-library dyoung$ git status | |
On branch gelldur-master | |
nothing to commit, working directory clean | |
Davids-MacBook-Pro:android-beacon-library dyoung$ ./gradlew test | |
[buildinfo] Properties file path was not found! (Relevant only for builds running on a CI Server) | |
:preCompileDebugUnitTestJava | |
:compileDebugUnitTestJava | |
/Users/dyoung/workspace/android-beacon-library/src/test/java/org/altbeacon/beacon/AltBeaconParserTest.java:3: error: package org.junit does not exist | |
import static org.junit.Assert.assertEquals; | |
^ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Two classes: | |
// IBeaconSimulator | |
// SimulatedBeacon | |
IBeaconSimulator *CLBeaconSimulator [[IBeaconSimulator alloc] initWithLocationManger: locationManager]; | |
[iBeaconSimulator addVisibleIBeacon: [[SimulatedBeacon] alloc] initWithUUID: @"2F234454-CF6D-4A0F-ADF2-F4911BA9FFA6" major: 1 minor: 1 accuracy: 2.0]]; | |
// an alternative to the above for more complex testing. This could alternatively set a delegate method | |
[iBeaconSimulator visibleIBeaconBlock: ^{ | |
NSMutableArray *visibleIBeacons = [[NSMutableArray alloc] init]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo 'running test script in /home/pi/test. may reboot' | wall | |
echo "starting run" >> /home/pi/test.log | |
for i in {1..10}; do | |
date >> /home/pi/test.log | |
/home/pi/usb_modeswitch_v_1_1_3 -I -W -D -s 20 -u -1 -v 12d1 -p 1446 -V 12d1 -P 1436 -c /home/pi/sakis3g-HEAD-4ee19e0/dependencies/usb-modeswitch-data/usb_modeswitch.d/12d1:1446 | |
ls /dev/ttyU* >> /home/pi/test.log | |
ls /dev/ttyU* && ( echo "worked" >> /home/pi/test.log; sync; reboot; exit ) | |
done | |
echo "failed" >> /home/pi/test.log | |
sync |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pi@fpi-115 ~ $ sudo /basilisk/current/script/startup | |
Startup of beacon | |
Beacon software startup 172 seconds after boot | |
Server sync complete | |
/basilisk/current/lib/script_helper.rb:172:in `>': comparison of Time with nil failed (ArgumentError) | |
from /basilisk/current/lib/script_helper.rb:172:in `get_last_basilisk_run_time' | |
from /basilisk/current/lib/script_helper.rb:158:in `correct_time_from_logs' | |
from /basilisk/current/script/startup:25:in `<main>' |