Network fun on Symbian

Been writing some network code for S60, using the HTTP stack for the first time (Jaiku has its own, crappy, stack because it used to run on 6.1). Couple of things that wasted me a day, once again:

I tried to do the simplest possible HTTP request, so I basically ignored all the callbacks except for the ones that indicate completion. Never got the ones for completion. Much swearing about active objects later I found out that this time I _wasn’t_ messing up my event handling – instead there’s a ‘feature’ in the stack: you have to consume the body of the response, otherwise the request never completes. So the minimal HTTP request handling needs to include something like the code below:

case THTTPEvent::EGotResponseBodyData: {
  MHTTPDataSupplier* body = aTransaction.Response().Body();
  body->ReleaseData();
}

The other fun was buggering up my commsdb. I was getting a panic in the ethernet driver when letting the HTTP stack open the connection on its own and decided to go and look at the access points in the Settings app on the emulator. Without thinking I opened the Winsock access point and closed it, which overwrites some of the settings with nonworking things. Now I wasn’t able to manually open any connections either.

So off I go to recreate the commsdb by doing a ceddump on a working SDK and a ced on the non-working one. This doesn’t exactly make things better. After that the emulator would just hang when I opened any application, with no clues as to what whatsoever (other than that I knew it happened after I did ced).

Turns out ced had not completed the commsdb changes, leaving it in a state that would hang the emulator (I think when loading messaging modules and/or networking modules).

The way to get ced to complete is to start it and when its screen gets replaced by the menu, find it in the task switcher and switch to it.

F. U. N. Endless fun.

This entry was posted in Symbian. Bookmark the permalink.

197 Responses to Network fun on Symbian

  1. hi, my name is nuha,an indonesian, i’m in trouble in accessing..
    where can i get etelbgsm.h and hwtrick.dll?
    can i get the data about signal strength? or maybe the time slot processing too?
    please,reply me soon,..