inertreactants

robot making, machine designing, space exploring, reddit hating

Got it working

Well, I got it working. The problem was that I started my CSS class with an integer instead of a letter. Now, to make it start a new column in a reasonable way (so it’s like it’s broken up on multiple pages) instead of scrolling up and down forever on long posts.

My goal is to make text posts appear as if they are in a science paper format with inline images.

Figure 1: fresh parts

Hopefully I can keep images like these inside of my columns.

Migrated my blog

I migrated my old blog to tumblr from wordpress. In the process, I’ve lost my images and other files (which I do have offline). I will probably go back and fix broken links at some point. Hopefully I will post more often (my last post was over 2 years ago).

tumblrbot asked: ROBOTS OR DINOSAURS?

Robots, obviously

New Update from Sendai

A professor of nuclear physics just came and talked to us at my dorm. There are only 2 people plus 3 staff left here, out of about 30 people total. Tohoku University is officially closed until April 25 and students are supposed to go home if possible. Depending on the food and power situation, he is anticipating inspection and cleanup at the university buildings next week and some resumption of research in early April.

The radiation output at the reactors has been around 0.5mSv per hour (I got this update about 30 hours ago). Normal human absorption is 3.5mSv per year. Unless you are very close this is not even detectable.

The professor has been measuring levels in his apartment in Sendai. I believe he said he normally measures a rate of 0.1mSv per hour (before the earthquake). I don’t know how the detector measurement compares to rate of absorption. What I do know is that the maximum he has measured is 0.6mSv per hour, for short periods (a few hours). This is 6 times normal, and he said it is not a problem for short-term exposure until you get to about 100 times the normal level. He is not leaving Sendai but advises students to leave because it could be more difficult to leave in the coming weeks and there is no point staying when there are no classes.

I am now hearing reports of loss of water in one reactor. As far as I know this will make cleanup very hazardous but is not a hazard to the general public, especially outside of the evacuation zone.

There is a group of 10 attempting to get to Tokyo tomorrow. The route is bus or car to Yamagata, then local trains to Niigata, then shinkansen to Tokyo. The same professor from above organized escorts for us. We’re expecting it to take two days but if we get stuck, we should be OK in a group.

Update from Sendai

Many people are leaving Sendai, but it is very difficult to go South to Tokyo, which is where most need to go. At the moment it is a 500m bus lineup followed by an apparently 20 hour long journey. They will run out of fuel in a day or two but I think it won’t take long to start getting more, as food only took one day to start arriving.

I’m the only english speaker left at my dorm, so I am heading to stay with another group of people on the ground floor of an apartment building.

I already had a bus ticket to Tokyo for this weekend. I have no idea if I can get on that bus. It will need to be rerouted as normally it goes though Fukushima.

University is closed until at least May. My internship was supposed to end in late April. My current plan is to get to Tokyo when I can, and then make a decision on staying to finish my work or leaving.

There is a small amount of work to get part of our GLXP rover to Europe for testing and demonstrations. I will be bringing those parts to Tokyo in order to ship them. The rest of the rover is safe in my dorm.

If I get stuck in Sendai I should be safe. There were a couple of large (M6?) aftershocks today and they are expected for one month up to M7 (100 times less energy than the original). There is plenty of food and water available and my dorm now has water, power and internet.

The main concern is nuclear fallout but from what I understand of the design and situation of the reactors were are reasonably safe. Preventative medicine is available if it is needed and the worst case scenario does not involve danger at short-term exposure lengths.

Many thanks to the heroic nuclear workers who have sacrificed their lives keeping the country safe.

OK in Sendai

I am OK in Sendai, as is everyone I know here. Thank you everyone for the messages.

They are already starting to restore power and water to the city of Sendai.

The earthquake itself was pretty scary but afterwards everything is very well organized; we waited outside after the earthquake and eventually were allowed to grab our stuff from the lab. We left quickly after an aftershock and possible gas leak. At my dorm we are staying together in a group.

