GPS problem

9 messages Options
Embed this post
Permalink
Gabor Laszlo

GPS problem

Reply Threaded More More options
Print post
Permalink
after update of shr-settings, the switch to set gps to Manual-> always
on is gone. Anyone know how to set it by hand? (or how to fix
shr-settings)?

Gabor
--
We are born wet, naked and hungry.
Then things get worse.

_______________________________________________
support mailing list
[hidden email]
https://lists.openmoko.org/mailman/listinfo/support
Al Johnson

Re: GPS problem

Reply Threaded More More options
Print post
Permalink
On Monday 05 October 2009, Gabor Laszlo wrote:
> after update of shr-settings, the switch to set gps to Manual-> always
> on is gone. Anyone know how to set it by hand? (or how to fix
> shr-settings)?

mdbus -s org.freesmartphone.ousaged /org/freesmartphone/Usage
org.freesmartphone.Usage.SetResourcePolicy GPS enabled

possible states are enabled, disabled, auto

_______________________________________________
support mailing list
[hidden email]
https://lists.openmoko.org/mailman/listinfo/support
Gabor Laszlo

Re: GPS problem

Reply Threaded More More options
Print post
Permalink
On Tue, Oct 6, 2009 at 2:05 PM, Al Johnson
<[hidden email]> wrote:
> On Monday 05 October 2009, Gabor Laszlo wrote:
>> after update of shr-settings, the switch to set gps to Manual-> always
>> on is gone. Anyone know how to set it by hand? (or how to fix
>> shr-settings)?
>
> mdbus -s org.freesmartphone.ousaged /org/freesmartphone/Usage
> org.freesmartphone.Usage.SetResourcePolicy GPS enabled
>
> possible states are enabled, disabled, auto
Thanks,

I tried it but I get several warnings about a deprecated call,
(pending_return in dbus_connection_send_with_reply_setup() without
pending_setup), and at the end
/org/freesmartphone/Usage: SetResourcePolicy failed:
org.freesmartphone.Usage.ResourceUnknown

gabor
--
We are born wet, naked and hungry.
Then things get worse.

_______________________________________________
support mailing list
[hidden email]
https://lists.openmoko.org/mailman/listinfo/support
Al Johnson

Re: GPS problem

Reply Threaded More More options
Print post
Permalink
On Thursday 08 October 2009, Gabor Laszlo wrote:

> On Tue, Oct 6, 2009 at 2:05 PM, Al Johnson
>
> <[hidden email]> wrote:
> > On Monday 05 October 2009, Gabor Laszlo wrote:
> >> after update of shr-settings, the switch to set gps to Manual-> always
> >> on is gone. Anyone know how to set it by hand? (or how to fix
> >> shr-settings)?
> >
> > mdbus -s org.freesmartphone.ousaged /org/freesmartphone/Usage
> > org.freesmartphone.Usage.SetResourcePolicy GPS enabled
> >
> > possible states are enabled, disabled, auto
>
> Thanks,
>
> I tried it but I get several warnings about a deprecated call,
> (pending_return in dbus_connection_send_with_reply_setup() without
> pending_setup),

You can ignore this. It comes from a low level library, and until the library
is fixed there's nothing devs using python can do to stop it.

> and at the end
> /org/freesmartphone/Usage: SetResourcePolicy failed:
> org.freesmartphone.Usage.ResourceUnknown

That's more of a problem as it suggests frameworkd hasn't found the GPS. Or I
got the case wrong doing it from memory, which is less of a problem ;-) You
can find out which resources it knows about using:

mdbus -s org.freesmartphone.ousaged /org/freesmartphone/Usage
org.freesmartphone.Usage.ListResources

Documentation for the resource handling calls is here:
http://git.freesmartphone.org/?p=specs.git;a=blob_plain;f=html/org.freesmartphone.Usage.html;hb=HEAD

If it doesn't have a gps resource you'll need to set the log level to DEBUG in
/etc/frameworkd.conf and check the log to see if there's any indication of a
problem.

_______________________________________________
support mailing list
[hidden email]
https://lists.openmoko.org/mailman/listinfo/support
Gabor Laszlo

Re: GPS problem

