I got UMTSMON 0.8 USB-modem working

Booting, installing, newbie
Post Reply
Message
Author
harpmaster
Posts: 14
Joined: Fri 20 Jun 2008, 09:34

I got UMTSMON 0.8 USB-modem working

#1 Post by harpmaster »

Hello puppy-friends!

First of all, thank you for this wonderful linux of Barry Kauler and the helpful tipps of this forum.
If anyone is interested how to install umtsmon in puppy, I could explain it (in my bad english). It really works fine and it is easy, because I'm very new in linux (6 month), so everbody will understand the steps.

hear from you!

redrat
Posts: 24
Joined: Sat 04 Aug 2007, 20:15

Nokia 6600 internet connection umts

#2 Post by redrat »

I need to connect my puppy 4.0 laptop to internet with a USB cable connection and my nokia 6600 provided by UMTS. I've tried to connect by the graphic modem interface wizard but it doesn't work because don't recognize the modem. How can i do?
Thanks

harpmaster
Posts: 14
Joined: Fri 20 Jun 2008, 09:34

#3 Post by harpmaster »

Dear redrat!

I didn't work with puppy 4.0 and a Nokia 6600, 'cause to make umtsmon
working you have to install some .deb-packages with the pb-debianinstaller and this did't work for me in puppy 4.0. But tomorrow
I will write a little howto and you can try some of it.

hope it will help

redrat
Posts: 24
Joined: Sat 04 Aug 2007, 20:15

UMTS connection

#4 Post by redrat »

Many thanks .
I keep in touch !

harpmaster
Posts: 14
Joined: Fri 20 Jun 2008, 09:34

#5 Post by harpmaster »

HOW TO GET UMTSMON 0.8 RUNNING WITH AN HUAWEI E220/E169 USB-MODEM IN PUPPY-LINUX

