For connecting multiple relays consider ULN2803A - it's an array of 8 transistors in a $1 chip.
Michal Rok
@Michal Rok
Best posts made by Michal Rok
Latest posts made by Michal Rok
-
RE: Advice for using generic 5V relays
-
RE: Omega2+ on mikrotik ... nothing works
My post at https://community.onion.io/topic/1149/omega2-fails-to-connect-to-wifi/66 describes a solution I verified multiple times on Omega2's out of the box. I did not have to adjust my Mikrotiks at all. Try it yourself.
Michal
-
RE: Omega2+ fails to connect to wifi
Finally got my Omega2 to reliably work with Mikrotik wifi in WPA2PSK-AES mode!
Here's the trick: as discovered earlier by @Scott-Horsley the option mode 'sta' allows connecting to AP, but does not allow any useful transmission. I found out that if you switch to mode '9' (original setting) following a successful connection in mode 'sta', without reboot, it will work!
Try this on a clean Omega:
- set your SSID, password and mode with the following commands:
uci set wireless.@wifi-iface[0].ApCliSsid='yourssid' uci set wireless.@wifi-iface[0].ApCliPassWord='yourpassword' uci set wireless.ra0.mode='sta' uci commit
- then edit /etc/rc.local to include: (before the "exit 0" line)
/sbin/uci set wireless.ra0.mode=9 /usr/bin/nr
Do not commit the mode=9, you need config file to remain set to mode='sta'. Reboot to try out.
Good luck!
ps. in an out-of-the-box Omega2, this will skip the installation wizard and you'll need to install the Console manually
-
RE: Omega2+ fails to connect to wifi
@Alex-Thow are you also experiencing an issue with firewall or do you have full connectivity?
-
RE: Omega2+ fails to connect to wifi
@Scott-Horsley can you please post results of /interface wireless export here? It will show just the non-default parameters and might make it easier to reproduce.
-
RE: Omega2+ fails to connect to wifi
@Scott-Horsley I was suspecting that some default firewall kicks in when Omega's software sees an open, unencrypted wifi network. But that assumes you're running an open network too, but I'm reading this wasn't the case.
I wasn't able to reproduce your observations regarding encryption - for me, Omega never connects to a WPA2PSK/AES network.
-
RE: Omega2+ fails to connect to wifi
@Scott-Horsley further observations:
- firewall is controlled by fw3 which in turn controls iptables
- flushing iptables (iptables -F) does not solve the problem
- a device connected to the Omega can connect to the Internet but DNS won't work (seems to be an issue with Omega's NAT config)
- if you instruct iptables to log outbound traffic (iptables -t filter -A OUTPUT -o apcli0 -j LOG), then dmesg actually shows those missing packets that don't arrive to the router
Seems like there is a second firewall layer after iptables are applied.
Michal
-
RE: Omega2+ fails to connect to wifi
@Scott-Horsley thanks! I wasn't able to reproduce your config - for me, the change from option mode '9' to 'sta' doesn't change a thing. I still get "wlan1: disconnected, unicast key exchange timeout" in router logs.
However, I made some observations that might help you move forward:
- with option mode 'sta' and security profile on Mikrotik set to default (open - no password), my Onion2 connects to wifi (!)
- I also observed only ICMP traffic passing through
- it seems to be a local firewall issue, as Mikrotik sniffing shows no outbound attempts
- you can disable Onion firewall by /etc/init.d/firewall stop, but it doesn't change a thing - the only traffic that the router receives is ICMP and ARP, but not TCP
Michal
-
RE: Power Consumption
Also very interested in this. My use case requires the device to wake up every 15 mins, collect data, upload and go to sleep again. All on budget and with space constraints.
M