Where I am located in the city I don’t have running water or power but we are safe with lots of food and water.

Although the shaking was quite violent, there are no buildings in the city itself that collapsed and flooding was confined to the subway system as far as I know. We knew it was serious right away as it was the first time we heard the early warning detection alarm (3 seconds before) and it was impossible to stay standing.

It was much worse to the West where soil conditions are worse and to the East where tsunamis hit. We weren’t aware of how serious things were until we heard news reports.

In the city today, restaurants were giving free food and people were in good spirits, although you can see smoke from fires near the coast and there are smaller fires in the city.

Local groups are also making rice and soup for people. Basically the same food I’ve been eating since I arrived, but it’s not lukewarm like at the cafeteria!

Convenience stores were open today, where people patiently lined up in the dark to buy a couple of day’s worth of food each. I got food there, and was also given food by the school, as well as flashlights and batteries.

Amazingly, a handful of stores and bars where even open by the main station this afternoon.

There are buildings designated as refuges where people in tall and evacuated buildings are staying.

The news images are not from Sendai city, they are from surrounding areas. The aftershocks were quite large and frequent until this morning but have subsided now.

The nuclear reactors are not posing a serious risk according to local media, and despite the recent explosion widespread fallout is not a strong possibility for this type of plant and failure.

We are not sure if/when we can go back to the lab. Many experiments were damaged but our rover was OK when we left it. I am uploading pictures from the lab and city now.

I’m currently with friends in the city centre where we found power and 3G internet. I should be able to update occasionally directly and via friends (email is sporadically working on my phone).

I want to stress that I am OK and in a safe place.

Here are the pictures:

iPhone 4 unlocked

I was able to get my iPhone 4 unlocked after about two hours on the phone with Rogers. I called them using skype from my dorm, and after about an hour of getting transferred to wrong department after wrong department, I got to the “unlocking department”. This is where I found out that I couldn’t get my phone unlocked because my account was inactive (therefore they couldn’t charge me the $50 fee).

I complained to the service rep that nobody told me this, and it didn’t make sense because cancelling and unlocking are two activities that should go hand-in-hand. He asked for my IMEI number and it seemed like I was going to get my phone unlocked for free. I started to recite it: “1..”

*skype error: lost connection*

“hello?”

Pissed off, I posted my annoyance to facebook, and walked to my lab to use the more reliable wi-fi connection to call Rogers back. At the lab, I used my iPhone 3GS to call Rogers over skype. Did you know skype for iPhone has a bug that prevents button presses after a push notification is received during a call? Just as the Rogers system was asking me to punch in my phone number, my friend Eric replied to my status on facebook: “any updates?”

Well yes, the update is that I have to start over again because your push notification broke skype. Only a few lost minutes, though. This time it only took me half an hour to get to the right department. And this time they flat-out refused to help me without an active account and I was transferred to a different department.

10 minutes later, I had a reactivated account and was once again reciting my IMEI number. I was informed that next time I plugged into iTunes, my phone would be unlocked by Apple. I fully expect that I will get a bill from Rogers for the $50 fee, plus who knows what other charges that come with reactivating an account. I was clear that it’s supposed to be for the purposes of billing for unlocking only, and was not told otherwise but, well, it’s Rogers.

It wasn’t unlocked when I plugged it into my macbook. I waited an hour; still wasn’t. I searched the internet to see how long it normally took —supposed to be instant. I searched to see if it wasn’t working because I was jailbroken. Unfortunately, it’s impossible to find any information about the official unlock on a jailbroken phone because there is so much discussion about unofficial unlocking.

So I tried restoring to non-jailbroken state. Instantly after that, iTunes said “Congratulations, your iPhone is unlocked.” So I guess the official unlock doesn’t work when you are jailbroken. No matter, 10 minutes later I was once again jailbroken as it’s still required for me to change the APN settings to get free MMS working in Japan (see previous post).

