Patch for

I’ve got 2 APC UPS connected to a Raspi3 and use apcupsd for getting the status data. The Raspi provides the status data via SNMP to my Zabbix installation.

For this to work I got this snmpd mod. Unfortunately this only queries the default APC via apcaccess.

I hacked together (I dunno nothing about perl) a patch to support multiple UPS.
You can find this after the break. Continue reading “Patch for”

Remote capturing with wireshark

I always forget these parameters so better keep ’em here.

Full Console output:

tcpdump -nnXSs 0 -i eth0 port 389

Remote cap:

ssh root@HOST tcpdump -U -s0 -i eth0 -w - 'not port 22' and port 389 | wireshark -k -i -

New kid on the block

Happy Happy Joy Joy!

The mailman brought a new display. Cheapskate I am I took the display with the most bang for the buck – at least I thought. The display here is a 0.96inch 128×64 OLED blue/yellow with 3(!) interface options: 3wire SPI, 4wire SPI and 2 I2C. And then the problems began…

I wanted I2C mode because I’m a little limited on i/o’s on the FeatherFona. The boards factory setting is 4wire SPI and for the other modes you’ll need to resolder a tiny 0 Ohm SMD resistor on the back (or just bridge the two pins). Did that and connected VCC, GND, SDA/DIN, SCL/CLK and fired up the Fona. Nothing.

Also waveshare has actually a wiki with a spec-sheet of the SSD1306, a schematic and a user manual for the module it’s of no use for people like me. They only mention 4wire mode and with not a single word that you actually have to connect 7 wires for a 2 wire I2C.
And I usually don’t have the time to go through all the specs nor the deep electrical knowledge.
So a bit of research, a bit of fiddling and long story short – the pinout:

GND - GND (obviously)
VCC - 3.3V (spec says somewhere 5V via dc/dc regulator but I'm not sure if there is one and I don't have 5V anyway)
RST - 5V or #4 (actually the SSD1306 spec says: keep HIGH during normal op, pull LOW for reset)

For the reset pin I’ll see what happens if I just wire this to VCC and never pull LOW. I mean: I never want to reset the display controller. I reset/power down the whole FONA which should also reinit the display controller, amirite?
So module is working and now I finally know what a blue/yellow display is. b/y doesn’t mean you can freely choose color. b/y means theres a row of yellow pixels at the top and the most part of the screen is blue. This is a kind of odd design but one could argue that you’ll often have some menu title in the top anyway.

So that’s for the display. I now have 2 options to choose from which was important for me to be more flexible with the actual design of the phone. Speaking of design I now have a fairly good idea which direction I’m going. Time for some electro etching 🙂

Besides all this I’ve got a job opportunity so I think I’ll need to get my hands dirty with some java frameworks in the next few days.


Phone progress

img_20161110_202952A small update on the phone project

(Note2self: implement GD-Lib on the server to properly scale the images)

In the picture you see the current setup sitting right next to me.

Thats the feather with a 128×32 OLED featherwing, a gsm pigtail, a small speaker in the plastic bag, 3 buttons on a pcb and an old rotary dial.
The rotary dial is not the final one since it’s from around the 80’s and got all plastic gears and doesn’t sound as good as an original one. Got a better one right behind me, all  metal and Bakelite but different timing and no dial for now.

Code-wise I implemented a basic menusystem, I can make calls (Rotary dials weren’t meant be used for  12 digit cell phone number, weren’t they?) and I can answer calls.

This weekend I’ll do a complete refactoring of the code because the way it is now it’s getting out of hand. Then either look into power saving modes and figure out why my FM units is not working or I’ll start on the case.

I made a first sketch seen in the picture but I’m not quite sure if I’ll go this way. Steampunk is out of the question – at all this is a cell phone and there’s only this much you can hide behind brass, ornaments and overengineered mechanics. Art deco doesn’t fit either so I’m probably going dieselpunk.
I’m not really sure whether I’m going the bulky military look with wood&polished steel like in the pic or do something with more rounded edges – something that actually fit’s in your pocket without tearing huge holes in the fabric of your jeans. I’ve got some fragments in my head of wood framed in some massive aluminum bars, a flip phone, round edges, … dunno.

Oh, and btw: I consider the SMS-typing problem officially solved 😀