Subject: | Can't re-enter menu after bailing out by long-pressing the "Back" key |
Distribution: Device-Ericsson-AccessoryMenu-0.8
Perl version: v5.6.1
OS: FreeBSD 5.2.1-RELEASE i386
Mobile phone: Sony Ericsson T630
Precondition: Create a Perl script that creates a (any) menu structure. Set up Bluetooth stuff and such to find the menu provided by the script under the Connectivity->Accessories menu.
Actions: Enter this menu, browse around, then long-press the Back key to go back to the idle screen (showing operator, time, etc.). Then try to enter the menu provided by the Perl script again via the Connectivity->Accessories menu.
Expected: The menu should come up again.
Noted: The script's menu is listed under Accessories, but if you press Select, its menu won't come up anymore. You have to terminate and restart the script for things to work again.
Normally, pressing the Back key once will send "AT*EAMI:0" to the script. But a long-press of the Back key will send only "AT*EAMI", nothing more. If you then try to enter the menu again, the mobile will send "AT*EAAI" but nothing is sent back to the mobile.
Example short script:
#!/usr/bin/perl
use strict;
use Device::SerialPort;
use Device::Ericsson::AccessoryMenu;
my $remote;
my $PORT = "/dev/ttyS1";
$remote = Device::Ericsson::AccessoryMenu->new( debug => 1 );
$remote->menu(
[ 'Computer' =>
[ 'Item #1' => sub { return "Feedback #1" },
'Item #2' => sub { return "Feedback #2" }
],
]);
my $port = Device::SerialPort->new($PORT) or die "Couldn't open $PORT: $!";
$remote->port($port);
$remote->register_menu();
$remote->control() while(1);