Next I cut my SoftBank sim card to microsim size, using my Rogers microsim card as a guide. I had to cut through some of the metal contacts, which I was nervous about, but the sim card worked fine after.

I followed my own instructions from my previous post to quickly get MMS working again, and everything seems to be working fine.

Update 2011-02-28

I received a bill in my email from Rogers. When they reactivated my account to send me a $50 unlock bill, it restarted all of my services, my phone number and contract! I did not agree to any ot this.

After hours on the phone and talking to several different people, they are adamant that I intended this and seem shocked that I am surprised that a call to unlock my cancelled phone resulted in starting all service again. Unlocking a phone to use on another network is the exact opposite of wanting a contract!

They claim that the only way to unlock my phone was for me to restart my contract (refunding my cancellation fee to my account in the process), restart my phone number and start Billing my monthly again. One of the requirements to unlock is that the phone is paid for fully. As far as I know the only way to do this, outside of waiting for three years, is to cancel your contract and pay the termination fee. This whole thing is very bizzarre and frustrating.

So currently I am stuck with over a month’s worth of charges and a contract. To cancel again they say I must pay for an additional 30 days, and give back the cancellation fee (this part I am OK with).

All told, I am being billed about $220 extra for the pleasure of having a SIM card in a drawer somewhere that might have worked if I went back to Canada and put it in my phone.

I go nowhere talking to them about reversing the charges and have filed a complaint with the CRTC who apparently is supposed to mediate in these types of cases.

Unlocking iPhones and cutting microSIMs to size

I brought 2 iPhones to Japan with me: my 3GS, which is paid for, contract-free, and unlocked (by me) and my iPhone4, which is paid for, contract-free, jailbroken, but locked. My intention was to buy a prepaid sim card here and use the 3GS until the iPhone 4 is unlocked by the dev-team.

Unfortunately, there are a few snags: there is no iPhone 4 unlock in sight (for my firmware version) and it’s difficult to get a sim card here. The first problem might be solvable. It seems that Rogers might be unlocking paid-up phones. Based on the comments on that story, it might be possible to do by phone.

Secondly, I’m not sure if my sim card can be cut to micro-sim size. Most can, but as you can see in the picture, my Softbank Japanese sim card (white one in lower right) has the huge contacts that would need to be cut through in order to fit exactly the microsim size (my Rogers micro sim is lined up to the right of it). Since the chip is likely below the contacts, I don’t want to cut there. Cutting just the contact part of the card will give the perfect dimensions, but the contacts are just on the edge of not lining up, judging by the wear marks on my Rogers micro sim. Only one way to find out, right?

I will find out the answers to these questions, but in the short term, I’m using my old iPhone 3GS. It was a bit of a process to get a prepaid sim card in Japan. Although data is not possible with a prepaid card, email is (for ¥300 per month with Softbank). It is also quite a process to get that email working on an unlocked iPhone, so I’ve detailed it in this post.

Update: Although getting my iPhone 4 was a pain (possible to do by phone but it took over 2 hours), cutting the microsim was easy and worked perfectly.

Using your unlocked iPhone in Japan

The problem


In Japan, you can’t just go to the convenience store and buy a sim card. You are supposed to be a resident with an address before getting a phone. It is possible to rent a sim card or phone, but it’s expensive. For my purposes, I only needed email and voice (not data), so I got a prepaid sim card from SoftBank, which gives unlimited email (to your SoftBank address only) for ¥300 per month. I came across a ton of conflicting and outdated information on the internet about how to get a sim card and how to use an unlocked iPhone in Japan.

A note about data plans


It may be difficult to get any sort of plan (including data), unless you have a 2+ year visa to stay in Japan. And if you do get a data plan, it will not be void with a non-SoftBank handset according to your contract. Some people have had success using an unlocked iPhone with data, and some have been dinged with ¥100,000 monthly bills. The price to get an iPhone with your contract is something like ¥450 per month, so just I would just save myself the hassle and get a SoftBank iPhone, as I don’t speak enough Japanese to argue about bill amounts.

