Adventures with Tomato Firmware and Sierra Wireless MC8700

busted_power_adapterI got call from parents that their broadband connection have stopped working. I was sure that it’s like all the other times and it just needed to be rebooted because of problems with connection and/or software or factory reset because of shitty software. After I arrived it turned out that power adapter of the 3G MicroRouter (“USB to Ethernet adapter”) was busted.

I found my old universal power adapter from closet so I tried with that. LEDs turned on and everything looked good for 15 minutes and then the device itself burned. So what now? We have ADSL connection as second (“emergency”) connection, but that’s like really slow. Well, at least I can google for solution.

busted_siptune_microrouter

I noticed that it’s possible to remove the need of MicroRouter by flashing custom firmware to Asus WL-500GP V2 router if 3G modem we have is supported (Siptune SM-215). It was easy to find out that it’s actually USB-adapter for Sierra Wireless MC8700.

First I tried DD-WRT, but found out quite fast that there was no version for this router that supports broadband easily out of the box. My next try was Tomato by Shibby.  I had no idea if it would work with MC8700 and I only found some forum posts about how it didn’t work, I still tried because those posts were quite old.

I hoped to get easy so I just downloaded Mega version (tomato-K26USB-1.28.RT-MIPSR1-132-Mega-VPN) and found out that there was not enough memory for this one on this router. After that I looked how the images were named (http://tomato.groov.pl/?page_id=66), found out that English page was work in progress and used translator just to notice the note to look in to builds.png image. No idea where that is because it was not a link and it’s not in screenshots either, so I had to google for it. It turned out the latest smallest version for this router with USB-support is one with VPN (tomato-K26USB-1.28.RT-MIPSR1-132-VPN). It worked, now I just need to setup the 3G modem, that looked easy, just choose right tty device from the list… except no idea which one the modem is.
So I decided to look in to logs and search by word “sierra”.

Jan 1 01:00:19 unknown user.info kernel: drivers/usb/serial/usb-serial.c: USB Serial support registered for Sierra USB modem
Jan 1 01:00:19 unknown user.info kernel: sierra 1-1.1:1.0: Sierra USB modem converter detected
Jan 1 01:00:19 unknown user.info kernel: usb 1-1.1: Sierra USB modem converter now attached to ttyUSB0
Jan 1 01:00:19 unknown user.info kernel: sierra 1-1.1:1.1: Sierra USB modem converter detected
Jan 1 01:00:19 unknown user.info kernel: usb 1-1.1: Sierra USB modem converter now attached to ttyUSB1
Jan 1 01:00:19 unknown user.info kernel: sierra 1-1.1:1.3: Sierra USB modem converter detected
Jan 1 01:00:19 unknown user.info kernel: usb 1-1.1: Sierra USB modem converter now attached to ttyUSB2
Jan 1 01:00:19 unknown user.info kernel: sierra 1-1.1:1.4: Sierra USB modem converter detected
Jan 1 01:00:19 unknown user.info kernel: usb 1-1.1: Sierra USB modem converter now attached to ttyUSB3
Jan 1 01:00:19 unknown user.info kernel: usbcore: registered new interface driver sierra
Jan 1 01:00:19 unknown user.info kernel: drivers/usb/serial/sierra.c: USB Driver for Sierra Wireless USB modems: v.1.7.0
Jan 1 01:00:21 unknown user.notice root: 3G MODEM ready – using sierra module 

Okay… device is ttyUSB 0 1 2 and 3?!

By trial and error I found out that the right choise is /dev/ttyUSB3
Connecting to network is slow by the way. I was not patient enough on the first try (almost gave up) so just wait for couple of minutes when it’s connecting.

MC8700_tomato
I Also tried to google about ping and how to make things works smoother and turns I could optimize MTU size since 1500 produced errors. Right MTU size for this connection is 1472. https://bbs.archlinux.org/viewtopic.php?pid=835033#p835033

ping -c 1 -M do -s 1500 http://www.google.com
PING http://www.google.com (216.58.213.164) 1500(1528) bytes of data.
ping: local error: Message too long, mtu=1500

http://www.google.com ping statistics —
1 packets transmitted, 0 received, +1 errors, 100% packet loss, time 0ms

 

Advertisements
Posted in Uncategorized | Leave a comment

Badcaps sunday

displaysEarlier this week I found five broken monitors from the recycling container at my school. There was a lot of post-its saying that they are all broken in a way or another. Mostly just because of the broken capacitors. I have already fixed three of those by changing caps.

But of course there was one display that was not so easy to fix, still almost all of those LG displays has same kind of power supply and swollen capacitorthat’s why I was able to identify the fault of the power supply by just changing it to the working one for a moment.

That broken power supply didn’t have any easily noticeable damage. I think the reason is dry capacitor, but it’s (obviously) harder to find than swollen one. I don’t know if I should put any more time in these since they’re not worth of almost anything and I have not so much use for Dell Precision M4400these anyway. Maybe I just build some sort of wall of screens like in the Matrix.

BTW. I also found working DELL Precision M4400 (without charger and hard drive) (also one without processor, ram, hard drive, optical drive and charger and took it for spare parts) from the recycling container. I ordered charger and hard drive for that and I’m already using it. Not much to blog about that so I didn’t write separate post about it.

Posted in Badcaps, Hoarding, Recycling, Treasure | Leave a comment

Repairing Technivorm Moccamaster brewer

moccamaster_floatSo I got broken Moccamaster from my friend about a month ago. It had two parts that didn’t work properly. First one was the float (there was a rubber tube with leakage close to heating elements switch) and the heating element that moved water was somehow “ripped” and if it worked – it worked (at least) randomly. Otherwise the Moccamaster looked almost like a new one. So I started looking spares from the web-shops and C2C sites, but then I realized that I should ask from my friends moccamaster_heater_element(about half of them are stuff hoarders and DIY guys like me) that if someone has any spares.

One phone call was enough, my best friend had one double brewer without jugs, filter holders and lids but there were all the parts I needed and a little bit more. It was in his garage, it was so dusty that I had to clean it three time before I even tried to take the parts I needed. Still I got what I needed so I was happy (or as happy as a guy with a free Moccamaster and a successful project can be).

Wiring of Moccamaster is not hard to understand, but it is still easy to mix up the wires when disassembling it. I also took some pictures hoping that it might help someone. I also started to draw some kind of picture about wiring, but had no motivation to finish that yet. Sadly I didn’t took any good pictures of the double brewer that might have made this blog post little bit more interesting.

moccamaster_wiring

Posted in Uncategorized | 8 Comments

Hoarding some shitty computers again

Story

Today I found some discarded computers from our school and of course I had to have them. My friend also took some since he doesn’t want to  spent a lot of money to computers like I do. For me it’s more about principles than actually having any use for those. I hope someone (maybe a student from our school) needs those, I also might have (to create) some stupid project for next summer that needs one or two of those.

What I got

Specs of the (5) Hewlett-Packard computers

  • Intel Pentium 4
  • 4 pieces of 256MB DDR RAM
  • 300w power supply with SATA connectors
  • motherboard with integrated graphics
  • DVD-drive
  • no hard-drives 😦

… I probably have some use for those power supplies but for other parts it might be hard to find any real use.

I also took one 2U IBM rack server

  • 2 Intel Xeon processors
  • 4 pieces of 512MB RAM (Propably DDR, I don’t remember for sure)
  • lots of 60mm fans
  • Motherboard with integrated graphics
  • 2 power supplies
  • DVD-drive
  • Again no hard-drives 😦

Overview

Once again I took something that I probably will never actually need. Also my apartment looks again like a data center / computer shop / repair center.

Posted in Hoarding | Leave a comment

Playing with Arduino, h-bridge and 6 lead bipolar stepper motor

Story

OKI_stepper_24V

Months ago I ripped some stepper motors out of a old printer and had an idea about building either a plotter or a CNC machine. After some snooping around the internet I found out that if I want to drive a stepper motor without burning my Arduino I need either some transistors or an h-bridge(s). I also noticed that my only 24V power supply does not have enough amperage so I had to use a 12V xbox 360 power supply and it worked fine. I also had to learn the difference between unipolar and bipolar stepper motors.

Unipolar and bipolar stepper motors explained by Microchip: http://www.youtube.com/watch?v=vxxnPJBxG3M

Tools / Parts I used:

  • Couple of SN754410NE QUADRUPLE HALF-H DRIVER
  • OKI 24V 7.7Ohm 6 lead 7.5DEG./STEP Stepping motor (2VA4M10054-) from an old printer
  • XBOX 360 power supplySN754410NE
  • Arduino UNO R3
  • Prototype shield v.5

SN754410NE Datasheet: http://www.ti.com/lit/ds/symlink/sn754410.pdf

stepper_and_arduinoI connected the power supply (12V 14.2A) to Vcc2 / pin 8, Arduino 5V and power supply trigger to Vcc1, Arduino Digital pins 0-3 to A1-A4 and on second chip 4 to A1 and 5 to A2. The same goes with the stepper motor and Y pins.

Test code

int motorPin1 = 0;
int motorPin2 = 1;
int motorPin3 = 2;
int motorPin4 = 3;
int motorPin5 = 4;
int motorPin6 = 5;
int delayTime = 500;

void setup() {
  pinMode(motorPin1, OUTPUT);
  pinMode(motorPin2, OUTPUT);
  pinMode(motorPin3, OUTPUT);
  pinMode(motorPin4, OUTPUT);
  pinMode(motorPin5, OUTPUT);
  pinMode(motorPin6, OUTPUT);
}

void loop() {
  digitalWrite(motorPin1, HIGH);
  digitalWrite(motorPin2, LOW);
  digitalWrite(motorPin3, LOW);
  digitalWrite(motorPin4, LOW);
  digitalWrite(motorPin5, LOW);
  digitalWrite(motorPin6, LOW);
  delay(delayTime);
  digitalWrite(motorPin1, LOW);
  digitalWrite(motorPin2, HIGH);
  digitalWrite(motorPin3, LOW);
  digitalWrite(motorPin4, LOW);
  digitalWrite(motorPin5, LOW);
  digitalWrite(motorPin6, LOW);
  delay(delayTime);
  digitalWrite(motorPin1, LOW);
  digitalWrite(motorPin2, LOW);
  digitalWrite(motorPin3, HIGH);
  digitalWrite(motorPin4, LOW);
  digitalWrite(motorPin5, LOW);
  digitalWrite(motorPin6, LOW);
  delay(delayTime);
  digitalWrite(motorPin1, LOW);
  digitalWrite(motorPin2, LOW);
  digitalWrite(motorPin3, LOW);
  digitalWrite(motorPin4, HIGH);
  digitalWrite(motorPin5, LOW);
  digitalWrite(motorPin6, LOW);
  delay(delayTime);
  digitalWrite(motorPin1, LOW);
  digitalWrite(motorPin2, LOW);
  digitalWrite(motorPin3, LOW);
  digitalWrite(motorPin4, LOW);
  digitalWrite(motorPin5, HIGH);
  digitalWrite(motorPin6, LOW);
  delay(delayTime);
  digitalWrite(motorPin1, LOW);
  digitalWrite(motorPin2, LOW);
  digitalWrite(motorPin3, LOW);
  digitalWrite(motorPin4, LOW);
  digitalWrite(motorPin5, LOW);
  digitalWrite(motorPin6, HIGH);
  delay(delayTime);
}
Posted in Arduino, Stepper motor | 2 Comments

Playing with Arduino and DRAM

Story

Arduino Protoshield DRAMA few weeks ago I wanted to play with DRAM. I ripped a couple of 4 Bit 4 MB DRAM circuits out from an old printer and tried to connect those to an Arduino with a handmade adapter. That was just a disaster, the legs always broke off and it was impossible to solder those back, so after a few tries I gave up and ordered some DIP-packaged KM4164B-15 64K x 1 Bit DRAM-chips from Ebay.

Datasheet: http://pdf.datasheetcatalog.com/datasheets2/66/669664_1.pdf

I connected DRAM address inputs 0-7 to Arduinos digital pins 0-7, data in to pin 8, data out to pin 9, Row address strobe to 10, Column address strobe to 11 and Read/Write control to 12.DRAM

Code

My write & read test code that first writes 1 to RAM, Reads it from RAM and prints it out and after that it does the same with a 0.

/* samsung_dram.ino
 0 A0 (Address input)
 1 A1 (Address input)
 2 A2 (Address input)
 3 A3 (Address input)
 4 A4 (Address input)
 5 A5 (Address input)
 6 A6 (Address input)
 7 A7 (Address input)
 8 D (Data in)
 9 Q (Data out)
 10 RAS (Row Address Strobe)
 11 CAS (Column Address Strobe)
 12 W (Read/Write input)
 */

 int rd; //Read data

void setup() {
 Serial.begin(9600); //start serial communication at 9600bps
 pinMode(0, OUTPUT); //Address input A0
 pinMode(1, OUTPUT); //Address input A1
 pinMode(2, OUTPUT); //Address input A2
 pinMode(3, OUTPUT); //Address input A3
 pinMode(4, OUTPUT); //Address input A4
 pinMode(5, OUTPUT); //Address input A5
 pinMode(6, OUTPUT); //Address input A6
 pinMode(7, OUTPUT); //Address input A7
 pinMode(8, OUTPUT); //Data in
 pinMode(9, INPUT); //Data out
 pinMode(10, OUTPUT); //RAS Row Address strobe
 pinMode(11, OUTPUT); //CAS Column Address strobe
 pinMode(12, OUTPUT); //Read/Write input
 //Default state
 digitalWrite(10, HIGH);
 digitalWrite(11, HIGH);
 digitalWrite(12, HIGH);
}

void loop() {
 delay(2000); //wait at least 100 microseconds

 //Test address
 digitalWrite(0, HIGH);
 digitalWrite(1, HIGH);
 digitalWrite(2, HIGH);
 digitalWrite(3, HIGH);
 digitalWrite(4, HIGH);
 digitalWrite(5, HIGH);
 digitalWrite(6, HIGH);
 digitalWrite(7, HIGH);

 //Test data
 digitalWrite(8, HIGH);
 delay(20);

 //DRAM write 1
 Serial.println("RAS to low");
 digitalWrite(10, LOW);
 Serial.println("Read/Write to Write state");
 digitalWrite(12, LOW);
 Serial.println("CAS to low");
 digitalWrite(11, LOW);
 Serial.println("Read/Write back to Read state");
 digitalWrite(12, HIGH);
 Serial.println("CAS to high");
 digitalWrite(11, HIGH);
 Serial.println("RAS to high");
 digitalWrite(10, HIGH);

 //DRAM read
 Serial.println("RAS to low");
 digitalWrite(10, LOW);
 Serial.println("Read/Write to Read state");
 digitalWrite(12, HIGH);
 Serial.println("CAS to low");
 digitalWrite(11, LOW);
 Serial.println("Save data to variable");
 rd=digitalRead(9);
 Serial.println("CAS to high");
 digitalWrite(11, HIGH);
 Serial.println("RAS to high");
 digitalWrite(10, HIGH);
 Serial.print("Read data: ");
 Serial.println(rd);
 //Test data
 digitalWrite(8, LOW);
 delay(20);

 //DRAM write 0
 Serial.println("RAS to low");
 digitalWrite(10, LOW);
 Serial.println("Read/Write to Write state");
 digitalWrite(12, LOW);
 Serial.println("CAS to low");
 digitalWrite(11, LOW);
 Serial.println("Read/Write back to Read state");
 digitalWrite(12, HIGH);
 Serial.println("CAS to high");
 digitalWrite(11, HIGH);
 Serial.println("RAS to high");
 digitalWrite(10, HIGH);

 //DRAM read
 Serial.println("RAS to low");
 digitalWrite(10, LOW);
 Serial.println("Read/Write to Read state");
 digitalWrite(12, HIGH);
 Serial.println("CAS to low");
 digitalWrite(11, LOW);
 Serial.println("Save data to variable");
 rd=digitalRead(9);
 Serial.println("CAS to high");
 digitalWrite(11, HIGH);
 Serial.println("RAS to high");
 digitalWrite(10, HIGH);
 Serial.print("Read data: ");
 Serial.println(rd);
}

Output

Output for one loop looks like:
RAS to low
Read/Write to Write state
CAS to low
Read/Write back to Read state
CAS to high
RAS to high
RAS to low
Read/Write to Read state
CAS to low
Save data to variable
CAS to high
RAS to high
Read data: 1 <- 1 Like it should be
RAS to low
Read/Write to Write state
CAS to low
Read/Write back to Read state
CAS to high
RAS to high
RAS to low
Read/Write to Read state
CAS to low
Save data to variable
CAS to high
RAS to high
Read data: 0 <- 0 Like it should be

Posted in Arduino | Tagged , | 3 Comments