1

(175 odpowiedzi, napisanych Oprogramowanie / Software)

Cezary, nbd has made small QMI manager -  uqmi . It "weighs" about  90Kb smile     DD-WRT  already added it. Did you try compile it? I've got sam errors  with function 'le16_to_cpu'

In file included from uqmi.h:9:0,
                 from main.c:11:
qmi-message.h: In function 'tlv_data_len':
qmi-message.h:88:2: error: implicit declaration of function 'le16_to_cpu' [-Werror=implicit-function-declaration]  

I've declared it, but another mistackes sad

2

(9 odpowiedzi, napisanych Oprogramowanie / Software)

A jeśli po prostu skompilować usleep?


usleep.c

/* Implementation of the BSD usleep function using nanosleep.
 Copyright (C) 1996, 1997, 1999, 2001, 2003 Free Software Foundation, Inc.
 This file is part of the GNU C Library.
 Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.

 The GNU C Library is free software; you can redistribute it and/or
 modify it under the terms of the GNU Lesser General Public
 License as published by the Free Software Foundation; either
 version 2.1 of the License, or (at your option) any later version.
 
  The GNU C Library is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  Lesser General Public License for more details.
 
  You should have received a copy of the GNU Lesser General Public
  License along with the GNU C Library; if not, see
  <http://www.gnu.org/licenses/>. */
 
#include <time.h>
#include <unistd.h>

int
usleep (useconds_t useconds)
{
 struct timespec ts = { .tv_sec = (long int) (useconds / 1000000),
 .tv_nsec = (long int) (useconds % 1000000) * 1000ul };

 /* Note the usleep() is a cancellation point. But since we call
 nanosleep() which itself is a cancellation point we do not have
 to do anything here. */
 return __nanosleep (&ts, NULL);
}

nanosleep.c


/* Copyright (C) 1996, 1997, 2002 Free Software Foundation, Inc.
 This file is part of the GNU C Library.
 The GNU C Library is free software; you can redistribute it and/or
 modify it under the terms of the GNU Lesser General Public
 License as published by the Free Software Foundation; either
 version 2.1 of the License, or (at your option) any later version.
 The GNU C Library is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 Lesser General Public License for more details.

 You should have received a copy of the GNU Lesser General Public
 License along with the GNU C Library; if not, see
 <http://www.gnu.org/licenses/>. */

#include <errno.h>
#include <time.h>


/* Pause execution for a number of nanoseconds. */
 int
 __libc_nanosleep (const struct timespec *requested_time,
  struct timespec *remaining)
 {
  __set_errno (ENOSYS);
  return -1;
 }
 stub_warning (nanosleep)
 
 weak_alias (__libc_nanosleep, __nanosleep)
 libc_hidden_def (__nanosleep)
 weak_alias (__libc_nanosleep, nanosleep)

3

(175 odpowiedzi, napisanych Oprogramowanie / Software)

Cezary napisał/a:

A gdzie masz qmi-wwan? Jest załadowany?

Cholera jasna! Driver naprawdę nie był /lib/modules/3.3.8.  Zauważyłem. sad  Skompilowana. Postaram się dalej. Dzięki! smile

UPD Ralink rt3052 działa! Będę go przetestować. Jeszcze raz dziękuję! smile

4

(175 odpowiedzi, napisanych Oprogramowanie / Software)

Cezary, jasne, problem ze sterownikiem qmi-wwan
Zgromadzeni, aby promować wizerunek qmi-wwan, cdc-wdm dla Ralink. OpeWRT AA, kernel 3.3.8, Sterownik nie jest załadowany. Insmod nie pomaga. Myślę, że problem z ralinkom. Wziął TP-link mr3020.Skompilowal. Ten sam problem. Źródła z jądra zajęło 3.04.20 Dokonane poprawki qmi-wwan.c, cdc-wdm.c , cdc-wdm.h, usbnet.c (?) dla obrazów?


lsmod

root@OpenWrt:/# lsmod
Module                  Size  Used by    Tainted: G  
option                 14992  0 
usb_wwan                6560  1 option
cdc_wdm                 7072  0 
usbserial              23792  2 option,usb_wwan
usbnet                 12032  0 
ath79_wdt               2240  1

cat /proc/bus/usb/devices

root@OpenWrt:~# cat /proc/bus/usb/devices

....
P:  Vendor=12d1 ProdID=1506 Rev= 0.00
S:  Manufacturer=Huawei Technologies
S:  Product=HUAWEI Mobile
C:* #Ifs= 7 Cfg#= 1 Atr=c0 MxPwr=500mA
I:* If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=01 Prot=01 Driver=option
E:  Ad=81(I) Atr=03(Int.) MxPS=  64 Ivl=2ms
E:  Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms
I:* If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=01 Prot=02 Driver=option
E:  Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms
I:* If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=01 Prot=03 Driver=option
E:  Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms
I:* If#= 3 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=01 Prot=09 Driver=cdc_wdm
E:  Ad=85(I) Atr=03(Int.) MxPS=  64 Ivl=2ms
I:* If#= 4 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=01 Prot=08 Driver=(none)
E:  Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms
I:* If#= 5 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
....