I use a "puppy-fatfree" based on 301 and a "muppy-linux" (Thank you for this wonderful systems) to show that we can use a very small distribution. We have to create a pup_save.2fs, so we first shutdown the computer and do a save. Than for compiling and installing some we have to download the devx_301.sfs (depends on your puppy-version which one you need). This is very important otherwise you cannot install some of the libraries!
You have to move it in the directory where your pup_save.2fs is and to load it with the "bootmanager" (menu-system-Bootmanager) after rebooting.
Then we need following, depending if it's already on your system you have to download with the puppy-package-manager:
"usbview-1.0.pet" or to be able to write in a terminal "lsusb" download "net-wiz-usb-extras-k2.6.18.1.pet" and "network-wizard-oct07.pet" and install it.
Then we need "dillo-0.8.6teki-mu.pet" and "pb_debianinstaller-alpha09.pet" and install it.
Further install "libusb-0.1.11.pet" and "qt-3.3.8.pet".
Now download the .deb-packages (I used these links: http://packages.debian.org/sid/i386/libqt3-mt/download
http://packages.debian.org/etch/i386/qt ... s/download
http://packages.ubuntu.com/de/gutsy/i38 ... 2/download):
"libaudio2_1.9-2_i386.deb", "libqt3-mt_3.3.8b-5_i386.deb", "qt3-dev-tools_3.3.7-4etch1_i368.deb"
and install it in this order with the "pb-debianinstaller".
Download "umtsmon-0.8.i386.tar.gz" and after unextracting copy the created folder to /usr/local/bin and copy from this folder the executable to /usr/local/bin.
Now plug in your modem and open "usbview" or write in a terminal "lsusb" if "network-wizard" is installed. We have to know
the "vendor -and product ID" (in my case HUAWEI mobile Vendor ID: 12d1, Product ID: 1001).
Than download "huaweiAktBbo.c" and open the file with a text-editor and change every "vendor -and product ID" you can find
to yours (f.e.: product=1003 to product=1001) and save it. Now we can compile it. Move in a terminal where the file is and write:
"cc huaweiAktBbo.c -lusb -o huaweiAktBbo" and enter.
Copy the new file to /usr/sbin.
Now we have to create 3 new devices the USB-modem needs.
So we write in a terminal:

mknod /dev/ttyUSB0 c 188 0
mknod /dev/ttyUSB1 c 188 1
mknod /dev/ttyUSB2 c 188 2 one after another and enter

Now we need a small script. Open a text-editor and write:

#/bin/sh
huaweiAktBbo
modprobe usbserial vendor=0x12d1 product=0x1001
umtsmon

Save it to root, name it how you want, then right mouse, properties and mark "Executable". Copy it to the desktop and use the umtsmon-icon.
So, plug your modem in and hit the icon. Maybe nothing will happen. You have to unload "usb_storage". Open the terminal and write:
"rmmod usb_storage". If you have to use an other usb-hub you have to reload "usb_storage", so use "modprobe usb_storage).
Than try again. If nothing happens use the terminal and write:
"modprobe -v usbserial" and maybe try "modprobe pl2303".
These things we can easy handle with the bootmanager" if it is necessary for the futur.
Then a pop-up will appear. Hit ignore and than you will see the application.
Go to "Connection-Manage Profiles", create a new profile, go to "Edit Profile" and use your access-data you can find in the internet. Then a strange thing for me, you
have to disable "replace default route", otherwise it will not work. Now you can see how "umtsmon" starts to connect and after 5 seconds you are in.
If there are any problems you can move to /home and let you show hidden files, you wil find ".umtsmon". Delete the two files and create a new profile.
If you don't like or need the first pop-up, copy from another linux (I found it in "Ubuntu 7.10" and "Slax") "kdesu" or "kdesudo" to /usr/bin and rename it to "kdesu".

Now I have to say many thanks to Miroslav Bobovsky for huaweiAktBbo, Georg Frankenberger ("FraGezeichen") and the community
of www.ubuntu-austria.at for doing a great job for linux!!!

So, I hope I can help
Last edited by harpmaster on Sun 20 Jul 2008, 07:13, edited 2 times in total.

redrat
Posts: 24
Joined: Sat 04 Aug 2007, 20:15

#6 Post by redrat »

Dear Harpmaster

I'm trying to follow your giude but I've some matters.
I've not found the file libqt3-mt_3.3.5_i386.deb in any libray (there are many similar libqt3-mt packages, but other extension like 3.3.7 etc.). I've found the qt3-dev-tools-embedded_3.3.7-4etch_i368.deb file with the extension "embedded" as i wrote : is it the correct file?
Can you post the url where I can download the correct files?
Many thanks for your help.

harpmaster
Posts: 14
Joined: Fri 20 Jun 2008, 09:34

#7 Post by harpmaster »

Hello redrat!

These are pages you can download the files I used, but I don't know, if other
extensions are also working. I only tried the suggestions of the different forums and these files fit. Maybe luck! So you can try other one.

http://packages.debian.org/sid/i386/libqt3-mt/download
http://packages.debian.org/etch/i386/qt ... s/download
http://packages.ubuntu.com/de/gutsy/i38 ... 2/download

Good luck!

redrat
Posts: 24
Joined: Sat 04 Aug 2007, 20:15

#8 Post by redrat »

Dear harpmaster
I've followed the guide but something was going wrong, probably because I'm an absolutely newbie in linux.
I think that all did work well since to the passage related to the huaweiAktBbo.c file.
If correct, I've substituted the word vendor and product only where was related with a value like after the sign "=" . I post to you the file after my reply for a control.
The second matter may be related with the script . When I save it I right click on the icon and then click on "set run action" . A window appear with two choises :
set default for all application/<anything>
only for the type application/x-shellscript
then
Drop a suitable application here
or
enter a shell command
How are the correct action to make the file executable?
I apologize for my ignorance.


/* HUAWEI E220 3G HSDPA modem - Aktivator modemu = aktivuje ttyUSB0 tty USB1
bobovsky 11.12.2006
dalej sa uz pouzije usbserial a usb-storage
cc huaweiAktBbo.c -lusb (resp -I. -L.)
armeb-linux-gcc huaweiAktBbo.c -L. -I. -lusb
*/
/* This file is generated with usbsnoop2libusb.pl from a usbsnoop log file. */
/* Latest version of the script should be in http://iki.fi/lindi/usb/usbsnoop2libusb.pl */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <signal.h>
#include <ctype.h>
#include <usb.h>
#if 0
#include <linux/usbdevice_fs.h>
#define LIBUSB_AUGMENT
#include "libusb_augment.h"
#endif

struct usb_dev_handle *devh;

void release_usb_device(int dummy) {
int ret;
ret = usb_release_interface(devh, 0);
if (!ret)
printf("failed to release interface: %d\n", ret);
usb_close(devh);
if (!ret)
printf("failed to close interface: %d\n", ret);
exit(1);
}

void list_devices() {
struct usb_bus *bus;
for (bus = usb_get_busses(); bus; bus = bus->next) {
struct usb_device *dev;

for (dev = bus->devices; dev; dev = dev->next)
printf("0x%04x 0x%04x\n",
dev->descriptor.idVendor,
dev->descriptor.idProduct);
}
}

struct usb_device *find_device(int vendor, int product) {
struct usb_bus *bus;

for (bus = usb_get_busses(); bus; bus = bus->next) {
struct usb_device *dev;

for (dev = bus->devices; dev; dev = dev->next) {
if (dev->descriptor.idVendor == 12d1
&& dev->descriptor.idProduct == 1001)
return dev;
}
}
return NULL;
}

void print_bytes(char *bytes, int len) {
int i;
if (len > 0) {
for (i=0; i<len; i++) {
printf("%02x ", (int)((unsigned char)bytes));
}
printf("\"");
for (i=0; i<len; i++) {
printf("%c", isprint(bytes) ? bytes : '.');
}
printf("\"");
}
}


int main(int argc, char **argv) {
int ret, vendor, product;
struct usb_device *dev;
char buf[65535], *endptr;
#if 0
usb_urb *isourb;
struct timeval isotv;
char isobuf[32768];
#endif

usb_init();
// usb_set_debug(255);
usb_find_busses();
usb_find_devices();
/*
if (argc!=3) {
printf("usage: %s vendorID productID\n", argv[0]);
printf("ID numbers of currently attached devices:\n");
list_devices();
exit(1);
}
vendor = strtol(argv[1], &endptr, 16);
if (*endptr != '\0') {
printf("invalid vendor id\n");
exit(1);
}
product = strtol(argv[2], &endptr, 16);
if (*endptr != '\0') {
printf("invalid product id\n");
exit(1);
}
*/
printf("Hladam HUAWEI E220 a prepnem na modem - bbo 06\n");
vendor = 0x12d1;
product = 0x1001;
dev = find_device(vendor, product);
assert(dev);

devh = usb_open(dev);
assert(devh);

signal(SIGTERM, release_usb_device);

/*
ret = usb_get_driver_np(devh, 0, buf, sizeof(buf));
printf("usb_get_driver_np returned %d\n", ret);
if (ret == 0) {
printf("interface 0 already claimed by driver \"%s\", attempting to detach it\n", buf);
ret = usb_detach_kernel_driver_np(devh, 0);
printf("usb_detach_kernel_driver_np returned %d\n", ret);
}
ret = usb_claim_interface(devh, 0);
if (ret != 0) {
printf("claim failed with error %d\n", ret);
exit(1);
}

ret = usb_set_altinterface(devh, 0);
assert(ret >= 0);
*/
// BBO typ 1 = DEVICE
ret = usb_get_descriptor(devh, 0x0000001, 0x0000000, buf, 0x0000012);
//printf("1 get descriptor returned %d, bytes: ", ret);
//print_bytes(buf, ret);
//printf("\n");
usleep(1*1000);
// BBO typ 2 = CONFIGURATION
ret = usb_get_descriptor(devh, 0x0000002, 0x0000000, buf, 0x0000009);
//printf("2 get descriptor returned %d, bytes: ", ret);
//print_bytes(buf, ret);
//printf("\n");
usleep(1*1000);
// BBO typ 2 = CONFIGURATION
ret = usb_get_descriptor(devh, 0x0000002, 0x0000000, buf, 0x0000020);
//printf("3 get descriptor returned %d, bytes: ", ret);
//print_bytes(buf, ret);
//printf("\n");
usleep(1*1000);
/*
ret = usb_release_interface(devh, 0);
if (ret != 0) printf("failed to release interface before set_configuration: %d\n", ret);
ret = usb_set_configuration(devh, 0x0000001);
printf("4 set configuration returned %d\n", ret);
ret = usb_claim_interface(devh, 0);
if (ret != 0) printf("claim after set_configuration failed with error %d\n", ret);
ret = usb_set_altinterface(devh, 0);
printf("4 set alternate setting returned %d\n", ret);
usleep(50*1000);
ret = usb_set_altinterface(devh, 0);
printf("5 set alternate setting returned %d\n", ret);
usleep(62*1000);
*/
ret = usb_control_msg(devh, USB_TYPE_STANDARD + USB_RECIP_DEVICE, USB_REQ_SET_FEATURE, 00000001, 0, buf, 0, 1000);
printf("4 set feature request returned %d\n", ret);
/*
ret = usb_release_interface(devh, 0);
assert(ret == 0);/* HUAWEI E220 3G HSDPA modem - Aktivator modemu = aktivuje ttyUSB0 tty USB1
bobovsky 11.12.2006
dalej sa uz pouzije usbserial a usb-storage
cc huaweiAktBbo.c -lusb (resp -I. -L.)
armeb-linux-gcc huaweiAktBbo.c -L. -I. -lusb
*/
/* This file is generated with usbsnoop2libusb.pl from a usbsnoop log file. */
/* Latest version of the script should be in http://iki.fi/lindi/usb/usbsnoop2libusb.pl */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <signal.h>
#include <ctype.h>
#include <usb.h>
#if 0
#include <linux/usbdevice_fs.h>
#define LIBUSB_AUGMENT
#include "libusb_augment.h"
#endif

struct usb_dev_handle *devh;

void release_usb_device(int dummy) {
int ret;
ret = usb_release_interface(devh, 0);
if (!ret)
printf("failed to release interface: %d\n", ret);
usb_close(devh);
if (!ret)
printf("failed to close interface: %d\n", ret);
exit(1);
}

void list_devices() {
struct usb_bus *bus;
for (bus = usb_get_busses(); bus; bus = bus->next) {
struct usb_device *dev;

for (dev = bus->devices; dev; dev = dev->next)
printf("0x%04x 0x%04x\n",
dev->descriptor.idVendor,
dev->descriptor.idProduct);
}
}

struct usb_device *find_device(int vendor, int product) {
struct usb_bus *bus;

for (bus = usb_get_busses(); bus; bus = bus->next) {
struct usb_device *dev;

for (dev = bus->devices; dev; dev = dev->next) {
if (dev->descriptor.idVendor == 12d1
&& dev->descriptor.idProduct == 1001)
return dev;
}
}
return NULL;
}

void print_bytes(char *bytes, int len) {
int i;
if (len > 0) {
for (i=0; i<len; i++) {
printf("%02x ", (int)((unsigned char)bytes));
}
printf("\"");
for (i=0; i<len; i++) {
printf("%c", isprint(bytes) ? bytes : '.');
}
printf("\"");
}
}


int main(int argc, char **argv) {
int ret, vendor, product;
struct usb_device *dev;
char buf[65535], *endptr;
#if 0
usb_urb *isourb;
struct timeval isotv;
char isobuf[32768];/* HUAWEI E220 3G HSDPA modem - Aktivator modemu = aktivuje ttyUSB0 tty USB1
bobovsky 11.12.2006
dalej sa uz pouzije usbserial a usb-storage
cc huaweiAktBbo.c -lusb (resp -I. -L.)
armeb-linux-gcc huaweiAktBbo.c -L. -I. -lusb
*/
/* This file is generated with usbsnoop2libusb.pl from a usbsnoop log file. */
/* Latest version of the script should be in http://iki.fi/lindi/usb/usbsnoop2libusb.pl */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <signal.h>
#include <ctype.h>
#include <usb.h>
#if 0
#include <linux/usbdevice_fs.h>
#define LIBUSB_AUGMENT
#include "libusb_augment.h"
#endif

struct usb_dev_handle *devh;

void release_usb_device(int dummy) {
int ret;
ret = usb_release_interface(devh, 0);
if (!ret)
printf("failed to release interface: %d\n", ret);
usb_close(devh);
if (!ret)
printf("failed to close interface: %d\n", ret);
exit(1);
}

void list_devices() {
struct usb_bus *bus;
for (bus = usb_get_busses(); bus; bus = bus->next) {
struct usb_device *dev;

for (dev = bus->devices; dev; dev = dev->next)
printf("0x%04x 0x%04x\n",
dev->descriptor.idVendor,
dev->descriptor.idProduct);
}
}

struct usb_device *find_device(int vendor, int product) {
struct usb_bus *bus;

for (bus = usb_get_busses(); bus; bus = bus->next) {
struct usb_device *dev;

for (dev = bus->devices; dev; dev = dev->next) {
if (dev->descriptor.idVendor == 12d1
&& dev->descriptor.idProduct == 1001)
return dev;
}
}
return NULL;
}

void print_bytes(char *bytes, int len) {
int i;
if (len > 0) {
for (i=0; i<len; i++) {
printf("%02x ", (int)((unsigned char)bytes));
}
printf("\"");
for (i=0; i<len; i++) {
printf("%c", isprint(bytes) ? bytes : '.');
}
printf("\"");
}
}


int main(int argc, char **argv) {
int ret, vendor, product;
struct usb_device *dev;
char buf[65535], *endptr;
#if 0
usb_urb *isourb;
struct timeval isotv;
char isobuf[32768];
#endif

usb_init();
// usb_set_debug(255);
usb_find_busses();
usb_find_devices();
/*
if (argc!=3) {
printf("usage: %s vendorID productID\n", argv[0]);
printf("ID numbers of currently attached devices:\n");
list_devices();
exit(1);
}
vendor = strtol(argv[1], &endptr, 16);
if (*endptr != '\0') {
printf("invalid vendor id\n");
exit(1);
}
product = strtol(argv[2], &endptr, 16);
if (*endptr != '\0') {
printf("invalid product id\n");
exit(1);
}
*/
printf("Hladam HUAWEI E220 a prepnem na modem - bbo 06\n");
vendor = 0x12d1;
product = 0x1001;
dev = find_device(vendor, product);
assert(dev);

devh = usb_open(dev);
assert(devh);

signal(SIGTERM, release_usb_device);

/*
ret = usb_get_driver_np(devh, 0, buf, sizeof(buf));
printf("usb_get_driver_np returned %d\n", ret);
if (ret == 0) {
printf("interface 0 already claimed by driver \"%s\", attempting to detach it\n", buf);
ret = usb_detach_kernel_driver_np(devh, 0);
printf("usb_detach_kernel_driver_np returned %d\n", ret);
}/* HUAWEI E220 3G HSDPA modem - Aktivator modemu = aktivuje ttyUSB0 tty USB1
bobovsky 11.12.2006
dalej sa uz pouzije usbserial a usb-storage
cc huaweiAktBbo.c -lusb (resp -I. -L.)
armeb-linux-gcc huaweiAktBbo.c -L. -I. -lusb
*/
/* This file is generated with usbsnoop2libusb.pl from a usbsnoop log file. */
/* Latest version of the script should be in http://iki.fi/lindi/usb/usbsnoop2libusb.pl */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <signal.h>
#include <ctype.h>
#include <usb.h>
#if 0
#include <linux/usbdevice_fs.h>
#define LIBUSB_AUGMENT
#include "libusb_augment.h"
#endif

struct usb_dev_handle *devh;

void release_usb_device(int dummy) {
int ret;
ret = usb_release_interface(devh, 0);
if (!ret)
printf("failed to release interface: %d\n", ret);
usb_close(devh);
if (!ret)
printf("failed to close interface: %d\n", ret);
exit(1);
}

void list_devices() {
struct usb_bus *bus;
for (bus = usb_get_busses(); bus; bus = bus->next) {
struct usb_device *dev;

for (dev = bus->devices; dev; dev = dev->next)
printf("0x%04x 0x%04x\n",
dev->descriptor.idVendor,
dev->descriptor.idProduct);
}
}

struct usb_device *find_device(int vendor, int product) {
struct usb_bus *bus;

for (bus = usb_get_busses(); bus; bus = bus->next) {
struct usb_device *dev;

for (dev = bus->devices; dev; dev = dev->next) {
if (dev->descriptor.idVendor == 12d1
&& dev->descriptor.idProduct == 1001)
return dev;
}
}
return NULL;
}

void print_bytes(char *bytes, int len) {
int i;
if (len > 0) {
for (i=0; i<len; i++) {
printf("%02x ", (int)((unsigned char)bytes));
}
printf("\"");
for (i=0; i<len; i++) {
printf("%c", isprint(bytes[i]) ? bytes[i] : '.');
}
printf("\"");
}
}


int main(int argc, char **argv) {
int ret, vendor, product;
struct usb_device *dev;
char buf[65535], *endptr;
#if 0
usb_urb *isourb;
struct timeval isotv;
char isobuf[32768];
#endif

usb_init();
// usb_set_debug(255);
usb_find_busses();
usb_find_devices();
/*
if (argc!=3) {
printf("usage: %s vendorID productID\n", argv[0]);
printf("ID numbers of currently attached devices:\n");
list_devices();
exit(1);
}
vendor = strtol(argv[1], &endptr, 16);
if (*endptr != '\0') {
printf("invalid vendor id\n");
exit(1);
}
product = strtol(argv[2], &endptr, 16);
if (*endptr != '\0') {
printf("invalid product id\n");
exit(1);
}
*/
printf("Hladam HUAWEI E220 a prepnem na modem - bbo 06\n");
vendor = 0x12d1;
product = 0x1001;
dev = find_device(vendor, product);
assert(dev);

devh = usb_open(dev);
assert(devh);

signal(SIGTERM, release_usb_device);

/*
ret = usb_get_driver_np(devh, 0, buf, sizeof(buf));
printf("usb_get_driver_np returned %d\n", ret);
if (ret == 0) {
printf("interface 0 already claimed by driver \"%s\", attempting to detach it\n", buf);
ret = usb_detach_kernel_driver_np(devh, 0);
printf("usb_detach_kernel_driver_np returned %d\n", ret);
}
ret = usb_claim_interface(devh, 0);
if (ret != 0) {
printf("claim failed with error %d\n", ret);
exit(1);
}

ret = usb_set_altinterface(devh, 0);
assert(ret >= 0);
*/
// BBO typ 1 = DEVICE
ret = usb_get_descriptor(devh, 0x0000001, 0x0000000, buf, 0x0000012);
//printf("1 get descriptor returned %d, bytes: ", ret);
//print_bytes(buf, ret);
//printf("\n");
usleep(1*1000);
// BBO typ 2 = CONFIGURATION
ret = usb_get_descriptor(devh, 0x0000002, 0x0000000, buf, 0x0000009);
//printf("2 get descriptor returned %d, bytes: ", ret);
//print_bytes(buf, ret);
//printf("\n");
usleep(1*1000);
// BBO typ 2 = CONFIGURATION
ret = usb_get_descriptor(devh, 0x0000002, 0x0000000, buf, 0x0000020);
//printf("3 get descriptor returned %d, bytes: ", ret);
//print_bytes(buf, ret);
//printf("\n");
usleep(1*1000);
/*
ret = usb_release_interface(devh, 0);
if (ret != 0) printf("failed to release interface before set_configuration: %d\n", ret);
ret = usb_set_configuration(devh, 0x0000001);
printf("4 set configuration returned %d\n", ret);
ret = usb_claim_interface(devh, 0);
if (ret != 0) printf("claim after set_configuration failed with error %d\n", ret);
ret = usb_set_altinterface(devh, 0);
printf("4 set alternate setting returned %d\n", ret);
usleep(50*1000);
ret = usb_set_altinterface(devh, 0);
printf("5 set alternate setting returned %d\n", ret);
usleep(62*1000);
*/
ret = usb_control_msg(devh, USB_TYPE_STANDARD + USB_RECIP_DEVICE, USB_REQ_SET_FEATURE, 00000001, 0, buf, 0, 1000);
printf("4 set feature request returned %d\n", ret);
/*
ret = usb_release_interface(devh, 0);
assert(ret == 0);
*/
ret = usb_close(devh);
assert(ret == 0);
printf("Prepnute-OK, Mas ttyUSB0 ttyUSB1 (cez usbserial vendor=0x12d1 product=0x1003)\n");
printf("pozri /proc/bus/usb/devices\n");
return 0;
}

ret = usb_claim_interface(devh, 0);
if (ret != 0) {
printf("claim failed with error %d\n", ret);
exit(1);
}

ret = usb_set_altinterface(devh, 0);
assert(ret >= 0);
*/
// BBO typ 1 = DEVICE
ret = usb_get_descriptor(devh, 0x0000001, 0x0000000, buf, 0x0000012);
//printf("1 get descriptor returned %d, bytes: ", ret);
//print_bytes(buf, ret);
//printf("\n");
usleep(1*1000);
// BBO typ 2 = CONFIGURATION
ret = usb_get_descriptor(devh, 0x0000002, 0x0000000, buf, 0x0000009);
//printf("2 get descriptor returned %d, bytes: ", ret);
//print_bytes(buf, ret);
//printf("\n");
usleep(1*1000);
// BBO typ 2 = CONFIGURATION
ret = usb_get_descriptor(devh, 0x0000002, 0x0000000, buf, 0x0000020);
//printf("3 get descriptor returned %d, bytes: ", ret);
//print_bytes(buf, ret);
//printf("\n");
usleep(1*1000);
/*
ret = usb_release_interface(devh, 0);
if (ret != 0) printf("failed to release interface before set_configuration: %d\n", ret);
ret = usb_set_configuration(devh, 0x0000001);
printf("4 set configuration returned %d\n", ret);
ret = usb_claim_interface(devh, 0);
if (ret != 0) printf("claim after set_configuration failed with error %d\n", ret);
ret = usb_set_altinterface(devh, 0);
printf("4 set alternate setting returned %d\n", ret);
usleep(50*1000);
ret = usb_set_altinterface(devh, 0);
printf("5 set alternate setting returned %d\n", ret);
usleep(62*1000);
*/
ret = usb_control_msg(devh, USB_TYPE_STANDARD + USB_RECIP_DEVICE, USB_REQ_SET_FEATURE, 00000001, 0, buf, 0, 1000);
printf("4 set feature request returned %d\n", ret);
/*
ret = usb_release_interface(devh, 0);
assert(ret == 0);
*/
ret = usb_close(devh);
assert(ret == 0);
printf("Prepnute-OK, Mas ttyUSB0 ttyUSB1 (cez usbserial vendor=0x12d1 product=0x1003)\n");
printf("pozri /proc/bus/usb/devices\n");
return 0;
}

#endif

usb_init();
// usb_set_debug(255);
usb_find_busses();
usb_find_devices();
/*
if (argc!=3) {
printf("usage: %s vendorID productID\n", argv[0]);
printf("ID numbers of currently attached devices:\n");
list_devices();
exit(1);
}
vendor = strtol(argv[1], &endptr, 16);
if (*endptr != '\0') {
printf("invalid vendor id\n");
exit(1);
}
product = strtol(argv[2], &endptr, 16);
if (*endptr != '\0') {
printf("invalid product id\n");
exit(1);
}
*/
printf("Hladam HUAWEI E220 a prepnem na modem - bbo 06\n");
vendor = 0x12d1;
product = 0x1001;
dev = find_device(vendor, product);
assert(dev);

devh = usb_open(dev);
assert(devh);

signal(SIGTERM, release_usb_device);

/*
ret = usb_get_driver_np(devh, 0, buf, sizeof(buf));
printf("usb_get_driver_np returned %d\n", ret);
if (ret == 0) {
printf("interface 0 already claimed by driver \"%s\", attempting to detach it\n", buf);
ret = usb_detach_kernel_driver_np(devh, 0);
printf("usb_detach_kernel_driver_np returned %d\n", ret);
}
ret = usb_claim_interface(devh, 0);
if (ret != 0) {
printf("claim failed with error %d\n", ret);
exit(1);
}

ret = usb_set_altinterface(devh, 0);
assert(ret >= 0);
*/
// BBO typ 1 = DEVICE
ret = usb_get_descriptor(devh, 0x0000001, 0x0000000, buf, 0x0000012);
//printf("1 get descriptor returned %d, bytes: ", ret);
//print_bytes(buf, ret);
//printf("\n");
usleep(1*1000);
// BBO typ 2 = CONFIGURATION
ret = usb_get_descriptor(devh, 0x0000002, 0x0000000, buf, 0x0000009);
//printf("2 get descriptor returned %d, bytes: ", ret);
//print_bytes(buf, ret);
//printf("\n");
usleep(1*1000);
// BBO typ 2 = CONFIGURATION
ret = usb_get_descriptor(devh, 0x0000002, 0x0000000, buf, 0x0000020);
//printf("3 get descriptor returned %d, bytes: ", ret);
//print_bytes(buf, ret);
//printf("\n");
usleep(1*1000);
/*
ret = usb_release_interface(devh, 0);
if (ret != 0) printf("failed to release interface before set_configuration: %d\n", ret);
ret = usb_set_configuration(devh, 0x0000001);
printf("4 set configuration returned %d\n", ret);
ret = usb_claim_interface(devh, 0);
if (ret != 0) printf("claim after set_configuration failed with error %d\n", ret);
ret = usb_set_altinterface(devh, 0);
printf("4 set alternate setting returned %d\n", ret);
usleep(50*1000);
ret = usb_set_altinterface(devh, 0);
printf("5 set alternate setting returned %d\n", ret);
usleep(62*1000);
*/
ret = usb_control_msg(devh, USB_TYPE_STANDARD + USB_RECIP_DEVICE, USB_REQ_SET_FEATURE, 00000001, 0, buf, 0, 1000);
printf("4 set feature request returned %d\n", ret);
/*
ret = usb_release_interface(devh, 0);
assert(ret == 0);
*/
ret = usb_close(devh);
assert(ret == 0);
printf("Prepnute-OK, Mas ttyUSB0 ttyUSB1 (cez usbserial vendor=0x12d1 product=0x1003)\n");
printf("pozri /proc/bus/usb/devices\n");
return 0;
}

*/
ret = usb_close(devh);
assert(ret == 0);
printf("Prepnute-OK, Mas ttyUSB0 ttyUSB1 (cez usbserial vendor=0x12d1 product=0x1003)\n");
printf("pozri /proc/bus/usb/devices\n");
return 0;
}

harpmaster
Posts: 14
Joined: Fri 20 Jun 2008, 09:34

#9 Post by harpmaster »

Hello redrat!

What I did with the huaweiAktBbo.c file was, I changed after looking for my vendor- and
product ID with USBview only the lines 111 and 177 (open with Geany-text-editor, so you can see the numbers of the lines) from product=0x1003 to product=1001
'cause that's my IDs I read in USBview. Maybe you have to do more, also to change the vendor ID.

To create the script: open a text-editor, type in the things I wrote, save it to /root
(or where ever you want), name it f.e. "INTERNET", than right click on the file go to "properties" and mark "Exec(utable)"

redrat
Posts: 24
Joined: Sat 04 Aug 2007, 20:15

#10 Post by redrat »

Dear harpmaster
Thanks for your help.
I'd apply what you have suggested me and the umtsmon run.....but
an error message occur .I've typed the command umtsmon on a terminal as suggested by the script and this is the result:
umtsmon version 0.8
installing GUI SIGABRT handler
##P1 t=387: aLocale '(null)' denied
##P1 t=387: Stored configuration incomplete, reverting to autodetect
/dev//dev/ttyACMO: no such file or directory
/dev//dev/ttyACMO: no such file or directory
##P1 t=387: AutoDetectBase::creteDevice() failed :-(
ioctl:Input/output error
ioctl:Input/output error
/dev/ttyS4:No such file or address
/dev/ttyS_ESSO:No such file or address
/dev/ttyS_PCTELO:No such file or address
##P1 t=387: S_MY_PAIR VOID
/dev/ttyUSB0:no such device
/dev/ttyUSB1:no such device
/dev/ttyUSB2:no such device
## P1 t=390: ***CRITICAL ERROR:No device could be found the application was lose

The only one doubt that I've related to my action during configuration is on the huaweiAktBbo.c file.
I've downloaded it into usr/local/bin directory and modified the 111 and 177 line (my vendor and product Id are the same of your USB dongle 'cause I'd buy a huawei e169 yesterday). Then I've typed on the terminal:
# cd /usr/local/bin
and after
# cc huaweiAktBbo.c -lusb -o huaweiAktBbo
after the enter key the result was
#
is it correct?
then I've copied the file on the /usr/sbin directory and I've created the 3 device ttyUSB as you wrote.
The rest is correct I think.
Where is my error?
Please help me again.

harpmaster
Posts: 14
Joined: Fri 20 Jun 2008, 09:34

#11 Post by harpmaster »

Hello redrat!

It's good to here you bought a E169. Makes the things easier.

You better move the changed huaweiAktBbo.c file to an other place or better store it 'cause you can always use it with your E169. But that's important you have created a new file called "huaweiAktBbo" that you had to find in your directory and this is the executable file and that you have to move to /usr/sbin. This file can be always used for every puppy so don't delete it.
For sure, delete the two files in .umtsmon, 'cause the application does now have wrong entries in it.

So I think we're on the right way

redrat
Posts: 24
Joined: Sat 04 Aug 2007, 20:15

#12 Post by redrat »

Dear harpmaster
I agree that probably this is the right way, nevertheless umtsmon still don't work .
I've found the huaweiAktBbo file in usr/local/bin and I've copied it into usr/sbin directory. Then I've moved the two files huaweiAktBbo.c and huaweiAktBbo.o into another directory (My application). and Ive deleted they also from the usr/local/bin directory (leaving the huaweiAktBbo file).
I havent undrestood where is the directory .umtsmon for delete the huaweiAktBbo.c and .o files.
How can I delete the two files?
Actually the executable file "Internet" is completly dead (before it give me an error message) and in the terminal the umtsmon command give me:
umtsmon version 0.8
installing GUI SIGABRT handler
##P1 t=543: aLocale '(null)' denied
##P1 t=543: Stored configuration incomplete, reverting to autodetect

As you seen the message related to ttyUSB disappear!
.
Can you give me other suggestions?
Thanks

redrat
Posts: 24
Joined: Sat 04 Aug 2007, 20:15

#13 Post by redrat »

I've better read your previous posts and I went to /home directory and showed the hidden files, but there is not any .umtsmon file, why?
Something is gone wrong!
Any idea?
Thanks

harpmaster
Posts: 14
Joined: Fri 20 Jun 2008, 09:34

#14 Post by harpmaster »

Dear redrat!

You only need the created "huaweiAktBbo" in /usr/sbin. No other file in an other directory. So you have to compile the file "huaweiAktBbo.c" with the comands I wrote to "huaweiAktBbo".

The files in .umtsmon have nothing to do with the "huaweiAktBbo" file.
Umtsmon stores here the things it needs.

The script I wrote looks like this :

#/bin/sh
huaweiAktBbo
modprobe usbserial vendor=0x12d1 product=0x1001
umtsmon

So, let me ask you some questions:

Are you sure you have created the new 3 "USBtty" in /dev? Go and look if they are there.

Are you sure the downloaded files are installed correctly? Go to the "Puppy
package manager" and prove it.

You have changed the product ID from product=1003 to product=1001 in the "huaweiAktBbo.c" file and than you compiled it?

If it's all right, try the things I wrote at the end of my "howto".

Please check these and give me the answer! But before I have to go to bed!!

Hear from you!

redrat
Posts: 24
Joined: Sat 04 Aug 2007, 20:15

#15 Post by redrat »

Dear harpmaster
I've controlled all the files installed in package manager and all is OK, the same about the script .
I've deleted all the files huaweiAktBbo (after copy the executable in a USB dongle) and I've replaced it in the usr/sbin directory only this ,as you wrote, and then wow.....worked ! I've answer ignore after the first popup that say that something related to *su are wrong and I've created a new profile,, disabled replace default route and .... don't work. I'try again but the program say "go to command line and write umtsmon -v5 " then many missing files appear and many failed application. I've deleted the two files into the .umtsmon directory (I've found it this time !) but the program don't work . I'm very frustrated because it works the first time and all appear going well!
Any idea?

