Networking Archive

Forwarding multicast on Ubiquiti

Posted October 30, 2017 By Landis V

May be relevant to some things I’d like to try.

https://community.ubnt.com/t5/EdgeMAX/mDNS-bonjour-forwarding/td-p/414093

Be the first to comment

TP-Link HS-100/HS110 Wifi Smart Plug Stuff

Posted December 3, 2016 By Landis V
Be the first to comment

hostapd in a VM for device testing

Posted November 27, 2016 By Landis V

While working with my Chamberlain MyQ Garage Door Opener the other day, I ran into issues getting hostapd to work on Kali with the chap ass Netis WP2120 nano USB adapter I had (based on the RTL8192cu chipset/driver).  I need to clear off a few browser tabs and eventually see if I can get hostapd working with this adapter on a different box (VM) for testing.  A few of the links I worked with unsuccessfully, but provide some useful information.

 

More notes

Installed usbutils for lsusb
Installed hostapd
Installed iw
Installed lshw
Ran through steps at https://adamscheller.com/systems-administration/rtl8192cu-fix-wifi/, minor issue with “linux-headers-generic”, skipped it for now.

Did receive a modprobe error, “could not insert ‘8192cu’: Device or resource busy”. lsmod shows the old rtl8192cu drivers active. Did a reboot. Correct driver modules now listed, though no device listing in ‘iw list’. Does appear in ‘lshw -c network’, and appears as wlan0 in ‘ip link list’.

Started in with hostapd steps from http://sarumait.blogspot.com/2013/11/ubuntu-wireless-hotspot-using-edimax-ew.html and from my previous testing on the Chamberlain page.

Attempted to start hostapd service which seemed to work, but didn’t see my SSID. Ran it interactive debug and got an “invalid/unknown driver ‘8192cu'”.

Instructions at https://github.com/pritambaral/hostapd-rtl871xdrv
Git cloned the above repository and the w1.fi repository listed. Got hostapd to build after installing dependencies (below).

apt-get install apt-file libnl-3-dev libnl-genl-3-dev pkg-config libssl-dev
apt-file not needed, but handy for looking up files that resulted in failures during make.

Ran the patch process noted at https://github.com/pritambaral/hostapd-rtl871xdrv

Ended up having some success after doing a ‘make dkms’ in the rt8192cu directory cloned from https://github.com/dz0ny/rt8192cu and setting the driver in my hostapd.conf to the rtl871xdrv

Pages helpful in getting it to work

2 Comments so far. Join the Conversation

I hate it when I’m away from home and either the ISP or some of my equipment glitches, necessitating a reboot or two.  I have enough systems in place that I should be able to automate this process.  To do so, I need to get some remotely controllable equipment, create the state diagram (not good if I power cycle one of the network components required to reach the remote switch and it doesn’t come back up!), and write the scripts to run the logic.

I’d also like to have easily accessible power switches in my data closet so I can power cycle the devices without having to pull them down and unplug the power from the back of them.

Hardware components I’ve looked at

SainSmart 16 channel web relay – at Amazon.  This could work if installed between the transformer block and the switches.

Ethernet relay on eBay, claims to be AC250V @ 10A, though that would probably be pushing it.  Would have to look up the specs on the relays they used.  For the watt draw on the AC, depending upon the size, might be able to install it inside a large surge protector housing and wire the outlets through it.

Controllable Four Outlet Power Relay Module – at Adafruit.  Not network connected, and would require some other device to control it.  But most likely UL listed and designed to handle AC.

Ended up finding a Digital Loggers LPC-3 on eBay for $57 shipped that should do the job nicely.  Manual is here.

Be the first to comment

On Networks N150R Routers

Posted June 13, 2016 By Landis V

Picked up a couple of these from Newegg for free plus a couple of bucks shipping after rebate.  Figured that in combination with a couple of relays on the GPIOs, I could probably use them for switches or work with the serial port for a sensor connection.  Just a few notes on them.

OpenWRT 15.05 Chaos Calmer patched to expose the GPIOs:  https://micu.webserwer.pl/pmwiki/pmwiki.php?n=OpenWRT.Downloads

Forum thread on not flashing direct to 15.05.1; I went to 14.07, then to 15.05.  https://forum.openwrt.org/viewtopic.php?id=51576

OpenWRT Wiki page with device info including GPIOs https://wiki.openwrt.org/toh/netgear/wnr612v2

Controlling the GPIOs

From here, the simple way to control the GPIOs natively is with the “brightness” value for the LEDs.  By example for the LAN1 LED (others are in the same path):

root@OpenWrt:~# echo 0 > /sys/class/leds/netgear\:green\:lan1/brightness
root@OpenWrt:~# echo 1 > /sys/class/leds/netgear\:green\:lan1/brightness

Update 9/18/2016

Finally got the LAN2 LED peeled off of the board, had a heck of a time with it.  After doing so, I discovered that I only get ~2.5v across the pins when the GPIO is active… not enough to drive my 3.3v relays.  I assume they are probably using a voltage divider here.  Measuring the resistance between the positive and negative ends of the LED without power applied, I get about 1580 ohms one direction, and 670 in the other.  There appears to be a ~960 ohm resistor at CA111, but I haven’t figured out exactly how this ties in.

Update 10/9/2016

Spent some time with this again over the past couple of days.  I removed the resistor at CA111, but apparently it is not a divider.  May need to spend some time to see if I can make something work with a 2N7000 MOSFET or something like that, but I’m pretty novice so that will take some effort.

I did test out my 433MHz ASK receiver on the TTL serial port, but without much luck.  This OpenWRT page was helpful in getting stty installed and setting the baud rate on the serial port,

‘stty -F /dev/ttyS0 9600 clocal cread cs8 -cstopb -parenb’ to set the config, and
‘stty -F /dev/ttyS0 -a’ to verify the config

but still didn’t get any output.  I’ll have to give it a shot with my Raspberry Pi just to see if I can get anything out of there.

Be the first to comment

Purpose

I recently purchased an Ivation barbecue thermometer which is supposed to be a pretty decent similar build to the Maverick 733 (I believe).  Of course, one of the first things that comes to mind is how to tie this in to some type of IP connected system so I don’t have to rely upon the included receiver and its limited range, and can instead take advantage of wifi, Internet, and the smartphone I always have with me.  Turns out it should be pretty feasible in conjunction with the Raspberry Pi I already have plans to set up as a sort of garage controller.  That device will be connected by ethernet and will have a constant and reasonably close proximity to my smoker and grills already.  This post is for my notes on links that will be useful when (if?) I actually get around to making this work.

Software/code links and notes will come later, after I actually get the equipment to start testing.

About the BBQ thermometers

The Maverick (and presumably Ivation) transmit on the 433.92MHz frequency using OOK.  The Hackaday link to Bob Blake’s article below describes the communications protocols and encoding.

Links

 

Update 10/9/16

Spent some time trying to get this working with my On Networks N150R over the past couple of days without much luck.  May have to give it a try with one of my Raspberry Pi’s and see if I can get it working there, if for no other reason than to verify that the receiver module I purchased is functional and/or that I have it wired somewhat properly.

Be the first to comment

Setting up a PPPoE headend

Posted May 23, 2016 By Landis V

May come in handy.

http://packetlife.net/blog/2009/apr/20/configuring-pppoe/

Be the first to comment