Phidget SBC – Huawei E1752 3G USB modem – Part2

January 23rd, 2010 by Lars-Georg Paulsen

Happy days!

Well, the segmentation fault when running any network releated commands, was due to a issue in getaddrinfo.c in the uClibc library. When I applied a patch found on the maillist at busybox.net it worked.

It sounds really simple, but there was a lot of trying and failing before I got it right. It short steps, this is what I did.

Step1 - Download source from Phidget.com and do an initial
#>make && make clean

Step2 - Applied the patch for getaddrinfo.c

Step3 – Added usb_modeswitch as a package from busybox

Step4 – Main configuration
#>make menuconfig
– Target options –> Phidget SBC Support –> Choose a release type (full)
– Package Selection for the target
(*) usb_modeswitch
(*) pppd

Step5 – Linux kernel configuration
#>make linux26-menuconfig
(m) Usb Serial Convert support – #Change from compiled into kernel to module
(*) Generic Serial
(m) Usb Driver GSM and CDMA modems
(*) PPP

Step6 - Create the final build
#>make

Flash the SBC, and you will have support for your 3G modem. You also need to change your usb_modeswitch.conf to include the switch for E1752. I also recommend to make a udev rule for an automatically switch.

Now you should have support for you Huawei E1753 Modem, now it was time to setup opp pppd. I found a really good thread on a Norwegian forum, witch had some detail information regarding pppd and chat scripts. With some modifications this worked as a charm on my setup.

The end result:

# uname -a
Linux Pilot 2.6.32.3 #3 PREEMPT Fri Jan 22 08:09:47 CET 2010 armv4tl unknown
# lsusb
Bus 001 Device 005: ID 12d1:1001 #This is the Huawei E1753 3G Modem
# pppd call netcom
# ping dev.n0ll.com
PING dev.n0ll.com (93.124.192.66): 56 data bytes
64 bytes from 93.124.192.66: seq=0 ttl=50 time=391.774 ms
64 bytes from 93.124.192.66: seq=1 ttl=50 time=390.239 ms
64 bytes from 93.124.192.66: seq=2 ttl=50 time=385.180 ms
64 bytes from 93.124.192.66: seq=3 ttl=50 time=380.198 ms
64 bytes from 93.124.192.66: seq=4 ttl=50 time=395.199 ms
^C
— dev.n0ll.com ping statistics —
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max = 380.198/388.518/395.199 ms

Still some small scripting to have an automatic process connecting to the internet. Like default routing, resolve and dial only when I want to send my data (probably going to use cron for that). But the base system seams to work now, just need to add the sensors and start collecting data!

Phidget SBC – Huawei E1752 3G USB modem

January 20th, 2010 by Lars-Georg Paulsen

After receiving my new gadget, a Phidget SBC unit. I’ve been having a go at it.
The main goal is to have a remotely place SBC unit, with sensor measuring water levels, sending data back to central server over 3G network and powered by battery.

Since I haven’t received my sensor unit, I’ve been trying to get the 3G USB modem part up and running. Using a Huawei E1753 as a USB modem, it has not been a walk in the park. The first step was to learn how a embedded system works. Then how Buildroot, busybox and uClibc is configure and modified. Flashing the SBC unit after each change, made this process really time consuming, but it looks like the 3G modem is now recognized by the SBC.


user.info kernel: option 1-1.2:1.0: GSM modem (1-port) converter detected
user.info kernel: usb 1-1.2: GSM modem (1-port) converter now attached to ttyUSB0

Next step is now, either port WvDial to buildroot, or get around ppp/chat configuration. Not sure witch one is fastest. But I’ll get there eventually. A Project page will appear on the site shortly.

*** update
ppp/chat was the way to go… I actually managed to get connected, but somethings is wrong. All network application segments fails when used after the ppp connectin is up and running. Disconnecting the ppp, all applications works again (eg ping/ftp/ssh)..

Surfing Morocco, skiing in Hemsedal

January 16th, 2010 by Lars-Georg Paulsen

December was one of the best month last year. Went to Morocco for a week on a surf holiday on the 12th of December, coming back to celebrate Christmas with my family, and then headed for Hemsedal for some wicked skiing and partying over new years!

