Problems logging into PSN

In the spirit of xkcd 979, let me describe something that recently happened.

My PS4 could not log into PSN, the PlayStation Network. It would show various error codes:

NW-31473-8
CE-38599-4

Then I logged out, and tried to log in by inputting the password. I saw a new error code:

NP-40831-6

I tried logging into PSN from my laptop, from the same home network. I saw:

Error
This page can't be displayed. Contact support for additional information.
The incident ID is: N/A.

Sometimes I’d see a long incident number. It would change with each attempt.

I called the PlayStation support center. They didn’t have any information about the error codes I saw. They checked that my IP address was not blocked. They suggested setting up port forwarding. I thought it would be an odd way of dealing with the logging in problem.

I rang up my ISP. The support person said that there’s a problem with my broadband connection and they’re going to send a technician. The technician detected that some cable outside of my house got rusty and the signal level went down from -1dB to -11dB. The technician fixed this. I waited maybe 3 days and my PS4 started logging into PSN without problems.

So, what was it? Why a weak broadband connection would result in PSN refusing logins from my home network? I don’t know! I could speculate but I have so little information that I would be almost certainly wrong.

Zyxel P-660HW-T1 vs IPv6 tunnel vs SIP

I’m a SIP/VoIP user.  It allows me to make international calls for the cost of a local connection.  I have set up a Linksys PAP2T gateway with a regular phone connected to it. Worked great for calling out.  Unfortunately, the SIP gateway kept on logging out of the SIP server.  It could last a day or an hour, but it would always eventually lose the logged-in state and never return to it without human intervention.  Resetting the gateway would not help, it was usually necessary to switch it off for 15 minutes or so.  A quicker method was to change the SIP port from 5060 to 5061 and back every time I needed to restore the service.  I tried fiddling with the PAP2T settings, but no setting changes seemed to alleviate the issue.

I’m also a an IPv6 user.  I’ve got an OpenWRT installation on WRT54GL, running aiccu and providing an IPv6 tunnel from SixXS.  The tunnel had a similar ailment: it would go down every couple hours to days.  The workaround was to restart aiccu.  I would restart it when I needed it.

At some point, I started neglecting the IPv6 tunnel.  I didn’t need to use it, and I just didn’t bother to restart it.  At the same time, I noticed that the SIP gateway would stay logged in without dropping out for much longer than usual.  This state remained for about two weeks, until I needed to reinstate the IPv6 tunnel.  Right after doing that, I walked over to the SIP gate and… noticed that it had dropped out.  Correlation does not imply causation, but you know… it raised my suspicion.  What is it that these two devices have in common?  The router!

A search on Google for “zyxel sixxs sip” revealed a forum post, in which someone described the same symptoms I had, with a bit of diagnostics.  Both the IPv6 tunnel and the SIP service are using UDP, which is harder to NAT than TCP.  The Zyxel router would repeatedly get confused and misinterpret the IPv6 related UDP packets as SIP packets and vice versa.

The solution was to take away the logic out of the Zyxel router and make it act as a DSL modem only. I’ve reconfigured it to the bridge / transparent mode, and moved the NAT logic to OpenWRT.  I initially wasn’t sure how the bridging mode works, but it turned out to be simple enough.  What’s nice about my particular setup is that I have a static IP address.  The setup uses a /30 network block, so it’s effectively using up 4 of the IPv4 address space.  It’s essentially a 2-bit netblock, so we can use 0, 1, 2, and 3 as the addresses.  In practice it can be something like 83.251.44.193, and any CIDR calculator will tell you, that if your netmask is /30 (or 255.255.255.252), then it’s a 4-address network starting at 83.251.44.192 and ending at 83.251.44.195. Let’s consider the NAT mode first.

  • 0: netblock address
  • 1: the router tells you it’s the the remote side (the gateway)
  • 2: the router’s public IP address
  • 3: the broadcast address
It might look like the 1 address is remote, at the ISP side.  But if you configure your router in a bridging mode, you have 2 devices, and they both have public IP addresses.  Let’s call them Zyxel (acting as a DSL modem) and OpenWRT (doing NAT).
  • 0: netblock address
  • 1: the Zyxel router’s address (gateway)
  • 2: the OpenWRT router’s address
  • 3: the broadcast address
