Laser Cutter fob fix 05-2017

== Problem ==

The laser cutter fob box broke in early May 2017.  Pete and I (Terry) looked at it and determined the box has two pieces of hardware.  The teensy appeared ok, but the TP-Link router that hosts the laserboss script was bricked.

== TP-Link attempted solution (failed) ==

We attempted to get everything restored onto a new TPlink router but weren’t successful.   The laserboss script required lua libraries that weren’t available in an openwrt package.  We couldn’t locate the custom-made openwrt image and I was unable to solve the dependencies.

== Raspberry Pi solution (worked) ==

I replaced the TP-link router with a Raspberry Pi v1, allowing us to use a more modern and robust operating system.  The laserboss lua script started and communicates with the Teensy over USB.  I was able to fob in.  Network connectivity is through ethernet.  No wifi adapter.

== Detailed build notes: ==

used 2017-04-10-raspbian-jessie-lite.img on an 8gb microsd card

#booted raspi with monitor and kbd
##ran raspi-config -> enabled ssh
##ip address is 192.168.162.140
##mac address is b8:27:eb:19:ce:45
#Logged in via ssh
#apt-get install git
#install API keys
##cat >/root/key.lua <<EOF; WP_KEY = “zzz”; LASER_KEY = “xxx”; EOF
#apt-get install lua-sql-sqlite3 luarocks
#luarocks install luars232
#luarocks install luasocket
#cd /root; git clone  [https://github.com/acemonstertoys/laser-rfid https://github.com/acemonstertoys/laser-rfid]
#cd laser-rfid/tplink
#lua laserboss.lua  (seems to work.  Able to retrieve the user list and authenticate fobs)
#cp laser-rfid/tplink/startlaser.sh /etc/init.d/startlaser.sh
#edit  /etc/rc.local to call startlaser.sh
#rebooted and was able to fob in

*”’Category:”'[[Category:Laser]] [[Category:Laser User Information‏‎s]]

Leave a Reply

Your email address will not be published. Required fields are marked *