Subject: [E3-hacking] Any more chances for E3 working as IP phone?

From: Janusz Krzysztofik <[email-masked]>
Date: Sun, 3 May 2009 22:05:36 +0200

Hi,

Greetings from new list member.

I have bought E3 recently in hope I could use it as IP phone, or even POTS 
phone with extra newtworking features. I alread have asterisk running on it, 
controled from keypad via lirc, with led provided visual feedback. Two parts 
are missing: working sound driver for handset/speakerphone and input driver 
for hook switch. It looks like most develompents have ceased about 2 years 
ago, but I have some questions if you are still there.

Question to Mark Underwood:
Are you still working on E3 sound driver? If not, what blockers can you see? 
Maybe I could help.

Questions to Jonathan McDowell, maybe others:
1. Did you succeed in talking to the handset over the modem chip in full 
duplex?
2. Did you try to create a driver for hook switch hanging off GPIO input 4, as 
Matt Callow detected it once? If not, what hints could you give me for 
creating one?
3. As googling did not give me any answer, where can I find any info on Q;Q; 
block format?

Question to Martin Whitaker:
Have you successfully setup your device for making voice calls with handset 
over the modem using AT commands?

More questions:
1. Has anyone managed to boot a kernel built from Amstrad provided sources 
(linux-2.4.18-mv30-E3.tar.bz2)?
2. What is the format of a copy of the kernel taken from the device 
(kernel2.4.18_mvl30-ams-delta)? Has anyone managed to boot it with u-boot or 
other open source loader?
3. Has anyone managed to make any use of flash image backups, for example, for 
examining filesystem contents?

Thanks,
Janusz

---

From: Janusz Krzysztofik <[email-masked]>
Date: Thu, 07 May 2009 15:10:15 +0200

Hi,

As Martin Whitaker has answered my question off-list, I am replying to 
myself quoting him, with his permission.

Martin Whitaker wrote:
> Yes, I have managed to make normal POTS phone calls, using the handset,
> using AT commands.

Hi Martin,

It's good to hear that I still have a chance to use my E3 as a plain 
phone if not IP. What about accepting calls, were you able to make your 
E3 ringing on someone calling you over the modem? Was it possible 
without a working sound driver?

> I even got as far as writing a simple phone application,
> however it wasn't especially useful as it depended upon a frame buffer based
> graphics library that wasn't directfb

I took a different approach, trying to use existing building blocks, 
like asterisk, lirc, etc., coupled with custom scripts. If it ever turns 
out to slow, I can look for a more efficient solution then. Anyway, any 
ideas you have put into your application could be usefull.

> and also depended upon a kernel mod
> I'd done which made the on/off hook button send a keystroke (this was
> trivial btw - I'll see if I can make a patch for that too).

That would be great. I have already managed to detect hook state without 
any coding, using sysfs interface of the 2.6.27 gpio driver, but this 
does not generate any events so is only suitable for polling. Maybe the 
simplest way to get input events now a days would be to use gpio-keys 
driver over an ams-delta specific platform device with setup logic and 
configuration data saying which GPIO is used.

> I'm happy to share the source (if I can find it again), however it may be a
> few days before I'm in a position to look for it.

That's fine, I can investigate other work needing areas in the mean time.

> I haven't touched the E3 in years now, although I'd like to play with it
> again. I'd quite like to get it up to the latest kernel version,

Yes, if we think of further development, porting existing patches to the 
latest kernel version is essential. For now, I have tried 2.6.27, the 
latest one with omap patch available on www.muru.com. I have managed to 
port 2.6.19 ams-delta-keyboard.patch (tested - works for me) and 
ams-delta-modem.patch (builds, loads, responds to AT commands, needs 
more testing). Next step would be to go for latest versions available 
from git repositories, that is still some kind of magic for me how to 
merge it into openembedded, but I could try.

I am going to post modified patches here, but am not sure how to include 
them - inline or as attachments.

Regards,
Janusz

---

From: Jonathan McDowell <[email-masked]>
Date: Wed, 13 May 2009 09:24:22 +0100

On Sun, May 03, 2009 at 10:05:36PM +0200, Janusz Krzysztofik wrote:
 
> I have bought E3 recently in hope I could use it as IP phone, or even
> POTS phone with extra newtworking features. I alread have asterisk
> running on it, controled from keypad via lirc, with led provided
> visual feedback. Two parts are missing: working sound driver for
> handset/speakerphone and input driver for hook switch. It looks like
> most develompents have ceased about 2 years ago, but I have some
> questions if you are still there.

I've actually compiled up a kernel more recently than that to check it
still built ok, but haven't done anything much with the E3 recently.

> 1. Did you succeed in talking to the handset over the modem chip in full 

No. I did wonder if boosting the speed to 230.4k rather than just 115.2k
might help.

> 2. Did you try to create a driver for hook switch hanging off GPIO
> input 4, as Matt Callow detected it once? If not, what hints could you
> give me for creating one?

I had this hooked up to the OMAP gpio switch framework, but I found it
conflicted with the FIQ keyboard patch and caused crashes. Possibly the
gpio-keys driver is the way to do this these days?

> 3. As googling did not give me any answer, where can I find any info
> on Q;Q; block format?

If you limit Google to the list archives you should have more luck.

> (linux-2.4.18-mv30-E3.tar.bz2)?

I haven't.

> (kernel2.4.18_mvl30-ams-delta)? Has anyone managed to boot it with
> u-boot or other open source loader?

I didn't really investigate it. 2.4 doesn't interest me.

> 3. Has anyone managed to make any use of flash image backups, for
> example, for examining filesystem contents?

Yes, you can dump the contents but I don't recall anything of real
interest there.

J.

-- 
Do you believe in happy endings?
This .sig brought to you by the letter S and the number  3
Product of the Republic of HuggieTag

---

From: Janusz Krzysztofik <[email-masked]>
Date: Wed, 13 May 2009 17:16:36 +0200

Hi,

> still built ok, but haven't done anything much with the E3 recently.

Using OpenEmbedded, linux-omap_git.bb with slight amsdelta related 
additions actually works for me. Power nanagement must be off, otherwise 
omapfb framebuffer does not work correctly.
Missing drivers: camera, keyboard, modem (should be trivial to port from 
2.6.19 patch), sound, hook switch (in progress), probably more. I am 
going to see what I can do to narrow this list.

> gpio-keys driver is the way to do this these days?

As I have already written in a second thread, both gpio-switch and 
gpio-keys based devices actually work for me if without FIQ patch.

For now, gpio-switch device gives me the switch status via sysfs, but 
does not provide any events, so not much different than exporting the 
pin over gpiolib sysfs interface, but I think that adding kobject CHANGE 
event to gpio-switch interrupt handler should be trivial.

OTOH, gpio-keys based device generates input events obviously, but does 
not allow for status check (or I don't know how to check for it), that I 
would rather find an essential feature.

Cheers,
Janusz