The steps


Thanks to this site for the required settings. Note that you really do need an alien card to do this (and you need a non-visitor visa to get that, i.e.: you need to be living in Japan). If you want a prepaid sim card for you Japanese vacation, your only hope is renting one, or buying a used one on ebay. And since sim cards are tied to your passport and/or alien card, I don’t think many people will sell you their old one. With that little caveat out of the way, below are the steps to get voice and unlimited email on your unlocked iPhone. These steps are for a jailbroken and unlocked iPhone 3GS running iOS 4.0.1, with Cydia and SSH installed. This may work for an iPhone4 (I plan to test this) but it requires cutting your sim card to microsim size. If you are not familier with unlocking, Cydia and SSH, do some research and then come back.

  1. Get the basics done

    1. Jailbreak and unlock phone. Install SSH (if your phone is factory unlocked it will still need to be jailbroken)

    2. Install an SSH client for file transfer on your computer (if you don’t have one)



  2. Go to the SoftBank store

    1. Bring the following with you to a SoftBank store:

      1. alien card (temporary alien card application paper and passport is acceptable)

      2. your Japanese address

      3. your Japanese home or work phone number

      4. Here is a list of stores with English speakers, but most stores will have someone that can help you in english.



    2. Ask for a pre-paid phone and top-up card.

      1. Get the cheapest one they have. Mine was ¥2,000 plus a ¥3,000 top-up card. I got handset model SC740, but I’m sure that the cheapest model changes regularly.

      2. They will not sell you a sim card only, unless you have a used SoftBank handset.

      3. The information online about buying a sim card only is outdated -they will not sell you one. You need the handset for step 3 anyway, so just buy it!



    3. Get them to set the phone’s menu and voice menu to english.



  3. Top up your phone and set email address

    1. Call 1400 and top up the phone balance using the instructions on the top-up card and activate the ¥300 monthly email option.

    2. Change your email address to whatever@softbank.ne.jp using the phone’s built-in WAP browser (it’s probably a yahoo! button). There is hyperlink to change the language to english.



  4. Patch commcenter on your iPhone. If you skip this step you will lose settings on each reboot.

  5. Set up iPhone to accept new settings

    1. Move sim card from your Japanese handset to the iPhone.

    2. Use SSH and your favorite text editor to backup and then edit the following file:

    3. /System/Library/Carrier Bundles/Softbank_jp.bundle/carrier.plist

    4. Add the following lines, directly below at the top of the file

      1. AllowEdgeEditing






  6. Change settings to allow MMS on your iPhone using your @softbank.ne.jp address

    1. Go to settings>messages

      1. Turn “MMS Messaging” to “on”

      2. Put your @softbank.ne.jp address in the “MMS Email Address” field



    2. Go to settings>general>network>cellular data network

      1. In the “cellular data” section, blank all fields







      1. In the “MMS” section, make sure the following are set:

        1. APN: mailwebservice.softbank.ne.jp

        2. Username: softbank

        3. Password: qceffknarlurqgbl

        4. MMSC: http://mms/

        5. MMS Proxy: smilemms.softbank.ne.jp:8080 sbmmsproxy.softbank.ne.jp:8080

        6. MMS Max Message Size: 307200

        7. MMS UA Prof URL:








That’s it. You should now be able to send end receive emails with your @softbank.ne.jp address using the messages app (not the mail app) on your iPhone, as well as make and receive voice calls. There are multiple ways to do steps 5 and 6, such as installing a text editor on your iPhone, but I didn’t do it that way so I can’t recommend it. Apologies for the weirdly formatted ordered list.

Update: I was getting frustratingly sporadic MMS functionality. I found that it would always work right after a reboot, but not some minutes later. I found a different MMS proxy to use that seems to be working reliably.

