EzDevInfo.com

pyusb

USB access on python PyUSB pyusb : usb access on python

I want to connect my program to image scanner

I want to write program with python which can get input from scanner and save as jpg. I don't have any idea how to start. please help.


Source: (StackOverflow)

Pyusb - Errno 13 Acces denied for Control Transfer - Mac OS X

I am trying to send a control transfer command through pyusb over a Mac OS: dev.ctrl_transfer(0x21,0x09,0x0200,0x0,0x1)

I get the error:

Traceback (most recent call last):
  File "./main.py", line 21, in <module>
    dev.ctrl_transfer(0x21,0x09,0x0200,0x0000,0x0001)
  File "/Library/Python/2.7/site-packages/usb/core.py", line 962, in ctrl_transfer
    self._ctx.managed_claim_interface(self, interface_number)
  File "/Library/Python/2.7/site-packages/usb/core.py", line 146, in managed_claim_interface
    self.backend.claim_interface(self.handle, i)
  File "/Library/Python/2.7/site-packages/usb/backend/libusb1.py", line 747, in claim_interface
    _check(self.lib.libusb_claim_interface(dev_handle.handle, intf))
  File "/Library/Python/2.7/site-packages/usb/backend/libusb1.py", line 552, in _check
    raise USBError(_strerror(ret), ret, _libusb_errno[ret])
usb.core.USBError: [Errno 13] Access denied (insufficient permissions)

Can someone help me with this. I tried sudo, su. Also I had posted this in pyusb github user group. I got this(adding myself to a plugdev group in debian systems) as a possible solution but I am not sure how to proceed with a Mac OS https://github.com/braiden/python-ant-downloader/issues/30#issuecomment-55293142

Linked with the following questions:

OUT Endpoint not accessible by pyusb

PyUSB dev.set_configuration() (the solution is for ubuntu)


Source: (StackOverflow)

Advertisements

Tkinter and detection of USB devices

I would like to monitor the presence of USB devices and have found modules such as PyUSB that serve this purpose. However, I don't know how to run USB detection services alongside the Tkinter main loop. Is this possible?


Source: (StackOverflow)

Reading data from a Tenma 72-7732 multimeter using PyUSB

I'm trying to read voltages from a Tenma 72-7732 multimeter with a HID USB connection using PyUSB and libusb. This is my code so far:

def main():
    import usb.core
    import usb.util
    import usb.backend
    import sys

    #find device

    dev = usb.core.find(idVendor=0x1a86, idProduct=0xe008)

    # did you find it?
    if dev is None:
        raise ValueError('Device not found')
    else:
        print "Device found"


    dev.set_configuration()


    endpoint = dev[0][(0,0)][0]

    data = dev.read(endpoint.bEndpointAddress, endpoint.wMaxPacketSize, 0, 100000)

    print data

main()

This finds the device, but when it tries to read the data, it gives a timeout error. The multimeter has very bad documentation and support, so I can't go there for help. How can I read the device successfully?


Source: (StackOverflow)

PyUSB Can't find device

I am running OS X 10.5 and am trying to connect to a USB device via PyUSB with the following code.

   import usb.core, time, usb

   dev = usb.core.find(idVendor=0x054c,idProduct=0x0155)
    if dev is None:
      raise ValueError('Device not found')           # if device not found report an error

Though the value error 'device not found' is thrown. OS X System Profiler denotes the devices product and vendor id as..

      EyeToy USB camera Namtai:

      Product ID: 0x0155
      Vendor ID: 0x054c  (Sony Corporation)
      Version: 1.00
      Speed: Up to 12 Mb/sec
      Manufacturer: Sony corporation
      Location ID: 0x06200000 / 3
      Current Available (mA): 500
      Current Required (mA): 500

Solution: Had to manual install libusb-1.0.8. Mac-ports didn't install libusb correctly.


Source: (StackOverflow)

pyusb assertion error - no usb out endpoint?

I'm trying to program (upload new messages to) a scrolling LED badge via python on Linux instead of via the windows exe. I've got a capture of a successful upload via the windows app that I'll use as a template, but at the moment I'm having trouble writing anything at all to the device.

When I run my script, I get an assertion error, which I assume means that no OUT endpoints have been found. lsusb seems to corroborate this, but I could be mistaken. This is basically straight from the pyusb tutorial with alternate_setting removed from intf because it was causing a pipe error and is apparently not necessary.