So what you might have thought of as the remote IP address, is your local router’s address.  What was there left to do, was configuring NAT on OpenWRT.  Linux knows how to interpret incoming UDP packets, and both my SIP gate and IPv6 tunnel are working correctly now.  Plus, I have more control.

3G in the Netherlands: Telfort sucks, Vodafone rocks

Warning: this is a long and boring rant.  If you want the executive summary, here it is: If you’re in the Netherlands and want a 3G data connection, get a SIM card from Vodafone, they offer an excellent service.

While visiting Amsterdam for a couple days, I thought it would be nifty to have a local SIM card with data transfer. I would put it into my Android phone, and be able to use Google maps, read restaurant and museum reviews, and update my twitter feed if I came across anything interesting.

Shortly after having started to look for a cell company shop, I came across a Telfort store. They said they can sell me a SIM card with data transfer, and that the rate is €0.05 per 1kB.  I thought it’s a ripoff, but fair enough, if that’s their offer, and I need this, I’m willing to accept for now.  I purchased the SIM card, and asked for configuration details.

“What phone do you have?”
“G1, it’s an Android phone.”
“I can’t find this on our website.”
“It’s similar to… let me see…” – I looked at their phone model list – “HTC hero. Whatever works for Hero, will work for my phone too.”

The store assistant found the instructions and printed them out for me.  I’ve entered the configurations, but my G1 couldn’t make a connection.  The store assistant told me that she can’t help me.  I was running out of time, so I decided to try again in the evening.  I asked a friend who knew a bit of Dutch to help me around the Telfort website; we found all the configuration details again, and also a number you need to call to activate the SIM card — the store staff didn’t tell me about that.  I tried again a few times, and eventually gave up.  I paid the Telfort store a visit the next day. There was a different assistant this time.

“Hi, I bought a SIM card here yesterday, and couldn’t the data connection to work.”
“What’s the model of your phone?”
“It’s a G1.”
“We don’t sell that phone.”
“I think it’s a problem with the card, not the phone.”
“We never have problems with SIM cards.”
“OK, but can you check my SIM card for me?”
“We don’t have a phone here to check your SIM with.”
“I have another phone, which works with data connection, see here…”

I showed them a working 3G data roaming connection on another phone. I then replaced the SIM card with the Telfort one, entered the configuration and showed that the data connection didn’t work with Telfort’s.

“But we don’t sell that phone either”, said the assistant.
“I showed you that your SIM card didn’t work with two phones, and I’ve shown you that 3G works with one of them with another SIM. You’re saying that even though my G1 worked fine in Ireland, Portugal and Poland with local SIM cards, it doesn’t work with Telfort because you don’t sell it? And you can’t check with another phone because you don’t have a phone in your store?”
“Sorry, we can’t help you.”

Disgruntled, I left the store. I turned on the roaming in the other phone, and paid a small fortune for a couple of Google Maps segments and a search for “Vodafone.” Quickly enough, I arrived there, and the conversation went like this:

“Hi there, I would like to buy a SIM card, and I would like to use it for Internet access. Do you have such a thing?”
“Yes”, said the assistant, “It’s €7.50, and the Internet access is €10 for 30 days.”
“Any transfer limits?”
“No, there are none.”
“Cool! My phone is nonstandard, but it’s similar to HTC Dream, so the configuration should work with my phone.”

The assistant printed out the HTC Dream instructions, which contained all the right information: APN name, username, password, proxy server IP address and port. Then he took a booklet, browsed it for a few seconds, then opened it, handed it over to me, pointed at a bit of text and said:

“This is how to enable the Internet connection. You need to send a text message to this number, as descibed here. Before you can use it, you need to top up. I don’t have vouchers right now, but there’s a shop around the corner which will let you top-up.”

I paid and left. Got the top-up in the other store, then sat on a bench. I configured my phone, topped up the account, sent the text message and voilà! The 3G connection worked. I happily used it throughout the stay, and then left the SIM card with a friend, who enjoyed the 3G data for the remaining period of time.

Yey Vodafone!

By the way, a SIP voice connection over 3G worked just fine.

“Hi grandma, how are you? Good, good, I’m sitting in a café in Amsterdam…”

One more reason to praise Dreamhost