dmesg

[   34.990000] usbcore: registered new interface driver usbserial
[   34.990000] USB Serial support registered for generic
[   35.000000] usbcore: registered new interface driver usbserial_generic
[   35.010000] usbserial: USB Serial Driver core
[   35.040000] cdc_wdm 1-1:1.3: Ignoring extra header, type 15, length 13
[   35.050000] cdc_wdm 1-1:1.3: Ignoring extra header, type 6, length 5
[   35.050000] cdc_wdm 1-1:1.3: cdc-wdm0: USB WDM device
[   35.060000] usbcore: registered new interface driver cdc_wdm
[   35.100000] USB Serial support registered for GSM modem (1-port)
[   35.100000] option 1-1:1.0: GSM modem (1-port) converter detected

opkg list-installed

root@OpenWrt:/# opkg list-installed
......
kmod-qmi-wwan - 3.3.8-1
kmod-scsi-core - 3.3.8-1
kmod-usb-core - 3.3.8-1
kmod-usb-net - 3.3.8-1
kmod-usb-ohci - 3.3.8-1
kmod-usb-serial - 3.3.8-1
kmod-usb-serial-option - 3.3.8-1
kmod-usb-serial-wwan - 3.3.8-1
kmod-usb-storage - 3.3.8-1
kmod-usb-uhci - 3.3.8-1
kmod-usb-wdm - 3.3.8-1
kmod-usb2 - 3.3.8-1
.....

Powiedz mi, jaki jest twój sekret?:)

5

(225 odpowiedzi, napisanych Oprogramowanie / Software)

lukaszpieter napisał/a:

Konfiguracja jest na stronie Cezarego. Jedyne co musiałem jeszcze zmienić, to firewall. Wyłączyłem wbudowanego i użyłem własnego skryptu - skryptu który jest również dostępny na stronie Cezarego.

I jaki rodzaj skryptu? Byli tu dużo. Jestem zdezorientowany. sad Czy możesz podać link?
Dzięki

6

(175 odpowiedzi, napisanych Oprogramowanie / Software)

Dziękuję. Próbować smile

7

(175 odpowiedzi, napisanych Oprogramowanie / Software)

Cezary napisał/a:

Bo w openwrt nie ma qmi domyślnie. Używasz trunka czy aa?

Dodałem dobrze qmi-wwan ręcznie. Wszystkie zebrane. AA Trunk nie jest używany. Próbować

8

(175 odpowiedzi, napisanych Oprogramowanie / Software)

Cezary napisał/a:

@trofim: dla 1043 sprawdź sobie to, ma już qmi wkompilowane: http://ecco.selfip.net/test/modem-sysupgrade.bin

Cezary, czy można umieścić .config plik? Próbuję skompilować dla Ralink rf305x. Ale nie wydaje /dev/cdc-wdm, choć dobrze-ins qmi-wwan i cdc-wdm idzie normalnie. Myślę, że czegoś brakuje. Dziękuję.

9

(175 odpowiedzi, napisanych Oprogramowanie / Software)

Cezary napisał/a:

@rusink: yes, E398 require usb-modeswitch/usb-modeswich-data

Sorry for my polish sad. I've mean what message content did you use for switching to QMI exactly?

10

(175 odpowiedzi, napisanych Oprogramowanie / Software)

Cezary napisał/a:

Hmm, wiecie co - uruchomiłem to  E398 na qmi

Cezary,  сzego użyć do message content  usb-modeswitch połączyć E398 do QMI protokołu?

11

(225 odpowiedzi, napisanych Oprogramowanie / Software)

Cezary napisał/a:

121889 ma mój: https://dl.dropbox.com/u/60469886/hw_cdc_driver.c

Cezary ,czy można umieścić więcej czasu. Link nie działa. Dzięki

12

(175 odpowiedzi, napisanych Oprogramowanie / Software)

Cezary napisał/a:

No dobra, skompilowałem. Odinstalujcie glib2, libqmi-glib i zainstalujcie nowe wersje z repo i testujcie.

Skompilowany na kernele 3.6.7 - Interfejs cdc-wdm lub qmi-wwan nadal nie widać, ale w Internecie /dev/ttyusb2 podwyżki...

Przepraszam mój polski sad

13

(175 odpowiedzi, napisanych Oprogramowanie / Software)

Cezary napisał/a:

No dobra, skompilowałem, jest w repo. Robienie backportu glibca to już nie na moje nerwy, przynajmniej nie na wieczór.

