maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   Maemo Mapper G_IO_STATUS_ERROR (1.4.7-2 OS 2006) (https://talk.maemo.org/showthread.php?t=10213)

BigFan770 2007-10-03 23:20

Maemo Mapper G_IO_STATUS_ERROR (1.4.7-2 OS 2006)
 
I've experienced trouble running Maemo Mapper 1.4.7-2 on OS 2006, and I think that I've tracked down the problem.

Symptoms (in a single run of Maemo Mapper; repeatable across runs):
- Within a few minutes of enabling the GPS, the screen quits updating and goes blank after a minute, even when traveling at respectable speeds.
- The Bluetooth connection is fine, or at least that's what the GPS reports.
- The problem can be remedied by disabling and then re-enabling the GPS. (For ease, I have configured the curled-arrow key to toggle the GPS.)
- After several recurrences of the problem and disabling/enabling the GPS, the mapper may work perfectly for hours, until I exit the application (max time 4.5 hr).

Debugging results:
- The problem occurs when the call to g_io_channel_read_chars from within channel_cb_input returns G_IO_STATUS_ERROR.
- Once g_io_channel_read_chars begins returning G_IO_STATUS_ERROR, it does so until I disable the GPS and enable it again.

Debugging source:
- Checked out source from svn on maemo garage
- installed sqlite3-packages
- set up perl xml parser
- export CFLAGS=-mcpu=arm926ej-s
- ran dpkg-build.sh to compile

The GPS:
- Adapt AD 800, 9600 baud, reports location every second.
- So far as I know, I cannot configure the GPS: it is always full-on.
- Output from the GPS looks fine if I connect to is using a simple serial program on another computer and watch the stream of NMEA sentences scroll by.

Any hints about what might cause the problem?
Is there any way around the problem?
Would more information be useful?

Thanks,

BigFan770

gnuite 2007-10-04 02:52

Re: Maemo Mapper G_IO_STATUS_ERROR (1.4.7-2 OS 2006)
 
Sounds like Maemo Mapper should try to reset the connection if/when it starts receiving continues G_IO_STATUS_ERROR errors. A bit of a hack, but this issue will likely disappear with Maemo Mapper v2.0, which is hopefully coming soon.

In the meantime, you can edit the code to do that yourself, if you like. Just call rcvr_disconnect() and rcvr_connect_later() when Maemo Mapper encounters one (or maybe a few in a row) G_IO_STATUS_ERROR errors.

BigFan770 2007-10-04 23:52

Re: Maemo Mapper G_IO_STATUS_ERROR (1.4.7-2 OS 2006)
 
Thanks, Gnuite, I'll give it a shot, probably over the weekend.

BigFan770

BigFan770 2007-10-08 01:35

Re: Maemo Mapper G_IO_STATUS_ERROR (1.4.7-2 OS 2006)
 
Your suggestion worked.

I count errors in a run of errors and reset the connection when the length hits 5. I did need to put a set_conn_state(RCVR_DOWN) between the calls to rcvr_disconnect() and rcvr_connect_later().

Are you interested in a patch? Don't worry about replying if you're not interested.

The mapper is great. We all look forward to V2.

Thanks,

BigFan770

gnuite 2007-10-08 02:09

Re: Maemo Mapper G_IO_STATUS_ERROR (1.4.7-2 OS 2006)
 
Quote:

Originally Posted by BigFan770 (Post 80478)
Your suggestion worked.

I count errors in a run of errors and reset the connection when the length hits 5. I did need to put a set_conn_state(RCVR_DOWN) between the calls to rcvr_disconnect() and rcvr_connect_later().

Are you interested in a patch?

Glad it worked out - I recommend attaching the patch to a message in this thread. I'll try to incorporate it into Maemo Mapper v1.4.x, but if I don't manage to do that soon, at least others will have the opportunity to do it themselves.

BigFan770 2007-10-13 19:23

Re: Maemo Mapper G_IO_STATUS_ERROR (1.4.7-2 OS 2006)
 
1 Attachment(s)
Patch attached if I attached it correctly.


All times are GMT. The time now is 08:35.

vBulletin® Version 3.8.8