Archos 3G Stick Detection Patch

Yesterday, I posted how I got the Archos 3G USB stick working in Plasma Active on my Archos G9. Today, I came up with an admittedly  pretty crude hack to significantly improve the handling of the USB stick.

This hack does two things. Firstly, now the 3G stick is always correctly recognized whereas before there was still the chance that the stick was not correctly recognized. Secondly, this patch significantly speeds up the detection of the stick; now it takes about one to two seconds until the WWAN connection can be used compared to 20 to 30 seconds without the hack.

The hack is for modem-manager and is actually very simple. However, it changes modem-manager such that it cannot be used with pretty much any other WWAN stick than the Archos 3G. So if you intend to use a different USB stick you probably shouldn’t use that hack.

This hack is just a very quick and even more dirty try on speeding things up. Still, it works actually very good so far. In the following the patch is shown:

diff --git a/src/mm-plugin-base.c b/src/mm-plugin-base.c
index 8cee38d..c01a045 100644
--- a/src/mm-plugin-base.c
+++ b/src/mm-plugin-base.c
@@ -897,6 +897,10 @@ _internal_probe_port (MMPluginBase *self,
name = g_udev_device_get_name (port);
g_assert (name);

+    if(strcmp(name, "ttyUSB4") != 0){
+        return FALSE;
+    }
+
serial = mm_at_serial_port_new (name, MM_PORT_TYPE_PRIMARY);
if (serial == NULL) {
g_set_error_literal (error, MM_MODEM_ERROR, MM_MODEM_ERROR_GENERAL,

You can get a compiled version of modem-manager that includes this hack from my repository.

Advertisements
This entry was posted in Snippets and tagged , , , . Bookmark the permalink.

One Response to Archos 3G Stick Detection Patch

  1. Pingback: Archos G9 and UMTS via Archos 3G USB Stick on Plasma Active Update | ruedigergad

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s