intf = usb.util.find_descriptor(cfg, bInterfaceNumber = interface_number,)

ep = usb.util.find_descriptor(
    intf,
    # match the first OUT endpoint
    custom_match = \
    lambda e: \
        usb.util.endpoint_direction(e.bEndpointAddress) == \
        usb.util.ENDPOINT_OUT
)

assert ep is not None # < assertion error

In case it helps, lsusb -vv for the LED badge: http://bpaste.net/show/biixy6e38A71WlCw7euU/

Any guidance would be much appreciated - I'm entirely new to USB protocol, and not great at python either.


Source: (StackOverflow)

PyUSB/ similar USB functionality for Python 2.7

Is it possible to get a program like PyUSB, or similar, for python version 2.7?


Source: (StackOverflow)

controlling mouse with pyusb

I have to make a application, that do the followings:

  • disable that the given usb mouse move the pointer in the screen (just the given, not all mouses).
  • get the coordinates of the mouse pointer
  • change the y coordinate of the mouse pointer

I've tried out pyusb, but i've never found any examples for any of the 3 problems.
Any ideas?


Source: (StackOverflow)

How do I monitor pyusb events in the background on a windows machine

I have a PyUSB+PyQt script working on windows interfacing with a USB printer. I want to respond to printer connect/disconnect events.

I am unsure on how to write the event loop to keep monitoring the USB port. I will also have some processing going on in my main program, so should this be running in a separate thread.

Could someone help with the best practice to build this kind of a PyUSB functionality ?


Source: (StackOverflow)

Why does PyUSB / libusb require root (sudo) permissions on Linux?

I have been toying around with PyUSB lately, and found that it works beautifully on Linux (Ubuntu has libusb 0.1 and 1.0, as well as OpenUSB)... but only if I run the program with root privileges (with sudo, of course).

Can anyone tell me why it requires elevated privileges and, more importantly, if I can change the permissions somehow to make it work for normal user accounts?


Source: (StackOverflow)

PyUSB backend not accessible

hey i am trying to run the simple script available in the tutorial;. the usb is getting imported but when i try to search the device i get the following error,please help

>>> dev=usb.core.find()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Python27\lib\site-packages\usb\core.py", line 819, in find
    raise ValueError('No backend available')
ValueError: No backend available

Source: (StackOverflow)

Pyusb on windows - no backend available

I'm trying to have my python application interface with an NFC device via USB. The best option seems to be pyusb, but I can't get it to connect to the libusb backend. I keep getting ValueError: No backend available

I've looked at the stack trace, and found that usb/backend/libusb10.py (which is part of pyusb) is trying to load libusb-1.0.dll to use as the backend, but it can't find it. It's not that its not in my path, its not on my computer at all!

