Re: Writing my own Free Plain Phone sw distro for GTA02

2011-09-22 Thread Philip Rhoades

MS,


On 2011-09-20 12:27, msoko...@ivan.harhan.org wrote:

Hello again,

Thanks to everyone who has responded to my introductory post with
helpful tips and suggestions!

Radek Polak  wrote:

As for good power management - it's given by HW design and linux 
kernel.

You can't affect very much from userspace.


But doesn't the userspace need to tell the kernel when some things
should be powered up or down?  Things like the LCD, the backlight, 
the

audio codec...


You can get 4-5 days on one battery charge,
if the phone is in suspend (PMU+RAM+modem is on, rest if off).


That's very good to hear!  I was a little afraid of the FreeRunner 
being

a charge 2-3 times a day type of deal: that's what some sources were
suggesting.  Glad to hear that the original Om developers did a good 
job
building the HW such that it *can* provide "normal phone" battery 
life,
assuming that of course the software does its part properly as well 
and

does not needlessly waste power.


Btw why X11 for such project? Wouldnt be framebuffer enough?


I've been thinking about going the X11 route for two reasons:

* My personal programming comfort zone: I've written X11 apps using 
just
  libX11, and I'm comfortable with it.  If I want to put a piece of 
text

  on the screen, I can just ask X11 to do it for me, exactly the same
  way as how I do it on the 1980s UNIX workstations which stay back 
in
  my office while I roam around with my FR. :-)  If I went the 
directfb

  route, I would have to learn how to use some text/font rendering
  library outside of X11.  Yes, my project is all about learning, but
  I'm interested in more focused learning: I want to learn how to 
make
  my phone place and answer voice calls, not how to use whatever is 
the
  "modern Linux" world's preferred text/font rendering library du 
jour.


* X11's client/server architecture is generally viewed as a nuisance 
in

  the embedded world, but it might actually help me split my UI code
  into more manageable pieces.  I tentatively plan on having a main 
UI

  daemon, but some pieces could be split off into separate programs.
  For example, upon getting an incoming call (MT = Mobile Terminated 
in
  GSM-speak), I could make my gsmd fork/exec off an mtcall process; 
the

  mtcall binary would then connect to the X11 server and display a
  window showing the number and/or contact name of whoever is 
calling.


All of the above are just my tentative thoughts, I may well end up
choosing a different approach when I actually get into it.  I have a
strong dislike for abstract-ware, so I need to hold the hardware in 
my
hand before my brain can really kick into gear and decide how I 
should

write the software for it.

I am still waiting for my GTA02 to arrive, and until I get it I am
limited to fairly idle speculation. :-(

Denis 'GNUtoo' Carikli  wrote:


feature phone is also non-derogatory and means exacty the same thing


I don't think it means the same thing though: as I understand it, 
people

generally use the term "feature" in "feature phone" to refer to
non-basic-telephony features: camera, mobile web browser, integration
with AIM/Yahoo/Facebook/whatever, all that stuff I hate with a 
passion.


A phone that does voice calls, SMS, and absolutely positively nothing
else would not be a "feature phone" to most people, it would be a
featureless phone.  That is what I am after, and that is what I call 
a

Plain Phone.

Actually, I need to clarify a little: I'm not against the 
non-telephony

features per se, I just consider them much less important.  I can see
how *some* non-telephony features, such as GPS+openstreetmaps for
navigation in a car when I get lost, would be a useful thing to have 
on

the phone even for me.  *After* I put together my "featureless" Free
Plain Phone distro, I may well become interested in making an 
extended
version of it with some non-telephony features added.  But not 
before:

I want a really good Plain Phone first.

Part of it is just natural resistance: if someone were to constantly
keep forcing some particular type of food down your throat, you'd
naturally develop a hatred for it pretty quickly, even if it's 
something

you would find tasty under different circumstances.  That's how it is
for me with "smart" and "features" phones.

For many years now I have become disgusted with the kind of phones 
that

are made, sold and bought by the mainstream society nowadays.  And it
isn't even the phones themselves, it's where the makers, promoters 
and

ultimately buyers/users of these phones put their emphasis.  Over the
past many years now, every time I've been compelled into shopping for 
a
new phone (be it a change of carrier, or old phone broke, or 
whatever),

I've been bombarded by disgust: the phone salespeople keep focusing
their sales pitches on non-telephony features.  It seems to me that 
the
phone industry and its user community have become so obsessed with 
their
phones doing everything but basic telephony functions, that

Re: Writing my own Free Plain Phone sw distro for GTA02

2011-09-19 Thread Michael Sokolov
Hello again,

Thanks to everyone who has responded to my introductory post with
helpful tips and suggestions!

Radek Polak  wrote:

> As for good power management - it's given by HW design and linux kernel.
> You can't affect very much from userspace.

But doesn't the userspace need to tell the kernel when some things
should be powered up or down?  Things like the LCD, the backlight, the
audio codec...

> You can get 4-5 days on one battery charge,
> if the phone is in suspend (PMU+RAM+modem is on, rest if off).

That's very good to hear!  I was a little afraid of the FreeRunner being
a charge 2-3 times a day type of deal: that's what some sources were
suggesting.  Glad to hear that the original Om developers did a good job
building the HW such that it *can* provide "normal phone" battery life,
assuming that of course the software does its part properly as well and
does not needlessly waste power.

> Btw why X11 for such project? Wouldnt be framebuffer enough?

I've been thinking about going the X11 route for two reasons:

* My personal programming comfort zone: I've written X11 apps using just
  libX11, and I'm comfortable with it.  If I want to put a piece of text
  on the screen, I can just ask X11 to do it for me, exactly the same
  way as how I do it on the 1980s UNIX workstations which stay back in
  my office while I roam around with my FR. :-)  If I went the directfb
  route, I would have to learn how to use some text/font rendering
  library outside of X11.  Yes, my project is all about learning, but
  I'm interested in more focused learning: I want to learn how to make
  my phone place and answer voice calls, not how to use whatever is the
  "modern Linux" world's preferred text/font rendering library du jour.