Spróbuj tego Makefile

#
# Copyright (C) 2007-2011 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#

include $(TOPDIR)/rules.mk

PKG_NAME:=glib2
PKG_VERSION:=2.28.8
PKG_RELEASE:=2

PKG_SOURCE:=glib-$(PKG_VERSION).tar.bz2
PKG_BUILD_DIR:=$(BUILD_DIR)/glib-$(PKG_VERSION)
PKG_SOURCE_URL:=@GNOME/glib/2.28
PKG_MD5SUM:=789e7520f71c6a4bf08bc683ec764d24

PKG_FIXUP:=autoreconf
PKG_BUILD_DEPENDS:=glib2/host libpthread zlib
HOST_BUILD_DEPENDS:=gettext/host libiconv/host
PKG_INSTALL:=1

HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/glib-$(PKG_VERSION)

include $(INCLUDE_DIR)/host-build.mk
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/nls.mk

define Package/glib2
  SECTION:=libs
  CATEGORY:=Libraries
  DEPENDS:=$(ICONV_DEPENDS) $(INTL_DEPENDS) +zlib +libpthread
  TITLE:=glib 2.0
  URL:=http://www.gtk.org/
endef

define Package/glib2/description
  The GLib library of C routines
endef

define Build/Configure
    $(call Build/Configure/Default, \
        --enable-shared \
        --enable-static \
        --enable-debug=no \
        --disable-selinux \
        --disable-fam \
        $(if $(ICONV_FULL),--with-libiconv=gnu) \
        , \
        glib_cv_stack_grows=no \
        glib_cv_uscore=no \
        ac_cv_path_GLIB_GENMARSHAL=$(STAGING_DIR_HOST)/bin/glib-genmarshal \
        ac_cv_func_mmap_fixed_mapped=yes \
        ac_cv_func_posix_getpwuid_r=yes \
        ac_cv_func_posix_getgrgid_r=yes \
    );
endef

