Active Topics

 



Notices


Reply
Thread Tools
Posts: 5 | Thanked: 0 times | Joined on Oct 2007
#1
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's Avatar
Posts: 1,245 | Thanked: 421 times | Joined on Dec 2005
#2
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.
 
Posts: 5 | Thanked: 0 times | Joined on Oct 2007
#3
Thanks, Gnuite, I'll give it a shot, probably over the weekend.

BigFan770
 
Posts: 5 | Thanked: 0 times | Joined on Oct 2007
#4
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's Avatar
Posts: 1,245 | Thanked: 421 times | Joined on Dec 2005
#5
Originally Posted by BigFan770 View Post
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.
 
Posts: 5 | Thanked: 0 times | Joined on Oct 2007
#6
Patch attached if I attached it correctly.
Attached Files
File Type: txt patch-reset-on-G_IO_STATUS_ERROR.txt (2.6 KB, 113 views)
 
Reply


 
Forum Jump


All times are GMT. The time now is 23:18.