Reply Threaded More More options
Print post
Permalink
On Thu, Oct 8, 2009 at 12:40 PM, Al Johnson
<[hidden email]> wrote:
> You can find out which resources it knows about using:
>
> mdbus -s org.freesmartphone.ousaged /org/freesmartphone/Usage
> org.freesmartphone.Usage.ListResources
>
oh goody, it only says
[]
does that mean it knows of no resources?

> Documentation for the resource handling calls is here:
> http://git.freesmartphone.org/?p=specs.git;a=blob_plain;f=html/org.freesmartphone.Usage.html;hb=HEAD
>
> If it doesn't have a gps resource you'll need to set the log level to DEBUG in
> /etc/frameworkd.conf and check the log to see if there's any indication of a
> problem.
Could you elaborate on that?

Maybe I should reflash it with the latest SHR, it's been awful long
time just doing the updates, I'm sure something's borken by now.

Gabor
--
We are born wet, naked and hungry.
Then things get worse.

_______________________________________________
support mailing list
[hidden email]
https://lists.openmoko.org/mailman/listinfo/support
Al Johnson

Re: GPS problem

Reply Threaded More More options
Print post
Permalink
On Thursday 08 October 2009, Gabor Laszlo wrote:

> On Thu, Oct 8, 2009 at 12:40 PM, Al Johnson
>
> <[hidden email]> wrote:
> > You can find out which resources it knows about using:
> >
> > mdbus -s org.freesmartphone.ousaged /org/freesmartphone/Usage
> > org.freesmartphone.Usage.ListResources
>
> oh goody, it only says
> []
> does that mean it knows of no resources?

Yes, which means there's something very wrong with your setup. It should show
WiFi, Bluetooth, CPU, Display and so on as well as GPS.

>
> > Documentation for the resource handling calls is here:
> > http://git.freesmartphone.org/?p=specs.git;a=blob_plain;f=html/org.freesm
> >artphone.Usage.html;hb=HEAD
> >
> > If it doesn't have a gps resource you'll need to set the log level to
> > DEBUG in /etc/frameworkd.conf and check the log to see if there's any
> > indication of a problem.
>
> Could you elaborate on that?

/etc/frameworkd.conf has a log_level entry near the start that sets the
default log level for all components. Other entries in that section control
whether the log goes to a file, or to syslog. It all seemed fairly self
explanatory last time I looked at it as the options were described in comments
in the config file.

> Maybe I should reflash it with the latest SHR, it's been awful long
> time just doing the updates, I'm sure something's borken by now.

That's a good idea. It takes us to a known good starting point.

_______________________________________________
support mailing list
[hidden email]
https://lists.openmoko.org/mailman/listinfo/support
Gabor Laszlo

Re: GPS problem

Reply Threaded More More options
Print post
Permalink
>> Maybe I should reflash it with the latest SHR, it's been awful long
>> time just doing the updates, I'm sure something's borken by now.
>
> That's a good idea. It takes us to a known good starting point.

Yeah, I flashed it with the latest Unstable_SHR and now it's back to
normal. Even better, things that were borken before work now (pythm)

I also finetuned my post-flash setup and install scripts, so
reflashing, updating and getting all my settings back is a matter of a
few commands and an hour's thumb-twiddling. If anyone is interested I
can post them.

Gabor
--
We are born wet, naked and hungry.
Then things get worse.

_______________________________________________
support mailing list
[hidden email]
https://lists.openmoko.org/mailman/listinfo/support
Joachim Ott-2

Re: GPS problem

Reply Threaded More More options
Print post
Permalink
2009/10/12 Gabor Laszlo <[hidden email]>:
> I also finetuned my post-flash setup and install scripts, so
> reflashing, updating and getting all my settings back is a matter of a
> few commands and an hour's thumb-twiddling. If anyone is interested I
> can post them.

Yes, I'd like to look at that script. Actually I'd like 2 scripts, one
to save my changes I made to system files on the FR to the desktop pc
and the other script to merge this changes to a newly flashed system.

Much better would be, if I could mount the rootfs readonly and have an
overlay-fs for changes.

_______________________________________________
support mailing list
[hidden email]
https://lists.openmoko.org/mailman/listinfo/support
Gabor Laszlo

Re: GPS problem