define Build/InstallDev
    $(INSTALL_DIR) $(1)/usr/include
    $(CP) \
        $(PKG_INSTALL_DIR)/usr/include/glib-2.0 \
        $(1)/usr/include/
    $(CP) \
        $(PKG_INSTALL_DIR)/usr/lib/glib-2.0/include/*.h \
        $(1)/usr/include/glib-2.0/
    $(CP) \
        $(PKG_INSTALL_DIR)/usr/include/gio-unix-2.0 \
        $(1)/usr/include/

    $(INSTALL_DIR) $(1)/usr/lib
    $(CP) \
        $(PKG_INSTALL_DIR)/usr/lib/glib-2.0 \
        $(1)/usr/lib/

    $(CP) \
        $(PKG_INSTALL_DIR)/usr/lib/*.{so*,a,la} \
        $(1)/usr/lib/

    $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
    $(INSTALL_DATA) \
        $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc \
        $(1)/usr/lib/pkgconfig

    $(INSTALL_DIR) $(2)/share/aclocal/
    $(INSTALL_DATA) \
        $(PKG_INSTALL_DIR)/usr/share/aclocal/*.m4  \
        $(2)/share/aclocal/
endef

define Package/glib2/install
    $(INSTALL_DIR) $(1)/usr/lib
    $(CP) \
        $(PKG_INSTALL_DIR)/usr/lib/*.so* \
        $(1)/usr/lib/
endef

$(eval $(call HostBuild))
$(eval $(call BuildPackage,glib2))

Jeśli są problemy z libusb spróbować :

#
# Copyright (C) 2006-2008 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#

include $(TOPDIR)/rules.mk

PKG_NAME:=libusb
PKG_VERSION:=0.1.12
PKG_RELEASE:=2

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@SF/libusb
PKG_MD5SUM:=caf182cbc7565dac0fd72155919672e6
PKG_FIXUP:=autoreconf

include $(INCLUDE_DIR)/package.mk

PKG_INSTALL=1

define Package/libusb
  SECTION:=libs
  CATEGORY:=Libraries
  TITLE:=A library for accessing Linux USB devices
  URL:=http://libusb.sourceforge.net/
endef

define Package/libusbpp
  SECTION:=libs
  CATEGORY:=Libraries
  TITLE:=A C++ library for accessing Linux USB devices
  URL:=http://libusb.sourceforge.net/
  DEPENDS:=+libstdcpp +libusb
endef

define Build/Configure
    $(call Build/Configure/Default, \
        --enable-shared \
        --enable-static \
    )
endef

TARGET_CFLAGS += $(FPIC)

define Build/InstallDev
    $(INSTALL_DIR) $(2)/bin
    $(INSTALL_BIN) \
        $(PKG_INSTALL_DIR)/usr/bin/libusb-config \
        $(2)/bin/
    $(SED) \
        's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' \
        $(2)/bin/libusb-config

    $(INSTALL_DIR) $(1)/usr/include
    $(INSTALL_DATA) \
        $(PKG_INSTALL_DIR)/usr/include/usb.h \
        $(1)/usr/include/

    $(INSTALL_DIR) $(1)/usr/lib
    $(CP) \
        $(PKG_INSTALL_DIR)/usr/lib/libusb*.{la,so*,a} \
        $(1)/usr/lib/

    $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
    $(INSTALL_DATA) \
        $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libusb.pc \
        $(1)/usr/lib/pkgconfig/
endef

define Package/libusb/install
    $(INSTALL_DIR) $(1)/usr/lib
    $(CP) \
        $(PKG_INSTALL_DIR)/usr/lib/libusb.so* \
        $(PKG_INSTALL_DIR)/usr/lib/libusb-*.so* \
        $(1)/usr/lib/
endef

define Package/libusbpp/install
    $(INSTALL_DIR) $(1)/usr/lib
    $(CP) \
        $(PKG_INSTALL_DIR)/usr/lib/libusbpp.so* \
        $(PKG_INSTALL_DIR)/usr/lib/libusbpp-*.so* \
        $(1)/usr/lib/
endef

$(eval $(call BuildPackage,libusb))
$(eval $(call BuildPackage,libusbpp))

14

(13 odpowiedzi, napisanych Oprogramowanie / Software)

Misiek7719 napisał/a:

Próbowałem te komendy .. niestety pojawił się errory że komenda nieznana.... Kolejne podejście w piątek

Jest oczywiste ...
Ta komenda jest wykonywane?

AT^SYSCFGEX=?


Spróbuj użyć programu myhuaweiterminal_v0.32 - http://letitbit.net/download/72389.7daa … l.rar.html  pod Windows

15

(13 odpowiedzi, napisanych Oprogramowanie / Software)

Misiek7719 napisał/a:

Jest przez PLUSA sprzedawany jako LTE i na USB wycąga powyżej 20Mb gdy na openwrt spada na 5Mb więc chyba tak .... Niestety pod openwrt nie udało mi się sparwdzić  poleceniem AT z poziomu shella bo miałem zbyt mało czasu jak na mój poziom wiedzy odnośnie linux'a

Spróbuj zmienić ustawienia modemu. Czy tylko tryb LTE.
komendy AT:

AT^SYSCFGEX="03",3fffffff,2,4,7fffffffffffffff,,

trybem domyślnym:

AT^SYSCFGEX="00",3fffffff,2,4,7fffffffffffffff,,

Szczegółowe informacje ze dotyczącymi plus Frequency

AT^SYSCFGEX=?

16

(225 odpowiedzi, napisanych Oprogramowanie / Software)

Cezary napisał/a:

Skasuj tego całego if'a. Kod się skompiluje bez niego.

Dobrze. Dziękuję. A co jest jądrem OpenWRT?

17

(225 odpowiedzi, napisanych Oprogramowanie / Software)

Cezary napisał/a:

Just remove this declaration.

Przepraszamy, nie rozumiem co masz na myśli. Można odpowiedzieć w języku polskim. Delali patch dla hw_cdc_ether pod OpenWRT? Dziękuję

18

(225 odpowiedzi, napisanych Oprogramowanie / Software)

frutis napisał/a:

Probuje dodac do kompilacji modul hw_cdc_driver i nie za bardzo mi sie to udaje.
....
Co jeszcze musze dodac/zmienic albo co zle skonfigurowalem?

Sorry, I writing english. Did you compile this driver succesfully for OpenWRT? I'v tryed to compile it (for 2.6.39.4 Kernel Version ) but got some mistackes - error: redefinition of...

Here is a part of report:

In file included from drivers/net/usb/hw_cdc_driver.c:132:0:
include/linux/unaligned/access_ok.h:7:19: error: redefinition of 'get_unaligned_le16'
include/linux/unaligned/le_struct.h:6:19: note: previous definition of 'get_unaligned_le16' was here

The problem is here :

#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
#include <linux/unaligned/access_ok.h>
#else

 static inline u16 get_unaligned_le16(const void *p)
{
    return le16_to_cpup((__le16 *)p);
}

static inline u32 get_unaligned_le32(const void *p)
{
    return le32_to_cpup((__le32 *)p);
}

static inline void put_unaligned_le16(u16 val, void *p)
{
    *((__le16 *)p) = cpu_to_le16(val);
}

static inline void put_unaligned_le32(u32 val, void *p)
{
    *((__le32 *)p) = cpu_to_le32(val);
} 
#endif 

I think gcc try to copy the same code from varios headers. sad  I've succesfully compiled thise driver under Debian (2.6.32-5-686) & for ZyXEL Keenetic (OpenWRT based - 2.6.23-rt), but no idea how to do it for another kernel sad