* X11's client/server architecture is generally viewed as a nuisance in
  the embedded world, but it might actually help me split my UI code
  into more manageable pieces.  I tentatively plan on having a main UI
  daemon, but some pieces could be split off into separate programs.
  For example, upon getting an incoming call (MT = Mobile Terminated in
  GSM-speak), I could make my gsmd fork/exec off an mtcall process; the
  mtcall binary would then connect to the X11 server and display a
  window showing the number and/or contact name of whoever is calling.

All of the above are just my tentative thoughts, I may well end up
choosing a different approach when I actually get into it.  I have a
strong dislike for abstract-ware, so I need to hold the hardware in my
hand before my brain can really kick into gear and decide how I should
write the software for it.

I am still waiting for my GTA02 to arrive, and until I get it I am
limited to fairly idle speculation. :-(

Denis 'GNUtoo' Carikli  wrote:

> feature phone is also non-derogatory and means exacty the same thing

I don't think it means the same thing though: as I understand it, people
generally use the term "feature" in "feature phone" to refer to
non-basic-telephony features: camera, mobile web browser, integration
with AIM/Yahoo/Facebook/whatever, all that stuff I hate with a passion.

A phone that does voice calls, SMS, and absolutely positively nothing
else would not be a "feature phone" to most people, it would be a
featureless phone.  That is what I am after, and that is what I call a
Plain Phone.

Actually, I need to clarify a little: I'm not against the non-telephony
features per se, I just consider them much less important.  I can see
how *some* non-telephony features, such as GPS+openstreetmaps for
navigation in a car when I get lost, would be a useful thing to have on
the phone even for me.  *After* I put together my "featureless" Free
Plain Phone distro, I may well become interested in making an extended
version of it with some non-telephony features added.  But not before:
I want a really good Plain Phone first.

Part of it is just natural resistance: if someone were to constantly
keep forcing some particular type of food down your throat, you'd
naturally develop a hatred for it pretty quickly, even if it's something
you would find tasty under different circumstances.  That's how it is
for me with "smart" and "features" phones.

For many years now I have become disgusted with the kind of phones that
are made, sold and bought by the mainstream society nowadays.  And it
isn't even the phones themselves, it's where the makers, promoters and
ultimately buyers/users of these phones put their emphasis.  Over the
past many years now, every time I've been compelled into shopping for a
new phone (be it a change of carrier, or old phone broke, or whatever),
I've been bombarded by disgust: the phone salespeople keep focusing
their sales pitches on non-telephony features.  It seems to me that the
phone industry and its user community have become so obsessed with their
phones doing everything but basic telephony functions, that perhaps if
someone came out with a new cool smartphone that browses the web, goes
to Facebook, does GPS, displa

Re: Writing my own Free Plain Phone sw distro for GTA02

2011-09-18 Thread Neil Jerram

On Sat, 17 Sep 2011 22:04:45 GMT, msoko...@ivan.harhan.org wrote:

weeks (intercontinental shipping and all).  But the real purpose of 
this
introductory post of mine is to announce what I plan to do with it: 
my
desire is to write my own from-scratch Free Plain Phone software 
distro

for it.


That's an interesting post and new project, and I think I understand 
your motivation.


On the GSM front, however, you may want to consider the DeforaOS code 
at http://www.defora.org/os/project/browse/3343?file=/src.  It was also 
written from scratch, in C, and to be minimal (compared to something 
like FSO or oFono), and I think it may be small enough for you to feel 
happy studying it instead of reimplementing it yourself.


Regards,
Neil


___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: Writing my own Free Plain Phone sw distro for GTA02

2011-09-18 Thread Denis 'GNUtoo' Carikli
> In order words, the phone functionality I am after is what people would
> call a "dumb" phone, or I prefer to call it a Plain Phone to use a more
> neutral / non-derogatory term.
feature phone is also non-derogatory and means exacty the same thing
> Learning motivation: that's the biggest one for me.  I am a knowledge
> freak.  I want to know, know, know.
check out the wiki, there is explanation on how the hardware works
there...
> 
> I realize that I will unfortunately have to treat the Calypso GSM block
> as a black box.  If I had a spare million dollars laying around, I could
> probably find an ex-Openmoko-Inc employee whom I could bribe for an
> illegal copy of the 3 missing schematic sheets and of whatever mix of
> partial source and linkable binary/object modules I'm guessing they must
> have had for the Calypso firmware: still not stellar, but better than
> what the community currently possesses, which is a block diagram on
> schematic page 14 and a fully-built FW image.  But I don't have a spare
> $1M laying around, so that is probably not an option. :-(
learn about osmcombb, however it's not a drop-in replacement as it lacks:
*an AT command interpreter part(however they have an abandoned nuttx
port)
*any kind of certification needed for connecting to carrier networks
> But even with the GSM modem being a black box sequestered behind a serial
> port,
still that's not so bad, the GSM modem doesn't control the CODEC(the
"sound card") nor the GPS.

> As a more concrete example, I don't want my UI to use either GTK or Qt,
> and in fact I don't want any pre-existing UI code period: I want to
> design and implement my own UI 100% myself.  My UI design will be rather
> monolithic, centering around Plain Phone functionality: making and
> receiving plain old voice calls on the GSM network, receiving, replying
> to and composing SMS, managing contacts, and that's about it.  (*No*
> "apps" or the like.)  I will implement my Plain Phone UI in plain C
> using just libX11, no GTK or Qt, because that's my programming comfort
> zone.
too bad because there was already a feature-phone distro called aurora,
but its GUI is in QT(using the framebuffer), but yet very basic.
> I also don't like dbus: too modern for my taste.  Hence I will need to
> implement my own version of gsmd that doesn't depend on dbus or any
> other infrastructural backbone of a "modern" Linux distro.
too bad that rules out freesmartphone, which is a great hardware
abstraction layer. if you would use freesmartphone you could have
written the GUI quickely enough to make it a reality.
> 1. Learn the process for loading new code images into the phone, build a
>very basic rootfs image (using the techniques and principles from my
>HEClinux-am3517 project) that does nothing other than allow an ssh
>root login over the USB port, load it, get it to boot (debug board
>with serial console bring-out for the win!) and get the USB login
>to work.  Try doing it with the battery removed (USB power only) if
>possible.
just read the wiki for that.
> 2. Write the first inklings of the battery charger daemon: minimal power
>management code to enable battery charging and control the USB
>current draw limiter.  Charge the battery and see it boot w/o USB
>power.
battery charging is done in the kernel.
> 3. Write the first minimal gsmd.  Have it save incoming SMS in an
>"airlog" file with no UI.  Try placing an outbound call or sending
>an SMS from the command line (from the shell accessed via USB port
>login session).
> 4. Write the bottom layer of my own UI, roughly taking the place of the
>X11 window manager.  Have the userland display *something* on the LCD.
why not using framebuffer directly?

Denis.


___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: Writing my own Free Plain Phone sw distro for GTA02

2011-09-18 Thread Radek Polak
On Ne 18. září 2011 00:04:45 msoko...@ivan.harhan.org wrote:

> Hello Openmoko community,
> 
> I have just ordered my GTA02 hardware unit from Golden Delicious a few
> days ago, and I greatly look forward to receiving it in the next few
> weeks (intercontinental shipping and all).  But the real purpose of this
> introductory post of mine is to announce what I plan to do with it: my
> desire is to write my own from-scratch Free Plain Phone software distro
> for it.  (More specifically, take the existing & working U-Boot and the
> Linux kernel with no or just minor changes, but bring up my own userland
> from the ground up.)  Before anyone tells me that I'm crazy or why in
> the world do I wish to do that, let me list my primary motivations:

Hi,
you have chosen openmoko very well for your project. Just a few notes that 
might be interesting for you:

As for good power management - it's given by HW design and linux kernel. You 
can't affect very much from userspace. You can get 4-5 days on one battery 
charge, if the phone is in suspend (PMU+RAM+modem is on, rest if off).

Take a look at http://wiki.openmoko.org/wiki/OpenWRT - they have also very 
minimal userspace (just few megabytes) and nice kernel-like build system.

Btw why X11 for such project? Wouldnt be framebuffer enough?

Anyway good luck with your project, let us know if you have something working.

Regards

Radek

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Writing my own Free Plain Phone sw distro for GTA02

2011-09-17 Thread Michael Sokolov
Hello Openmoko community,

I have just ordered my GTA02 hardware unit from Golden Delicious a few
days ago, and I greatly look forward to receiving it in the next few
weeks (intercontinental shipping and all).  But the real purpose of this
introductory post of mine is to announce what I plan to do with it: my
desire is to write my own from-scratch Free Plain Phone software distro
for it.  (More specifically, take the existing & working U-Boot and the
Linux kernel with no or just minor changes, but bring up my own userland
from the ground up.)  Before anyone tells me that I'm crazy or why in
the world do I wish to do that, let me list my primary motivations:

Motivation 1, which can also be seen as a simplification of the task: I
am quite different from most free-your-phone hackers in that from the
functionality POV, I have absolutely no interest in a "smart" or
"feature" phone.  I have no interest in cameras, BT, Wifi, VoIP or
heavy-duty PDA functionality; I don't need my phone to display fancy
color graphics or play music in stereo.  Instead what I want is a phone
that I can carry in my pocket with good power management, i.e., use the
absolute minimum power required to stay registered with the cell network
and be ready to receive incoming calls and SMS while everything else is
powered off, I want this phone to ring when someone calls, I want it to
beep when someone sends me an SMS, and I want to be able to pull it out
of my pocket and wake it up to place an outgoing call or send SMS.

In order words, the phone functionality I am after is what people would
call a "dumb" phone, or I prefer to call it a Plain Phone to use a more
neutral / non-derogatory term.  Basically the kind of functionality GSM
phones had in the 1990s and early 2000s.  (And for me it isn't just the
level of functionality: I'd like to make the user experience as close as
possible to those ancient phones as well.)  With my Free Plain Phone SW
distro I would like to take the FreeRunner/GTA02 hardware unit and make
it function as a Plain Phone, recreating that rustic user experience and
level of functionality.  I'll keep the Wifi, BT, GPS and G sensor
modules always powered off at the PMIC and basically forget about their
existence, and instead focus on power management, talking to the GSM
modem block and doing the rustic Plain Phone UI.

Seen from this perspective, what most people see as major shortcomings
of the FreeRunner's HW capabilities are actually advantages for me.  For
example, I have absolutely no interest in using my phone as a web
browser or doing any other "data as in Internet" activities on my phone.
Don't get me wrong, I like the idea of being able to check my email,
look something up on the web or ssh into my server back at home from the
side of a road in the middle of nowhere.  And I do use a mobile device
for those functions - but I use a different mobile device, one with a
full-size screen and a full-size keyboard.  That mobile device is called
a laptop - not a phone.  What I'm getting at is that I see absolutely no
need for UMTS/3G/4G in a phone: UMTS better belongs in a laptop or a USB
stick plugged into one.  Thus to me a phone like GTA02 that supports
only plain GSM and no UMTS is a welcome simplification rather than a
drawback.

At this point one may well ask: "If your needs are so basic, why do you
want a Linux phone at all? Why not just get a 10 y old phone from Ebay
and be happy with it?"  Well, I do in fact use such an ancient phone
right now: I've used it to confirm that plain non-UMTS GSM1900 coverage
is still available with good signal strength in all of the local spots I
care about.  But here are the reasons why I want to build my own Free
Plain Phone functionality on a HW platform like GTA02 rather than use an
existing one from 10 y ago:

Philosophical motivation: I believe in freedom as a principle, much like
Richard Stallman.  Being a basic philosophical principle, freedom is
essentially orthogonal to technological preferences.  In my mind the
idea of freeing your phone should not be restricted to just "smart"
phones chock-full of fancy features; "dumb" or plain phones deserve to
be free too!

Learning motivation: that's the biggest one for me.  I am a knowledge
freak.  I want to know, know, know.  Like many people nowadays, I carry
my phone with me everywhere, the only exceptions being places like
showers.  It's an electronic device that sits within centimeters of me
all the time.  As such, the idea of this device being a closed/proprietary
black box over which I have no control is very bothersome to me.  But if
I write my own userland software stack for the GTA02, i.e., implement
100% my own UI, my own version of gsmd talking to the GSM modem, etc, I
can aim for the ultimate understanding of my phone.  I can use it exactly
the way I use my current Mot V66 (a classic/ancient Plain Phone, exact
same GSM bands as GTA02), but with an extra twist: every time I press a
button on the screen, every time I make