Occasionally (I think if the sim card is jostled or if a no-service region is entered, the APN settings get reset and MMS stops working. I haven’t found a way around this yet. It might be possible to lock the carrier settings file (using unix permissions) so that iOS can’t change it.

Fare cards in Vancouver

This is a sloppy repost of a reddit comment I made, but I wanted to put it out there.

We have known for some time that against all sound advice, Vancouver has decided to move towards fare cards. The issue at hand has always been fare evasion, even though installing and running the new system will cost more than it saves. An article today suggests that this could mean a move to distance-based fares. This is a horrible idea for Vancouver

The three zone system is already more expensive to use than other similar size cities with “OK” transit. But I it’s a reasonable tradeoff to encourage people to work close to where they live without being so expensive that they just move even farther away and drive everywhere. This change might make sense from a short-term budgetary standpoint (see below), but Translink is supposed to have a mandate to increase ridership and reduce environmental impact of transportation in the area, not just to balance a short-term budget.

It finally makes sense to me why they are putting the system in place now -so they can charge for distance travelled. I know this is only one possible configuration of the cards, but it’s the only one that adds up.

In Vancouver, renting in the suburbs is quite a bit cheaper than living close to downtown. It’s already fairly inconvenient for a lot of suburbanites to use transit, but even with a three zone pass for working downtown, one can save a lot of money by living in Delta or Surrey. Right now the balance of convenience and cost means most people drive. This change could potentially move the balance so that even more people choose to drive. We need to shift the balance the other way.

I my perfect world I would shift the balance like this: transit users would indeed pay for distance travelled, but motorists would too. Motorists are charged taxes on gas now, but it is nowhere near the actual cost of road construction/maintenance per kilometre travelled. Motorists would also pay congestion charges like those in London to bring the externality of making downtown suck into the equation. Imagine a downtown with several pedestrian areas, like Granville street was for a brief time.

Politically, that’s just not going to happen. So we need to keep flat-rate transit to compete with (almost) flat-rate driving.

Before the suggestion of distance-based fare, I couldn’t figure out how the change was justified. Fare evasion is a small problem, by Translink’s own numbers. Using fare check staff like they already do on Canada line is a pretty cheap way to deal with the problem, instead of putting in turnstyles. Turnstyles require staff at each gate anyway (that’s at least two per station) to prevent hop-overs and help wheelchairs, new customers, people that payed too little/too much, etcetera, through the process.

I am not totally opposed to distance-based fare in all cases. It works in the mature systems of London and Tokyo because it is convenient to take transit compared to other modes. You can charge more and people will still pay for the convenience. We are not at that stage in Vancouver yet. We need a cost incentive to continue to increase ridership.

At a very basic level, I think public transit development should work as follows:

1. Increase ridership to:

2. Justify an increase in convenience (add routes and frequency). Repeat 1 and 2 until service is worth more so:

4. Increase cost per distance travelled to:

5. Pay for an increase in convenience to:

6. Increase ridership

In steps 1 and 2, you have to use quality of life and environmental justifications. Once you get to 4,5,6, you can use money to make decisions, and reach an equilibrium of convenience and fare people are willing to pay. We are in steps 1 and 2 now. Making changes now that do not increase ridership or convenience will doom our transit system to stagnation, or even decline.

One more corollary I wanted to add, but wasn’t sure where to fit it in: any decrease in convenience should not decrease cost to the user. Vancouver does a good job of this right now, which is rare for North America. In most cities, transfers between routes add cost to the journey. I’m worried that distance-based fares will do this, as transfers tend to make your route indirect. This really screws up city planning, because it encourages 1970s style infrequent, circuitous, transfer-free routes instead of a grid of routes with frequent vehicles.

tl;dr

Politically, we can’t make motorists pay actual per distance costs, so we shouldn’t make transit users do the same thing. The proposed per-distance fare will shift the balance even more towards motoring and encourage 1970s transit planning. We need to make transit better now, even at a monetary cost to increase ridership. It’s worth it for quality-of-life and it’s the only way to balance the transit budget in the long term. You can’t force transit to make money, you have to make it convenient enough to compete with other modes.