Few months ago, I’ve decided to try out a Xen virtual server service in a German provider, xencon. Then I decided I had a better solution (also Xen-based), and I don’t need xencon any more. However, it turns out that it’s not so easy to cancel the service. I had similar problems with two telecom providers in Poland. I said I want to cancel the service and they kept on billing me.

Dreamhost however, is awesome: if you want to, or need to, you can actually close your Dreamhost account on-line! They kindly ask you “Please, stay!”, but you have a button to press, stating that you really want to close your account.

This is by itself an excellent reason to open an account there.

Chinese Nigerian Scam

Do you remember your first Nigerian scam? Mine was circa 2000, if I remember correctly. How didn’t it die out yet, is a mystery to me. Anyway, I just saw something interesting: a Nigerian scam going Chinese! See this:

fromANGANG STEEL <i…@chinamade.com.cn>reply-toinfo_angangsteel1@yahoo.com.hk,
toundisclosed-recipients,
dateJan 14, 2008 8:08 PMsubjectANGANG STEEL OUTSOURCING FOR REPRESENTATIVE

Dear Prospective Representative,

I am David Wan. Personnel Officer to ANGANG NEW STEEL COMPANY LIMITED,China. We are a company that deal on steel product and export worldwide Presently, we are faced with some problems most especially with our Payment methods as most clients we have prefer to pay us with cheque rather than cash. We find it very cumbersome in accepting such payments due to the new monetary policy in our banking systems here in China and this is crippling our business and that is why I am contacting you now.I am looking for a man/woman who is trustworthy to be in charge of receiving payments on my company’s behalf in his/her country.if you know you are not trustworthy please do not bother to reply at all because alot of money is involved here.all I am asking you is if you would like to earn for the first 60days Reps will receive 10% commission on every transaction processed.

If you are interested endeavour to furnish us with your following informations

1.Full names
2.Phone number/fax
3.Full address(NOT P.O BOX)
4.Age
5.Sex
6.Marital Status,
7.Present occupation(Company And position)

Thanks In advance

Yours sincerely,
David Wan.
Personnel Officer to
ANGANG NEW STEEL COMPANY LIMITED,
China

If you wonder what it is all about, read about advance fee fraud. There are people who like to play with it, scambaiters. I never dared to do this, but I think it might be a form of hobby.

Blogging in the English world

After a long period of non-blogging, people often explain why was that and promise to blog more, just as if it was some kind of an obligation. I know it’s not, but still I’m going to fall into this pattern and write about not writing.

Which isn’t quite true; in fact I’ve been quite steadily blogging all this time, in my native language: Polish. There are two main reasons for doing so:

  1. I seem to have a couple devoted readers of my Polish blog: family and friends. I tried to switch into blogging in English, but apparently, they don’t see the me that they used to know when they read me in English. Or whatever the reason was, my friends just wouldn’t read and respond to equivalent posts in English. Blogging in Polish was (and is) more rewarding.
  2. I don’t have anything interesting to say in the English-speaking world. How come I have things to say in Polish, you ask? Well, I just translate or comment on things I’ve read in English! There are far more interesting things to read in English than in Polish, and I’m trying to bring at least at a glimpse of them to my fellow Poles. I’m sometimes writing original posts, but they happen to be hermetic and making sense only among my Polish friends.

It’s not that I don’t see any good things from blogging in English. To point out a few:

  1. Good practice in using the language. Although I have opportunities to speak English now, writing is something that trains a different angle of the language use.
  2. Since I live in an English-speaking country now, it makes sense to have an active English blog as means of getting to know more people, and perhaps even making friends.
  3. Occasionally, I do have something interesting to say in English. By habit, I write it in Polish and never translate it. I could translate from Polish more often.
  4. My English blog used to be more of a „tech notes” kind of blog. I think I will still use it to post solutions to problems I solved. Now, mixing personal ramblings with tech notes doesn’t seem like a good idea, because readers interested in personal stuff will be annoyed by those small posts about some Linux command working this way or other. Splitting blogs seems like a sensible thing to do, but I’ve got 3 blogs already and don’t want to multiply entities beyond necessity.

For now, things are going to stay the way they are. Maybe someday I’ll actually have something interesting to say in English. If I do, you’ll find it on my blog.

Killing phpBB softly

