Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Thu 02 Oct 2014, 02:52
All times are UTC - 4
 Forum index » House Training » Beginners Help ( Start Here)
I got UMTSMON 0.8 USB-modem working
Moderators: Flash, Ian, JohnMurga
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 1 of 2 Posts_count   Goto page: 1, 2 Next
Author Message
harpmaster

Joined: 20 Jun 2008
Posts: 14

PostPosted: Mon 14 Jul 2008, 16:43    Post_subject:  I got UMTSMON 0.8 USB-modem working
Sub_title: If anyone wants to know how I did it...
 

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!
Back to top
View user's profile Send_private_message 
redrat

Joined: 04 Aug 2007
Posts: 24

PostPosted: Mon 14 Jul 2008, 17:20    Post_subject: Nokia 6600 internet connection umts  

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
Back to top
View user's profile Send_private_message 
harpmaster

Joined: 20 Jun 2008
Posts: 14

PostPosted: Tue 15 Jul 2008, 07:45    Post_subject:  

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
Back to top
View user's profile Send_private_message 
redrat

Joined: 04 Aug 2007
Posts: 24

PostPosted: Tue 15 Jul 2008, 09:12    Post_subject: UMTS connection  

Many thanks .
I keep in touch !
Back to top
View user's profile Send_private_message 
harpmaster

Joined: 20 Jun 2008
Posts: 14

PostPosted: Thu 17 Jul 2008, 03:27    Post_subject:  

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/qt3-dev-tools/download
http://packages.ubuntu.com/de/gutsy/i386/libaudio2/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

Edited_times_total
Back to top
View user's profile Send_private_message 
redrat

Joined: 04 Aug 2007
Posts: 24

PostPosted: Thu 17 Jul 2008, 12:19    Post_subject:  

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.
Back to top
View user's profile Send_private_message 
harpmaster

Joined: 20 Jun 2008
Posts: 14

PostPosted: Thu 17 Jul 2008, 14:10    Post_subject:  

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/qt3-dev-tools/download
http://packages.ubuntu.com/de/gutsy/i386/libaudio2/download

Good luck!
Back to top
View user's profile Send_private_message 
redrat

Joined: 04 Aug 2007
Posts: 24

PostPosted: Thu 17 Jul 2008, 16:18    Post_subject:  

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[i]));
}
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);/* 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[i]));
}
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];/* 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[i]));
}
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);
}/* 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[i]));
}
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;
}
Back to top
View user's profile Send_private_message 
harpmaster

Joined: 20 Jun 2008
Posts: 14

PostPosted: Fri 18 Jul 2008, 04:14    Post_subject:  

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)"
Back to top
View user's profile Send_private_message 
redrat

Joined: 04 Aug 2007
Posts: 24

PostPosted: Fri 18 Jul 2008, 05:01    Post_subject:  

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 Sad
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.
Back to top
View user's profile Send_private_message 
harpmaster

Joined: 20 Jun 2008
Posts: 14

PostPosted: Fri 18 Jul 2008, 06:54    Post_subject:  

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
Back to top
View user's profile Send_private_message 
redrat

Joined: 04 Aug 2007
Posts: 24

PostPosted: Fri 18 Jul 2008, 14:21    Post_subject:  

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
Back to top
View user's profile Send_private_message 
redrat

Joined: 04 Aug 2007
Posts: 24

PostPosted: Fri 18 Jul 2008, 15:51    Post_subject:  

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
Back to top
View user's profile Send_private_message 
harpmaster

Joined: 20 Jun 2008
Posts: 14

PostPosted: Fri 18 Jul 2008, 20:26    Post_subject:  

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!
Back to top
View user's profile Send_private_message 
redrat

Joined: 04 Aug 2007
Posts: 24

PostPosted: Sat 19 Jul 2008, 16:50    Post_subject:  

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?
Back to top
View user's profile Send_private_message 
Display_posts:   Sort by:   
Page 1 of 2 Posts_count   Goto page: 1, 2 Next
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » House Training » Beginners Help ( Start Here)
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1461s ][ Queries: 11 (0.0034s) ][ GZIP on ]