Reply Threaded More More options
Print post
Permalink
On Fri, Oct 16, 2009 at 7:54 PM, Joachim Ott <[hidden email]> wrote:
> 2009/10/12 Gabor Laszlo <[hidden email]>:
>> I also finetuned my post-flash setup and install scripts, so
>> reflashing, updating and getting all my settings back is a matter of a
>> few commands and an hour's thumb-twiddling. If anyone is interested I
>> can post them.
>
> Yes, I'd like to look at that script. Actually I'd like 2 scripts, one
> to save my changes I made to system files on the FR to the desktop pc
> and the other script to merge this changes to a newly flashed system.

Well, I have all personal data on a flash card, including the scripts, so after a reflash I just need to call /media/mmcblk0/setup.sh in the terminal. Note that I moved Maps, Music, and Books to /media/card/home. Here's the script:
### start setup.sh

#!/bin/sh
echo "# Set card device name"
sed -i -e 's/mmcblk0p1/mmcblk0/' /etc/fstab
grep card /etc/fstab
mount /media/card
mount |grep card

echo "# Relink home"
cd /media/card/home
for i in $(ls -a); do rm -rf ~/$i; done
cd
# link Books      .FBReader  Maps       .mplayer   Music      .navit     .purple    .ssh       .tangogps
ln -s /media/card/home/* .
ln -s /media/card/home/.* .

echo "# Configure network"
sed -i -e 's/192\.168\.0/192\.168\.1/g' /etc/network/interfaces
/etc/init.d/networking restart
ifconfig usb0

killall dropbear && dropbear

echo "# Set timezone"
ln -sf /usr/share/zoneinfo/Europe/Berlin /etc/localtime

echo "# Resume speedup"
cat > /etc/init.d/resumespeedup << EOF
#!/bin/sh
/sbin/klogd -c 1
EOF

chmod +x /etc/init.d/resumespeedup
ln -s ../init.d/resumespeedup /etc/rc1.d/S06resumespeedup
ln -s ../init.d/resumespeedup /etc/rc2.d/S06resumespeedup
ln -s ../init.d/resumespeedup /etc/rc3.d/S06resumespeedup
ln -s ../init.d/resumespeedup /etc/rc4.d/S06resumespeedup
ln -s ../init.d/resumespeedup /etc/rc5.d/S06resumespeedup

echo "# Depmod when needed"
cat > /etc/init.d/moduledepends << EOF
#!/bin/sh
if cmp /proc/version /var/lib/kernelversion; then
   echo Not recalculating the module dependencies: Kernel has not changed.
else
   echo Recalculating the kernel module dependencies...
   depmod -a
   cp /proc/version /var/lib/kernelversion
fi
EOF

chmod +x /etc/init.d/moduledepends
ln -s ../init.d/moduledepends /etc/rc1.d/S00moduledepends
ln -s ../init.d/moduledepends /etc/rc2.d/S00moduledepends
ln -s ../init.d/moduledepends /etc/rc3.d/S00moduledepends
ln -s ../init.d/moduledepends /etc/rc4.d/S00moduledepends
ln -s ../init.d/moduledepends /etc/rc5.d/S00moduledepends

### end setup.sh

And here's the other, run after connecting to the PC:

### start install.sh

#!/bin/sh

echo "# Fix software repos"
sed -i 's-ipk//-ipk/-' /etc/opkg/*feed.conf
mv /etc/opkg/armv4-feed.conf /etc/opkg/armv4-feed.conf_
echo "src/gz navit http://download.navit-project.org/navit/openmoko/svn" >/etc/opkg/navit-feed.conf

echo "# Run update"
opkg update
opkg list_upgradable
if read dummy; then opkg upgrade; fi
echo "# Install other packages"
opkg install libpurple-protocol-yahoo libpurple-protocol-icq libpurple-protocol-bonjour fbreader midori-doc libgps17 navit pidgin-doc pythm libcanberra-gtk mokomaze
ln -s /usr/lib/libgps.so.17 /usr/lib/libgps.so.16
#diff -w -U 0 navit.xml /usr/share/navit/navit.xml

### end install.sh

The list of packages there at the end is a matter of personal preference.
>
> Much better would be, if I could mount the rootfs readonly and have an
> overlay-fs for changes.
Or at least put root's home on the card from the start. Hmmm, I might try that.

Gabor
--
We are born wet, naked and hungry.
Then things get worse.


_______________________________________________
support mailing list
[hidden email]
https://lists.openmoko.org/mailman/listinfo/support