Apparently it’s only suppose to rain about 5 days during December. Guess we got lucky and got about all of them. But lucky for us, it usually only rained during the morning. And the rain didn’t bother us that much. We where in the water anyway. We stayed at Surf Berbere, and small surf camp in Taghazout. Atmosphere and the people there where great, and is definitely a place we can recommend for other who is going to Morocco for a surf! Just remember one thing…. It’s a dry town, so bring spirits! The guys at the camp organizes a beer-run into Agadir, so you place an order with them..

Silje, the sexy ghettosmurf

New Years eve in Hemsedal was blast, but I somehow lost my camera between the After-Ski, and the cabin…. So no pictures..

I’ve also just ordered a SBC unit from Phidget.com, so my water level project is under construction. More on that at a later stages.

Just wanna wish everyone a happy new year.. and let 2010 be even more extraordinary then 2009. Bring it on!

The Solo-Mission!

December 2nd, 2009 by Lars-Georg Paulsen

solo

“Solo hjelper bare mot tørsten”
That is the slogan for Solo, a Norwegian soda. It means that it will only cure thirst…. And I guess it’s true. Finally the water level in Akerselva was at a good flow again, and all my mates where working, or busy with other stuff. So then I decided to go on a mission. A Solo-Mission

map
Blue=Walking, Red=Train/subway, Yellow=Kayaking

The mission was simple, go alone, go only by public transport or by kayak!
Trip started with a walk up to Grefsen Station. Not that fare, but when you racing against the clock to make the train, it’s super exhausting. Guess I’m not that good of prediction time, so a reached the train station well before the train left. Next move was to get the kayaking onto the train, kinda impressed myself there, and got a LOT of strange looks when I got on. But all good when I reach my end of the train section: Kolsås!

Short walk down to the river, before heading downstream.
The first bit is super easy, and it does not get exciting before you hit the big dam before Nydalen. After that you have nice little stretch with some small drops and rapids before you have to walk around a tunnel.. Then your off again with artificial riverbed, and people still looking very surprised when you float downstream.

The fun thing about doing solo kayaking in a urban river is that your not all by yourself. There is people everywhere. And when doing the biggest rapid of the day. A super cool drop, I kindly asked some random people to take a pictures of me running it.

bigrapid

They got so impressed so when I hit the next rapid a little bit further down stream, they where more then happy to take another pictures!

bigrapid2

After that it was just a mellow run down to the subway, and bitch of a walk up to my apartment again. So, when the water level is up and running again in Akerselva, don’t be surprised if you see me floating down the river by my self.. again…….

Why?

December 2nd, 2009 by Lars-Georg Paulsen

When ever I talk about websites, I usual starts and end with “The most important thing, when it comes to websites, is that you need to keep it updated”. Well, I guess that has a double meaning today…..

Yesterday I spent quite some time updating a Wordpress site. Just the normal updates, and fixing some design issues. But when I tried out the rss2 feed, I kind of got surprised. In almost every post, there where huge amount of link to Movies, Porn, other none-sense websites. But I couldn’t seen it when I surfed the site…. After a bit research I found that there where huge amounts of; “style=”display:none”. Posted in all kind of formats, using form, div, p, tags…

After doing some more research, I found out that they actually managed to put their malicious code in every post and one every page on the web page. How the !”#!$%! was I gonna fix this… I actually started removing it by hand…. but found out quickly that this was going to take forever. Then I downloaded the sql file, to look for patterns. Maybe I could simple do a ’search & delete’. But I got to give it to them, they have been clever. There was to many combination. As I already said, they used different types of tags, and they inserted the malicious code in random place (not exactly, but nothing that would make a search&delete easily work).

Cruising through the website via ssh, I came over and old script I made, and a directory with backups of the database! Doing a quick check of all modified post/pages, I found out that most modification had been done in the last couple of days. A week old backup of the sql, cleared out 99% of my problem, and I got away with manual editing three pages… So the I’ll say it again. “Update your web page, to get your visits, and update your site code so that you don’t get visited by the wronge people…” And better safe then sorry, do backup!!!!!!