harpmaster
Posts: 14
Joined: Fri 20 Jun 2008, 09:34

#16 Post by harpmaster »

Hello redrat!

Well, I think we are close to success! But you wrote ".... don't work".
What does that mean? Please send me your "umtsmon -v5" message.
An other thing I want to suggest. You sent me your changed "huaweiAktBbo.c" file and I saw those changes

for (dev = bus->devices; dev; dev = dev->next) {
if (dev->descriptor.idVendor == 12d1
&& dev->descriptor.idProduct == 1001)

but in the original "huaweiAktBbo.c" there is instead of "== 12d1" "== vendor"
and instead of "== 1001" "== product"!! So you should download an original
"huaweiAktBbo.c" file, change the right things (you know) and compile it again.

harpmaster

redrat
Posts: 24
Joined: Sat 04 Aug 2007, 20:15

#17 Post by redrat »

Dear harpmaster
Many thanks for your suggestion and for your patience.
I've worked on the installation of the files and,I don't know why, the installation work perfectly if you start from the live cd ! But since now I've worked on a full installation partition. Sunday I've try to repeat all the passage with live cd and .......all work well and my huawei e169 connect to internet at 500 Kb/sec !
Now the problem is :
How I can transfer all in a full installation of Puppy ? The frugal install appears very slowly responding to the commands for seamonkey (as the cd boot).
I've try also to transfer all the installation passage in a puppy 4.0 release and all works well since the dillo installation due to the missing library libgtk-1.2.so.0 . I've find in the forum some pet packages with this library inside but it seem to be a targz file and not a pet package.
http://www.ttuuxxx.com/bigbass/xmms-1.2 ... on4.00.pet
I think that may be useful to solve this problem because puppy 4.0 works very well in comparison ith 3.01.
What do you think about?

harpmaster
Posts: 14
Joined: Fri 20 Jun 2008, 09:34

#18 Post by harpmaster »

Hello redrat!

I think your message means umtsmon works for you and besides with a hell of speed, I never got it. You didn't mention it but it would make me happy to hear that, 'cause I spent 2 month to make it work.
The problem for me is I've never used puppy 4 yet, and I'm not able to install the debian-packages. So could you tell me how I can do this.
Then I will install puppy 4 on a virtual computer and try something.

harpmaster

redrat
Posts: 24
Joined: Sat 04 Aug 2007, 20:15

#19 Post by redrat »

Hello harpmaster
Yes, I agree that my huawei goes with a hell of speed and your work is fantastic 'cause the same dongle installed in a windows (bleah!) computer doesn't work so well.
The matter about the installation of pb-debianinstaller in puppy 4 is that:
- you have to install further the dillo-0.8.6teki-mu.pet" pb_debianinstaller-alpha09.pet , libusb-0.1.11.pet" and "qt-3.3.8.pet" also the following pet packages: gdk_pixbuf10-0.22.0, glib 12-1.2.10, gtk+12-1-2-0, imlib-1.9.15-1.
-Then is necessary to copy in the /ghttpd directory a htppd.cfg file from a puppy 3.01 installation as i had read in another topic in this forum (now I'vent find it for stitch you the link).
After rebooting the command pb-debianinstaller works to me also in puppy4.
Try you too, I hope to be useful to you as you was for me!

redrat
Posts: 24
Joined: Sat 04 Aug 2007, 20:15

#20 Post by redrat »

Hi to all
Have enyone try to install the umtsmon 0.8 on the new puppy 4.1.1?
I did believe to have found the solution to install it on puppy 4.0, and this was possible with a frugal install, but not in a full install. Umtsmon didn't work in any case in puppy 4.0 and 4.1.1 after installation .
I've think about a solution without success.
There is enyone that can give me a solution?

Post Reply