New LTE connection fun

So I live out in the middle of no where USA, and we have crappy internet service… like DSL is still a viable option here. Fiber, Cable and all of that are passing most of us who live here by, due to stupid regulations, and monopolies providing for the people, but looking for profit.

The part that is really frustrating is they just installed new fiber at the end of my road, and will not bring it down the road for us to use. Here’s looking at you CenturyLink!

I hopes of getting better service for less than the $80/month for 3mbs that CenturyLink is charging me, I’ve purchased an LTE modem made by MikroTik.

It took me 22 days to get it configured, which as an IT “Professional” is total BS.

So in hopes of others having more success than I did, Here’s the keys to getting my device up and running on T-Mobile for about $30/month.

1) Don’t get a contract, get a prepaid hotspot card. In order to do this you will have to drive to a T Mobile store run by T-Mobile, specifically ask for it, and then wait two hours for them to activate a card and hand it to you. You will need to bring your device, in order for them to look at it and say it’s not compatible. You cannot open an account with them, or add onto an existing account.

If you want to save the $10 that they charge you for the card, call the phone number, ask them to activate a line, and mail you a card. Take this card into the store, and say “can you please activate this card.” They will promptly though your card into the trash and issue you a new card, but will not charge you for it.

2) in your MikroTik, login with all of the defaults, and setup your password, and associated LAN settings.

3) reboot your MikroTik.

4) go into Interfaces -> LTE and click on the LTE APN’s button.

5) add an APN for T-Mobile USA, as shown below

Note: This information is hidden by T-Mobile here: https://www.t-mobile.com/support/devices/not-sold-by-t-mobile/byod-t-mobile-data-and-apn-settings

6) Reboot your MikroTek

7) under Interfaces -> lte1, assign the APN to your interface

8) Wait like 10 minutes for T-Mobile to stop being stupid, go have a cup of coffee or something.

9) Rejoice at your less crappy internet connection.

I’m now seeing 3mbs download as well as 3mpbs upload, Quite an improvement over my 0.8mbs upload speed that CenturyLink thinks is acceptable. You may also need the DNS information for T-Mobile, which is located here: https://www.sprint.net/faq/dns

Now I just have to get it up on the pole, but that’s for another day.

NeoPixels (WS2812) and a Raspberry Pi Zero W

So I wanted a cool LED controllable light up thingy… Because

  1. It lights up.
  2. I needed a status for my camera for the Teams stuff when I’m at home, so my Wife does not accidentally walk though the camera
  3. It’s a big bright light.

So I first looked at the unicorn hat, but this is discontinued, so then I went to my favorite electronics store, Adafruit.com, and they did not have what I wanted in stock, so I found a cheap knockoff on amazon (azin #B081BCBQ6B if you are interested) and wired it up.

I’m working off of port 18, and pulling power from the usb port for the PI, and it seems to work well, and it’s a simple 3 wire hookup, +5v, Gnd, and Data (GPIO18).

First thing is to wire up the circuit. This is the pinout for the header on a Rasbery Pi Zero W, Directly from https://www.raspberrypi.org/documentation/hardware/raspberrypi/schematics/rpi_SCH_ZeroW_1p1_reduced.pdf The even pins are on the outside of the board.

Now for software, I’m going to use Python, because, well, it’s easy. Make sure you are running Python v3, and then add the Adafruit libraries in.


    sudo pip3 install rpi_ws281x adafruit-circuitpython-neopixel
    sudo python3 -m pip install --force-reinstall adafruit-blinka

Now we need a tester, so let’s also use Adafruit’s tester as well. I’ve modified it for 64 pixels, but nothing else yet. The code is mirrored here if you want to try it.

# Simple test for NeoPixels on Raspberry Pi
import time
import board
import neopixel


# Choose an open pin connected to the Data In of the NeoPixel strip, i.e. board.D18
# NeoPixels must be connected to D10, D12, D18 or D21 to work.
pixel_pin = board.D18

# The number of NeoPixels
num_pixels = 64

# The order of the pixel colors - RGB or GRB. Some NeoPixels have red and green reversed!
# For RGBW NeoPixels, simply change the ORDER to RGBW or GRBW.
ORDER = neopixel.GRB

pixels = neopixel.NeoPixel(
    pixel_pin, num_pixels, brightness=0.2, auto_write=False, pixel_order=ORDER
)


def wheel(pos):
    # Input a value 0 to 255 to get a color value.
    # The colours are a transition r - g - b - back to r.
    if pos < 0 or pos > 255:
        r = g = b = 0
    elif pos < 85:
        r = int(pos * 3)
        g = int(255 - pos * 3)
        b = 0
    elif pos < 170:
        pos -= 85
        r = int(255 - pos * 3)
        g = 0
        b = int(pos * 3)
    else:
        pos -= 170
        r = 0
        g = int(pos * 3)
        b = int(255 - pos * 3)
    return (r, g, b) if ORDER in (neopixel.RGB, neopixel.GRB) else (r, g, b, 0)


def rainbow_cycle(wait):
    for j in range(255):
        for i in range(num_pixels):
            pixel_index = (i * 256 // num_pixels) + j
            pixels[i] = wheel(pixel_index & 255)
        pixels.show()
        time.sleep(wait)


while True:
    # Comment this line out if you have RGBW/GRBW NeoPixels
    pixels.fill((255, 0, 0))
    # Uncomment this line if you have RGBW/GRBW NeoPixels
    # pixels.fill((255, 0, 0, 0))
    pixels.show()
    time.sleep(1)

    # Comment this line out if you have RGBW/GRBW NeoPixels
    pixels.fill((0, 255, 0))
    # Uncomment this line if you have RGBW/GRBW NeoPixels
    # pixels.fill((0, 255, 0, 0))
    pixels.show()
    time.sleep(1)

    # Comment this line out if you have RGBW/GRBW NeoPixels
    pixels.fill((0, 0, 255))
    # Uncomment this line if you have RGBW/GRBW NeoPixels
    # pixels.fill((0, 0, 255, 0))
    pixels.show()
    time.sleep(1)

    rainbow_cycle(0.001)  # rainbow cycle with 1ms delay per step

The result is awesome.