I have installed libusb-win32 (http://libusb.org/wiki/libusb-win32), but the resulting directory only seems to include libusb0.dll. Where is libusb-1.0.dll???!

I would love to know either where to get that dll, or even a different suggestion to get pyusb to work on Windows 7.


Source: (StackOverflow)

python pyusb import usb.core doesn't work

I am following the tutorial(http://pyusb.sourceforge.net/docs/1.0/tutorial.html)

I am on windows xp sp3, my python version is 2.7 and I downloaded and installed the pyusb-1.0.0-a1.zip

and libusb-win32-bin-1.2.4.0.zip

import usb

works fine

but

import usb.core

doesn't working at all

it says

Traceback (most recent call last):
  File "D:\py\usb.py", line 1, in <module>
    from usb import core
  File "D:\py\usb.py", line 1, in <module>
    from usb import core
ImportError: cannot import name core

any solution?

thanks!

p.s. "from usb import core" this make

Traceback (most recent call last):
  File "D:\py\usb.py", line 1, in <module>
    from usb import core
  File "D:\py\usb.py", line 1, in <module>
    from usb import core
ImportError: cannot import name core

full source code is here

from usb import core
#find device
dev = usb.core.find(idVendor=0x1516, idProduct=0x8628)
#found?
if dev is None :
        raise ValueError('device not found')

#set the active config. with no args, the first config will be the active one

dev.set_configuration()

#get an end point instance
ep = usb.util.find_descriptor(
    dev.get_interface_altsetting(), #first interface
    #match the first Out Endpoint
    custom_match = \
        lambda e: \
            usb.util.endpoint_direction(e.bEndpointAddress) == \
            usb.util.ENDPOINT_OUT)
assert ep is not None

while(1):
    ep.write(0x5553424350DDBC880000000000000600000000000000000000000000000000)
    ep.write(0x5553425350ddbc880000000000)

Source: (StackOverflow)

How to reverse engineering USB/HID/BlueTooth dongle. What tools to use?

Need to reverse engineering bluetooth usb mouse dongle, and use mouse board to measure distance, and plot them with matplotlib

enter image description here

I've found these tools that can help with this task:

Linux

  • lsusb
  • usbmon
  • usbhid-dump
  • rfcomm
  • hidrd-convert
  • xxd
  • hcitool
  • evdev-dump

Windows


Bibliography:

  1. https://www.silabs.com/Support Documents/TechnicalDocs/AN249.pdf
  2. www.usb.org/developers/devclass_docs/HID1_11.pdf
  3. Usbhid-dump - digimend
  4. Linux, HID and PyUSB
  5. MagTek Credit Card Reader in Linux
  6. Evdev-dump - digimend

Examples:

lnx#> lsusb -s 2

Bus 005 Device 002: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)
Bus 003 Device 002: ID 192f:0716 Avago Technologies, Pte. 
Bus 002 Device 002: ID 1bcf:053a Sunplus Innovation Technology Inc. Targa Silvercrest OMC807-C optische Funkmaus

lnx#> sudo lsusb -s 2:4 -v

Bus 002 Device 004: ID 1bcf:053a Sunplus Innovation Technology Inc. Targa Silvercrest OMC807-C optische Funkmaus
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0         8
  idVendor           0x1bcf Sunplus Innovation Technology Inc.
  idProduct          0x053a Targa Silvercrest OMC807-C optische Funkmaus
  bcdDevice           a0.31
  iManufacturer           0 
  iProduct                2 2.4GHz 2way RF Receiver
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           34
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0xa0
      (Bus Powered)
      Remote Wakeup
    MaxPower               46mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      1 Boot Interface Subclass
      bInterfaceProtocol      2 Mouse
      iInterface              0 
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.00
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength     179
         Report Descriptors: 
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0008  1x 8 bytes
        bInterval              10
Device Status:     0x0000
  (Bus Powered)

lnx#> lsusb -t     
/:  Bus 05.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
    |__ Port 2: Dev 2, If 0, Class=Wireless, Driver=btusb, 12M
    |__ Port 2: Dev 2, If 1, Class=Wireless, Driver=btusb, 12M
/:  Bus 04.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
/:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
    |__ Port 2: Dev 2, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
    |__ Port 1: Dev 4, If 1, Class=Human Interface Device, Driver=usbhid, 1.5M
    |__ Port 2: Dev 3, If 0, Class=Human Interface Device, Driver=usbhid, 12M
    |__ Port 2: Dev 3, If 1, Class=Human Interface Device, Driver=usbhid, 12M
    |__ Port 2: Dev 3, If 2, Class=Human Interface Device, Driver=usbhid, 12M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/8p, 480M
    |__ Port 3: Dev 4, If 0, Class=Video, Driver=uvcvideo, 480M
    |__ Port 3: Dev 4, If 1, Class=Video, Driver=uvcvideo, 480M
    |__ Port 3: Dev 4, If 2, Class=Audio, Driver=snd-usb-audio, 480M
    |__ Port 3: Dev 4, If 3, Class=Audio, Driver=snd-usb-audio, 480M

lnx#> sudo usbmon -f0
ffff8800764640c0 4022916298 C Ii:003:01 0 8 = 00000000 00000000
ffff8800764640c0 4022916321 S Ii:003:01 -115 8 <
ffff880076464a80 4025994204 C Ii:004:01 0 6 = 0100ff00 0000
ffff880076464a80 4025994229 S Ii:004:01 -115 7 <
ffff880076464a80 4026010207 C Ii:004:01 0 6 = 0100ff00 0000
ffff880076464a80 4026010238 S Ii:004:01 -115 7 <
ffff880076464a80 4026018204 C Ii:004:01 0 6 = 0100ff00 0000
ffff880076464a80 4026018225 S Ii:004:01 -115 7 <
ffff880076464a80 4026026199 C Ii:004:01 0 6 = 0100ff00 0000

lnx#> sudo usbhid-dump -s 2:4                                                 
002:004:001:DESCRIPTOR         1393614919.941888
 05 01 09 02 A1 01 85 01 05 09 19 01 29 08 15 00
 25 01 95 08 75 01 81 02 05 01 09 01 A1 00 09 30
 09 31 09 38 15 81 25 7F 75 08 95 03 81 06 05 0C
 0A 38 02 95 01 81 06 C0 06 00 FF 09 01 15 00 26
 FF 00 75 08 95 07 B1 02 C0 06 F3 F1 0A F3 F1 A1
 01 85 02 09 00 95 01 75 08 15 00 26 FF 00 81 02
 C0 05 0C 09 01 A1 01 85 03 15 00 26 FF 03 19 00
 2A FF 03 75 10 95 03 81 00 C0 05 01 09 80 A1 01
 85 04 05 01 19 81 29 83 15 00 25 01 95 03 75 01
 81 06 95 01 75 05 81 01 C0 06 BC FF 09 88 A1 01
 85 05 19 00 2A FF 00 15 00 26 FF 00 75 08 95 01
 81 00 C0

lnx#> sudo usbhid-dump -s 2:4 | tail -n +2 | xxd -r -p | hidrd-convert -o spec            
Usage Page (Desktop),               ; Generic desktop controls (01h)
Usage (Mouse),                      ; Mouse (02h, application collection)
Collection (Application),
    Report ID (1),
    Usage Page (Button),            ; Button (09h)
    Usage Minimum (01h),
    Usage Maximum (08h),
    Logical Minimum (0),
    Logical Maximum (1),
    Report Count (8),
    Report Size (1),
    Input (Variable),
    Usage Page (Desktop),           ; Generic desktop controls (01h)
    Usage (Pointer),                ; Pointer (01h, physical collection)
    Collection (Physical),
        Usage (X),                  ; X (30h, dynamic value)
        Usage (Y),                  ; Y (31h, dynamic value)
        Usage (Wheel),              ; Wheel (38h, dynamic value)
        Logical Minimum (-127),
        Logical Maximum (127),
        Report Size (8),
        Report Count (3),
        Input (Variable, Relative),
        Usage Page (Consumer),      ; Consumer (0Ch)
        Usage (AC Pan),             ; AC pan (0238h, linear control)
        Report Count (1),
        Input (Variable, Relative),
    End Collection,
    Usage Page (FF00h),             ; FF00h, vendor-defined
    Usage (01h),
    Logical Minimum (0),
    Logical Maximum (255),
    Report Size (8),
    Report Count (7),
    Feature (Variable),
End Collection,
Usage Page (F1F3h),                 ; F1F3h, reserved
Usage (F1F3h),
Collection (Application),
    Report ID (2),
    Usage (00h),
    Report Count (1),
    Report Size (8),
    Logical Minimum (0),
    Logical Maximum (255),
    Input (Variable),
End Collection,
Usage Page (Consumer),              ; Consumer (0Ch)
Usage (Consumer Control),           ; Consumer control (01h, application collection)
Collection (Application),
    Report ID (3),
    Logical Minimum (0),
    Logical Maximum (1023),
    Usage Minimum (00h),
    Usage Maximum (03FFh),
    Report Size (16),
    Report Count (3),
    Input,
End Collection,
Usage Page (Desktop),               ; Generic desktop controls (01h)
Usage (Sys Control),                ; System control (80h, application collection)
Collection (Application),
    Report ID (4),
    Usage Page (Desktop),           ; Generic desktop controls (01h)
    Usage Minimum (Sys Power Down), ; System power down (81h, one-shot control)
    Usage Maximum (Sys Wake Up),    ; System wake up (83h, one-shot control)
    Logical Minimum (0),
    Logical Maximum (1),
    Report Count (3),
    Report Size (1),
    Input (Variable, Relative),
    Report Count (1),
    Report Size (5),
    Input (Constant),
End Collection,
Usage Page (FFBCh),                 ; FFBCh, vendor-defined
Usage (88h),
Collection (Application),
    Report ID (5),
    Usage Minimum (00h),
    Usage Maximum (FFh),
    Logical Minimum (0),
    Logical Maximum (255),
    Report Size (8),
    Report Count (1),
    Input,
End Collection

lnx#> sudo usbhid-dump -s 2:4 -es
Starting dumping interrupt transfer stream
with 1 minute timeout.

002:004:001:STREAM             1393615361.032412
 01 00 01 FF 00 00

002:004:001:STREAM             1393615361.392401
 01 00 FF 00 00 00

002:004:001:STREAM             1393615361.400380
 01 00 FC 02 00 00

002:004:001:STREAM             1393615361.424382
 01 00 FF 01 00 00

002:004:001:STREAM             1393615361.432377
 01 00 FE 00 00 00

002:004:001:STREAM             1393615361.440378
 01 00 FF 01 00 00

002:004:001:STREAM             1393615361.592374
 01 00 FF 00 00 00

002:004:001:STREAM             1393615361.608392
 01 00 FF 00 00 00

002:004:001:STREAM             1393615361.616373
 01 00 FF 00 00 00

Source: (StackOverflow)

PyUsb USB Barcode Scanner

I'm trying to output a string from a barcode or qrcode using a Honeywell USB 3310g scanner in Ubuntu. I have libusb and a library called metro-usb (http://gitorious.org/other/metro-usb) which are enabling my scanner to work. If i open gedit and scan, I successfully get the qrcode data fine! I need to be able to build this pragmatically and send the data to a web service.

I've downloaded and instally pyusb and this seems to be the best solution best on my research. I have a script based on things i've found on the web that waits for the scan and successfully gives me a result on the scan even. however, I am unsure how to read the data. I get an array of data that doesn't really make any sense. I'm not familiar with USB programming or Python either. Can anyone direct me to the best way to simply get the string of data from the USB barcode scan? I can most-likely figure out the rest. Also, I am getting an error that I always have to comment out to get the program to run when I try to set_configuration. I always get a Error saying Resource is Busy...not sure if this has anything to do with it..I've gotten this script off the web, and the Product ID and Vendor ID from my lsusb command. When i run this with the set_configuration commented out, I get:

Waiting to read...

When scanned:

0x0 0x0 0xb 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x17 0x0 0x0 0x0 0x0 0x0
Traceback (most recent call last):
  File "reader.py", line 81, in <module>
  print lecture_code_barre()
File "reader.py", line 76, in lecture_code_barre
lecture+=NO_SCAN_CODE[data[n+2]]
KeyError: 11

Here is the py script:

import sys
import usb.core
import usb.util

def lecture_code_barre():
VENDOR_ID = 0x0c2e
PRODUCT_ID = 0x0b61
#VENDOR_ID = 0x04b4
#PRODUCT_ID = 0x0100
DATA_SIZE = 16 # 224
NO_SCAN_CODE = {0x1E:'1', 0x1F:'2', 0x20:'3', 0x21:'4', 0x22:'5', 0x23:'6', 0x24:'7'
    , 0x25:'8', 0x26:'9', 0x27:'0', 0x28:''} # 28=enter

device = usb.core.find(idVendor=VENDOR_ID, idProduct=PRODUCT_ID)

if device is None:
    sys.exit("Could not find Id System Barcode Reader.")

if device.is_kernel_driver_active(0):   # On détache le périphérique du kernel, plus d'envoi sur stdin
    try:
        device.detach_kernel_driver(0)
    except usb.core.USBError as e:
        sys.exit("Could not detatch kernel driver: %s" % str(e))

#try:
#    device.set_configuration()
#    device.reset()
#except usb.core.USBError as e:
#    sys.exit("Could not set configuration: %s" % str(e))

endpoint = device[0][(0,0)][0]
data = []
lu = False
print "Waiting to read..."
lecture=''

while 1:
    try:
        data += device.read(endpoint.bEndpointAddress, endpoint.wMaxPacketSize)

        if not lu:
            print "Waiting to read..."
        lu = True

    except usb.core.USBError as e:
        if e.args == (110,'Operation timed out') and lu:
            if len(data) < DATA_SIZE:
                print "Lecture incorrecte, recommencez. (%d bytes)" % len(data)
                print "Data: %s" % ''.join(map(hex, data))
                data = []
                lu = False
                continue
            else:
                for n in range(0,len(data),16):
                    print ' '.join(map(hex,data[n:n+16]))
                    lecture+=NO_SCAN_CODE[data[n+2]]
                break   # Code lu
return lecture

if __name__ == '__main__':
print lecture_code_barre()

Output from device with looping:

....
print device.read(endpoint.bEndpointAddress, endpoint.wMaxPacketSize)
...

parallels@ubuntu:~/Documents/pyusb$ sudo python scan.py 
<usb.core.Device object at 0x7fa5f34df610>
array('B', [0, 0, 38, 0, 0, 0, 0, 0])
array('B', [2, 0, 0, 0, 0, 0, 0, 0])
array('B', [2, 0, 11, 0, 0, 0, 0, 0])
array('B', [2, 0, 22, 0, 0, 0, 0, 0])
array('B', [0, 0, 0, 0, 0, 0, 0, 0])
array('B', [0, 0, 81, 0, 0, 0, 0, 0])
array('B', [2, 0, 0, 0, 0, 0, 0, 0])
array('B', [2, 0, 24, 0, 0, 0, 0, 0])
array('B', [2, 0, 14, 0, 0, 0, 0, 0])
array('B', [0, 0, 0, 0, 0, 0, 0, 0])
array('B', [0, 0, 81, 0, 0, 0, 0, 0])
array('B', [0, 0, 11, 0, 0, 0, 0, 0])
array('B', [0, 0, 23, 0, 0, 0, 0, 0])
array('B', [0, 0, 0, 0, 0, 0, 0, 0])
array('B', [0, 0, 23, 0, 0, 0, 0, 0])
array('B', [0, 0, 19, 0, 0, 0, 0, 0])
array('B', [2, 0, 0, 0, 0, 0, 0, 0])
array('B', [2, 0, 51, 0, 0, 0, 0, 0])
array('B', [0, 0, 0, 0, 0, 0, 0, 0])
array('B', [0, 0, 56, 0, 0, 0, 0, 0])
array('B', [0, 0, 0, 0, 0, 0, 0, 0])
array('B', [0, 0, 56, 0, 0, 0, 0, 0])
array('B', [0, 0, 26, 0, 0, 0, 0, 0])
array('B', [0, 0, 0, 0, 0, 0, 0, 0])
array('B', [0, 0, 26, 0, 0, 0, 0, 0])
array('B', [0, 0, 0, 0, 0, 0, 0, 0])
array('B', [0, 0, 26, 0, 0, 0, 0, 0])
array('B', [0, 0, 55, 0, 0, 0, 0, 0])
array('B', [0, 0, 5, 0, 0, 0, 0, 0])
array('B', [0, 0, 21, 0, 0, 0, 0, 0])
array('B', [0, 0, 18, 0, 0, 0, 0, 0])
array('B', [0, 0, 26, 0, 0, 0, 0, 0])
array('B', [0, 0, 17, 0, 0, 0, 0, 0])
array('B', [0, 0, 5, 0, 0, 0, 0, 0])
array('B', [0, 0, 18, 0, 0, 0, 0, 0])
array('B', [0, 0, 0, 0, 0, 0, 0, 0])
array('B', [0, 0, 18, 0, 0, 0, 0, 0])
array('B', [0, 0, 14, 0, 0, 0, 0, 0])
array('B', [0, 0, 55, 0, 0, 0, 0, 0])
array('B', [0, 0, 17, 0, 0, 0, 0, 0])
array('B', [0, 0, 8, 0, 0, 0, 0, 0])
array('B', [0, 0, 23, 0, 0, 0, 0, 0])
array('B', [0, 0, 81, 0, 0, 0, 0, 0])
array('B', [0, 0, 22, 0, 0, 0, 0, 0])
array('B', [0, 0, 8, 0, 0, 0, 0, 0])
array('B', [0, 0, 21, 0, 0, 0, 0, 0])
array('B', [0, 0, 25, 0, 0, 0, 0, 0])
array('B', [0, 0, 12, 0, 0, 0, 0, 0])
array('B', [0, 0, 6, 0, 0, 0, 0, 0])
array('B', [0, 0, 8, 0, 0, 0, 0, 0])

Source: (StackOverflow)