the-lightning-land / sweetd Goto Github PK
View Code? Open in Web Editor NEW๐ Sweet daemon for pairing and control of the Bitcoin-enabled candy dispenser
Home Page: https://the.lightning.land/candy
License: MIT License
๐ Sweet daemon for pairing and control of the Bitcoin-enabled candy dispenser
Home Page: https://the.lightning.land/candy
License: MIT License
Every time a connection is made to a new wifi network, it is appended to the wpa_supplicant.conf
file. All previous connections persist and keep a higher priority.
We should always remove all previous connections when a new one is made.
It looks like we'll have to call wpa_cli list_networks
to get all networks and then execute wpa_cli remove_network 0
for every entry, right before adding and saving a new network.
The system startup time got very slow. It's almost 4 minutes until the network seems to be ready and sweetd
can be started. Can it be that the network services only start with the first attempt to connect to an ssid?
Jan 17 15:44:59 raspberrypi sshd[393]: Server listening on 0.0.0.0 port 22.
Jan 17 15:44:59 raspberrypi sshd[393]: Server listening on :: port 22.
Jan 17 15:44:59 raspberrypi systemd[1]: Started OpenBSD Secure Shell server.
Jan 17 15:44:59 raspberrypi systemd[1]: Reached target Multi-User System.
Jan 17 15:44:59 raspberrypi systemd[1]: Reached target Graphical Interface.
Jan 17 15:44:59 raspberrypi systemd[1]: Starting Update UTMP about System Runlevel Changes...
Jan 17 15:44:59 raspberrypi systemd[1]: Started Update UTMP about System Runlevel Changes.
Jan 17 15:44:59 raspberrypi systemd[1]: Startup finished in 1.845s (kernel) + 43.323s (userspace) = 45.169s.
Jan 17 15:48:51 raspberrypi kernel: IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
Jan 17 15:48:51 raspberrypi dhcpcd[378]: wlan0: carrier acquired
Jan 17 15:48:51 raspberrypi dhcpcd[378]: wlan0: IAID eb:7e:5d:5f
Jan 17 15:48:51 raspberrypi dhcpcd[378]: wlan0: adding address fe80::e50e:416b:34a5:7ad4
Jan 17 15:48:51 raspberrypi dhcpcd[378]: wlan0: soliciting an IPv6 router
Jan 17 15:48:52 raspberrypi dhcpcd[378]: wlan0: rebinding lease of 172.20.10.3
Jan 17 15:48:53 raspberrypi avahi-daemon[267]: Joining mDNS multicast group on interface wlan0.IPv6 with address fe80::e50e:416b:34a5:7ad4.
Jan 17 15:48:53 raspberrypi avahi-daemon[267]: New relevant interface wlan0.IPv6 for mDNS.
Jan 17 15:48:53 raspberrypi avahi-daemon[267]: Registering new address record for fe80::e50e:416b:34a5:7ad4 on wlan0.*.
Jan 17 15:48:57 raspberrypi dhcpcd[378]: wlan0: probing for an IPv4LL address
Jan 17 15:48:57 raspberrypi dhcpcd[378]: wlan0: DHCP lease expired
Jan 17 15:48:57 raspberrypi dhcpcd[378]: wlan0: soliciting a DHCP leas
During pairing, when trying to connect to the wifi of the dispenser, I often get this error:
Jan 17 09:16:11 raspberrypi hostapd[602]: uap0: STA 00:b3:62:25:4e:a4 IEEE 802.11: associated
Jan 17 09:16:11 raspberrypi hostapd[602]: uap0: STA 00:b3:62:25:4e:a4 RADIUS: starting accounting session 5C404630-0000000B
Jan 17 09:16:11 raspberrypi hostapd[602]: uap0: STA 00:b3:62:25:4e:a4 WPA: pairwise key handshake completed (RSN)
Jan 17 09:16:11 raspberrypi hostapd[602]: uap0: STA 00:b3:62:25:4e:a4 IEEE 802.11: disassociated
In order to prepare the device for easier access to the payment interface, show the hostname in the app and allow the user to change it.
It can happen that during pairing the connection to the dispenser's wifi is lost.
This needs to be prevented in order to provide a good experience.
Why? It allows for a better pairing experience when the phone doesn't have to connect to a wifi without internet connection. Discovery is much more seamless and it would even be possible to pair a specific device when multiple of them are powered on (no conflicting wifi hotspots).
How? The dispenser should act as a peripherial and announce a service that...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.