My Polish forum is powered by phpBB. Undoubtedly, it’s the most popular bulletin board package. It’s free (as in freedom), easy to install and it’s easy to use. Virtually every Internet user had some exposure to it. When starting a new forum, it’s a safe choice.

As the years were passing by and my forum was growing bigger, I started being somewhat dissatisfied with it. Smaller and bigger annoyances were biting me every now and then. I’d like to point out some of them.

  • Search. Its user interface is unnecessarily complicated. It yields unsatisfactory results. As a result, people don’t want to use it and tend to ask the same questions over and over again. A good forum engine needs a decent search. Look at Vanilla’s search, it’s so simple and functional! Although it doesn’t mean I wouldn’t like to simplify it even a little more
  • Uncomfortable add-ons installation. So-called mods are distributed as instructions on how to modify the code. You have to open files and edit them by hand. One missed dot, BANG! Your forum is down. Want to upgrade your modified phpBB? It’s very likely that you will have to install it from scratch and install all the mods again. That’s why my moderators still don’t have the “merge topics” mod back. (sorry! I’ll try to install it some time!)
  • Crufty URLs. Compare “/viewtopic.php?t=1234” with “/topics/1234/i-like-clean-urls/”
  • Google won’t index it. It’s a mystery. Perhaps Google recognizes phpBB and avoids it. phpBB has a nasty habit of “enriching” its URLs with things that are different each time, generating infinite number of addresses. Google can never know if it has got all the topics from the forum. No wonder it gets discouraged. This causes a major problem: if the forum is not indexed, it doesn’t come up in search results and there ain’t no people coming! I consider it the biggest problem with phpBB.

I could also complain about lack of several features, including tags, ranking, finding similar topics, etc. Many of them are available… as mods of course. Theoretically, I could fix three of above problems, but I once phpBB would require an upgrade, I’d have to edit all the source code again, by hand. It’s the main reason why I wasn’t adding much things to the forum.

I tried installing Vanilla. It’s brilliant, but once I launched a test installation, users who visited it, complained about everything they could. I tried to fix things they were mentioning, but there was one major and inevitable problem: Vanilla ain’t look like phpBB. For example, buttons are in different places. Users are so tied to the existing interface that they can’t stand a button moved from right to left. I gave up with Vanilla.

I considered writing my own forum engine, then started having doubts and finally gave up. It’s too much hassle. Loads of work, data migration, user complaints… I would have probably rewritten the whole thing if I were younger. I would work furiously for many weeks, then force users into the new version, take flame-war attacks on my chest… No, I don’t want to do that any more.

However, I’m still too young to just sit around. Having just a few hours time, I started playing around with Django, writing a model on top of the phpBB database. I was soon able to fiddle with forums, topics and posts using Django’s ORM. I created a read-only forum archive with clean URLs, an RSS feed and a Sitemap for Google. The forum sitemap consists of about three thousands URLs, where each URL is a starting point of a topic. Each topic can have several pages.

My models work directly on phpBB database tables without modifying them. phpBB itself doesn’t even “know” that someone else is reading its dear tables.

My forum users didn’t notice anything. They’re happily using the old phpBB forum. In the meantime, Googlebot is crawling the Django-powered forum archive with dogged persistence. I think it will soon include the archive in its index and start directing traffic to it.

I’ll keep on developing the Django-powered forum. I can do it slowly and on-line. I will add a nice search engine, posts ranking and all other stuff that will come to my mind. Thing is, I won’t be touching the original phpBB tables. If I ever need to extend some models, I’ll just use Django OneToOne mapping. Current phpBB users will be able to use their forum just as they were before. However, all the cool features will be appearing on the new, Django-powered forum. They might find it more useful and start using it instead of the PHP version. It doesn’t need to happen any time soon. I can take my time developing the features as I want them. If they don’t like it, they can always go back to the PHP version.

It will be all soft. There will be no data migration. No forced user interface change. I’m going to slowly attract phpBB users to the new, Django-powered forum interface.

I’ll put all the phpBB-related code in a separate package and once it’s mature enough, publish it. It won’t be necessarily a forum implementation. It will be a Django-phpBB integration layer that will allow Django programmers to develop their own ideas for their phpBB-powered forums.

I’ll be killing phpBB softly.