Re: Opie features on a qtek 9000
Alessandro Briosi <[email protected]> Fri, 25 Jan 2008 20:10:27 +0100
| Newsgroups | gmane.comp.handhelds.opie |
|---|---|
| Message-ID | <[email protected]> |
This is a multi-part message in MIME format. --------------050106080908070402050402 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Hi Ron, GPRS is supported on the HTC Universal (Qtek 9000), but it needs to be initialized. the phone is only supported by the development version of the Qtopia4. I don't think opie will ever have a phone app. at the end there is an extract of the irc #htc-linux from 19.01.2008=20 that tells u how to enable it. Btw: is the hinge working? (rotating the screen does rotate the opie=20 desktop too?) I made a patch some time ago to better support the=20 Universal, but opie ml was kind of dead at the time, and I don't think=20 it never got into the cvs. I'm attaching the patch and the keymap, though I don't know if it will=20 apply or not. Also a keymap to better support keys... Alessandro [sab gen 19 2008] [13:03:08] <goxboxlive> ymerejt: hi [sab gen 19 2008] [13:03:12] <ymerejt> hi [sab gen 19 2008] [13:03:28] <ymerejt> goxboxlive, have you ever=20 successfully used GPRS on uni ? [sab gen 19 2008] [13:03:33] <goxboxlive> ymerejt: [sab gen 19 2008] [13:03:34] <goxboxlive> yes [sab gen 19 2008] [13:03:40] <goxboxlive> i have had it running [sab gen 19 2008] [13:03:42] <ymerejt> with qtopia ? [sab gen 19 2008] [13:03:51] <goxboxlive> ymerejt: no, manually setup [sab gen 19 2008] [13:04:03] <ymerejt> ok could you tell me more ? [sab gen 19 2008] [13:04:53] <goxboxlive> ############## OPEN CU AND DO=20 #################################################### [sab gen 19 2008] [13:04:53] <goxboxlive> atv1 [sab gen 19 2008] [13:04:53] <goxboxlive> ate1 [sab gen 19 2008] [13:04:53] <goxboxlive> at+cfun=3D1 [sab gen 19 2008] [13:04:53] <goxboxlive> at+cops=3D0 [sab gen 19 2008] [13:04:53] <goxboxlive> at+cops? [sab gen 19 2008] [13:04:55] <goxboxlive> #wait until it give some=20 respond, then [sab gen 19 2008] [13:04:57] <goxboxlive> at@usbpower=3D1 [sab gen 19 2008] [13:04:59] <goxboxlive> ############# THEN GO BACK TO=20 CONSOLE IN ANOTHER VIEW ########################### [sab gen 19 2008] [13:05:01] <goxboxlive> bash# modprobe usbserial=20 vendor=3D0x05c6 product=3D0x3197 [sab gen 19 2008] [13:05:05] <goxboxlive> ############# GO BACK TO CU=20 ##################################################### [sab gen 19 2008] [13:05:07] <goxboxlive>=20 at+cgdcont=3D1,"IP","internet.tele2.no","",0,0 OR=20 at+cgdcont=3D1,"IP","internet.tele2.no" [sab gen 19 2008] [13:05:10] <goxboxlive> atdt*99***1# [sab gen 19 2008] [13:05:11] <goxboxlive> ############# GO BACK TO=20 CONSOLE ################################################ [sab gen 19 2008] [13:05:13] <goxboxlive> bash#: pon tele2 [sab gen 19 2008] [13:05:15] <goxboxlive> and then : try ifconfig and=20 look for ppp0 [sab gen 19 2008] [13:05:17] <goxboxlive>=20 #########################################################################= ####### [sab gen 19 2008] [13:05:29] Entra Vinz0r =E8 entrato nel canale=20 ([email protected]). [sab gen 19 2008] [13:07:04] <goxboxlive> and tele2 looks like:=20 http://pastebin.ca/863270 [sab gen 19 2008] [13:07:17] <goxboxlive> This is how i did it manually [sab gen 19 2008] [13:07:58] <goxboxlive> For me i have to use this one:=20 at+cgdcont=3D1,"IP","internet.tele2.no","",0,0 and NOT liek this:=20 at+cgdcont=3D1,"IP","internet.tele2.no" [sab gen 19 2008] [13:08:01] <ymerejt> and the data stream use ttyUSB0=20 and the AT dialog ttyS0 [sab gen 19 2008] [13:08:15] <goxboxlive> ymerejt: rigth [sab gen 19 2008] [13:08:27] <goxboxlive> and you get a /dev/pppo [sab gen 19 2008] [13:09:11] <ymerejt> qtopia does not emit any AT=20 command when I ask it to enable GPRS ... [sab gen 19 2008] [13:09:38] <goxboxlive> ok [sab gen 19 2008] [13:10:45] <goxboxlive> ls [sab gen 19 2008] [13:11:59] Esci rob_w|laptop ha lasciato questo server=20 (Read error: 110 (Connection timed out)). [sab gen 19 2008] [13:13:14] <ymerejt> goxboxlive, but I think I have to=20 work on the myul [sab gen 19 2008] [13:13:18] <ymerejt> multiplexer plugin [sab gen 19 2008] [13:13:37] <goxboxlive> ok Ron Rademaker ha scritto: > Hi, >=20 > I'm running opie on a qtek 9000 and so far I really like opie. However,= =20 > there are some things the qtek 9000 device supports but as far as I kno= w=20 > opie doesn't. Unfortunately, those things are pretty much why I bought=20 > the thing in the first place so getting them to work is essential. I=20 > think all the stuff I want is supported by the linux kernel but just=20 > lacks some application so I would expect it to be solvable somehow. Wan= t=20 > I want to get working is a GPRS connection to the internet (for ssh=20 > connections and e-mail) over the simcard I've put into the device. It=20 > would be nice to also have phone support but this is not essential at a= ll. > Anyone knows if this is possible and if yes, how to make it happen? >=20 > Thanks, > Ron >=20 > _______________________________________________ > Open Source User Interface and Apps built on Qt Embedded > Opie mailing list > [email protected] > https://handhelds.org/mailman/listinfo/opie --------------050106080908070402050402 Content-Type: text/plain; name="new-keymap-2.6.map" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="new-keymap-2.6.map" #altgr keycode 18 = euro altgr keycode 15 = tilde altgr keycode 24 = slash altgr keycode 25 = backslash altgr keycode 32 = pound altgr keycode 37 = quotedbl altgr keycode 38 = apostrophe altgr keycode 50 = question altgr keycode 51 = semicolon altgr keycode 52 = colon keycode 212 = F15 keycode 167 = F16 keycode 115 = F17 keycode 114 = F18 --------------050106080908070402050402 Content-Type: text/x-patch; name="odevice_htc-hinge_buttons.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="odevice_htc-hinge_buttons.patch" diff -ur libopie2.org/opiecore/device/odevice_htc.cpp libopie2/opiecore/device/odevice_htc.cpp --- libopie2.org/opiecore/device/odevice_htc.cpp 2007-05-02 12:15:39.000000000 +0200 +++ libopie2/opiecore/device/odevice_htc.cpp 2007-05-02 12:16:01.000000000 +0200 @@ -104,16 +104,23 @@ "devicebuttons/z_mail", "opiemail", "raise()", "opiemail", "newMail()" }, +/* 212 */ + { Qt::Key_F15, QT_TRANSLATE_NOOP("Button", "Camera Button"), + "devicebuttons/z_camera", + "sysinfo", "raise()" }, +/* 167 */ + { Qt::Key_F16, QT_TRANSLATE_NOOP("Button", "Record Button"), + "devicebuttons/z_record", + "QPE/VMemo", "toggleRecord()" }, +/* 115 */ + { Qt::Key_F17, QT_TRANSLATE_NOOP("Button", "VolumeUp Button"), + "devicebuttons/z_volumeup", + }, +/* 114 */ + { Qt::Key_F18, QT_TRANSLATE_NOOP("Button", "VolumeDown Button"), + "devicebuttons/z_volumedown", + }, - { Qt::Key_F15, QT_TRANSLATE_NOOP("Button", "Hinge1"), - "devicebuttons/z_hinge1", - "QPE/Rotation", "rotateDefault()",0,0}, - { Qt::Key_F16, QT_TRANSLATE_NOOP("Button", "Hinge2"), - "devicebuttons/z_hinge2", - "QPE/Rotation", "rotateDefault()",0,0}, - { Qt::Key_F17, QT_TRANSLATE_NOOP("Button", "Hinge3"), - "devicebuttons/z_hinge3", - "QPE/Rotation", "rotateDefault()",0,0}, }; @@ -200,7 +207,8 @@ switch( d->m_model ) { case Model_HTC_Universal: - initHingeSensor(); +/* initHingeSensor(); */ + m_hinge.initialized = 0; d->m_rotation = rotation(); d->m_direction = direction(); break; @@ -466,6 +474,9 @@ OHingeStatus HTC::readHingeSensor() const { + + if (!m_hinge.initialized) + initHingeSensor(); /* * The HTC Universal keyboard is event source 1 in kernel 2.6. * Hinge status is reported via Input System Switchs 0 and 1 like that: @@ -473,14 +484,14 @@ * ------------------------- * | SW0 | SW1 | CASE | * |-----|-----|-----------| - * | 0 0 Unknown | - * | 1 0 Portrait | - * | 0 1 Closed | - * | 1 1 Landscape | + * | 0 0 Landscape | + * | 1 0 Closed | + * | 0 1 Portrait | + * | 1 1 Unknown | * ------------------------- */ - OInputDevice* keyboard = OInputSystem::instance()->device( "event1" ); - bool switch0 = true; + OInputDevice* keyboard = OInputSystem::instance()->device( m_hinge.event ); + bool switch0 = false; bool switch1 = false; if ( keyboard ) { @@ -489,11 +500,12 @@ } if ( switch0 ) { - return switch1 ? CASE_LANDSCAPE : CASE_PORTRAIT; + return CASE_CLOSED; + /*return switch1 ? CASE_CLOSED : CASE_UNKNOWN;*/ } else { - return switch1 ? CASE_CLOSED : CASE_UNKNOWN; + return switch1 ? CASE_PORTRAIT : CASE_LANDSCAPE; } } @@ -501,15 +513,41 @@ { if ( m_embedix ) return; - m_hinge.setName( "/dev/input/event2" ); - if ( !m_hinge.open( IO_ReadOnly ) ) + if (m_hinge.initialized) return; + + // should discover the input !!! + OInputSystem* sys = OInputSystem::instance(); + OInputSystem::DeviceIterator it = sys->iterator(); + while ( it.current() ) + { + QString devicename = "asic3-keys"; + if ( it.current()->identity() == devicename ) { + qDebug("HTC::initHingeSensor : device identity <%s> event <%s>",it.current()->identity().ascii(), it.currentKey().ascii()); + + QString absPath = "/dev/input/"; + absPath += it.currentKey(); + m_hinge.device.setName ( absPath ); + m_hinge.event = it.currentKey(); + } + + ++it; + } + + if ( m_hinge.device.name() == "" ) { + qWarning("HTC:init() - No device discovered. Setting default"); + m_hinge.device.setName( "/dev/input/event2" ); + m_hinge.event = "event2"; + } + + if ( !m_hinge.device.open( IO_ReadOnly ) ) { - qWarning( "HTC::init() - Couldn't open /dev/input/event2 for read (%s)", strerror( errno ) ); + qWarning( "HTC::init() - Couldn't open %s for read (%s)", m_hinge.device.name().ascii(), strerror( errno ) ); return; } - QSocketNotifier* sn = new QSocketNotifier( m_hinge.handle(), QSocketNotifier::Read, this ); + QSocketNotifier* sn = new QSocketNotifier( m_hinge.device.handle(), QSocketNotifier::Read, this ); QObject::connect( sn, SIGNAL(activated(int)), this, SLOT(hingeSensorTriggered()) ); + m_hinge.initialized = 1; qDebug( "HTC::init() - Hinge Sensor Initialization successfully completed" ); } @@ -518,7 +556,7 @@ { qDebug( "HTC::hingeSensorTriggered() - got event" ); struct input_event e; - if ( ::read( m_hinge.handle(), &e, sizeof e ) > 0 ) + if ( ::read( m_hinge.device.handle(), &e, sizeof e ) > 0 ) { qDebug( "HTC::hingeSensorTriggered() - event has type %d, code %d, value %d", e.type, e.code, e.value ); if ( e.type != EV_SW ) return; diff -ur libopie2.org/opiecore/device/odevice_htc.h libopie2/opiecore/device/odevice_htc.h --- libopie2.org/opiecore/device/odevice_htc.h 2007-05-02 12:15:39.000000000 +0200 +++ libopie2/opiecore/device/odevice_htc.h 2007-05-02 12:16:01.000000000 +0200 @@ -91,6 +91,12 @@ #define FB_BLANK_UNBLANK 0 #define FB_BLANK_POWERDOWN 4 +struct hinge_sensor { + int initialized; + QFile device; + QString event; +}; + namespace Opie { namespace Core { namespace Internal { @@ -136,7 +142,7 @@ QString m_backlightdev; OLedState m_leds[1]; bool m_embedix; - QFile m_hinge; + struct hinge_sensor m_hinge; }; struct htc_button { --------------050106080908070402050402 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Open Source User Interface and Apps built on Qt Embedded Opie mailing list [email protected] https://handhelds.org/mailman/listinfo/opie --------------050106080908070402050402--