LINUX.ORG.RU

Сообщения alexxs

 

Алгоритмы лексического анализа

Возникла необходимость выполнять лексический анализ исходного кода на R для дальнейшей его подсветки. Проект пишется на Python (PyQt4), подсветка кода будет выполняться средствами QScintilla.

С подобными задачами не сталкивался, посоветуйте какие алгоритмы лучше использовать, что можно почитать по теме. Не откажусь и от примера реализации подстветки для какого-то языка в QScintilla/PyQt4.

 , ,

alexxs
()

Настройка USB модема Мегафон М150-1 в Slackware

Не получается настроить модем «Мегафон М150-1» (Huawei E3276) в Slackware 14.0 со стандартным SMP-ядром 3.2.29.

Модем определяется как накопитель, на котором в частности есть и каталог с ПО для Linux (некий MobilePartner). Только вот ПО это не ставится, скрипты сыпят ошибками.

Буду благодарен за помощь в настройке, сам до этого с подобными устройствами не сталкивался.

Использую OpenBox, NetworkManager'а нет.

lsusb

Bus 002 Device 005: ID 12d1:14fe Huawei Technologies Co., Ltd.

lsusb -v

Bus 002 Device 005: ID 12d1:14fe Huawei Technologies Co., Ltd.
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  idVendor           0x12d1 Huawei Technologies Co., Ltd.
  idProduct          0x14fe
  bcdDevice            1.02
  iManufacturer           2 HUAWEI Technology
  iProduct                1 HUAWEI Mobile
  iSerial                 0
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           55
    bNumInterfaces          2
    bConfigurationValue     1
    iConfiguration          3 Huawei Configuration
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              500mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass         8 Mass Storage
      bInterfaceSubClass      6 SCSI
      bInterfaceProtocol     80 Bulk-Only
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x01  EP 1 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass         8 Mass Storage
      bInterfaceSubClass      6 SCSI
      bInterfaceProtocol     80 Bulk-Only
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
Device Qualifier (for other device speed):
  bLength                10
  bDescriptorType         6
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  bNumConfigurations      1
Device Status:     0x0000
  (Bus Powered)

usb-devices

T:  Bus=02 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#=  5 Spd=480 MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=12d1 ProdID=14fe Rev=01.02
S:  Manufacturer=HUAWEI Technology
S:  Product=HUAWEI Mobile
C:  #Ifs= 2 Cfg#= 1 Atr=80 MxPwr=500mA
I:  If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
I:  If#= 1 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage

dmesg

usb 2-2: new high-speed USB device number 5 using ehci_hcd
usb 2-2: New USB device found, idVendor=12d1, idProduct=14fe
usb 2-2: New USB device strings: Mfr=2, Product=1, SerialNumber=0
usb 2-2: Product: HUAWEI Mobile
usb 2-2: Manufacturer: HUAWEI Technology
scsi10 : usb-storage 2-2:1.0
scsi11 : usb-storage 2-2:1.1
scsi 10:0:0:0: CD-ROM            HUAWEI   Mass Storage     2.31 PQ: 0 ANSI: 2
scsi 11:0:0:0: Direct-Access     HUAWEI   TF CARD Storage  2.31 PQ: 0 ANSI: 2
sr1: scsi-1 drive
sr 10:0:0:0: Attached scsi CD-ROM sr1
sd 11:0:0:0: [sdb] Attached SCSI removable disk

 , ,

alexxs
()

RSS подписка на новые темы