Monday, 30 March 2015 08:31

Household Switch

 

 

 

 

 

 

 

 

 

 

 

 

 

Saturday, 21 March 2015 12:03

VIVACOM 3G

 

 

Device Descriptor:
bcdUSB:             0x0200
bDeviceClass:         0x00
bDeviceSubClass:      0x00
bDeviceProtocol:      0x00
bMaxPacketSize0:      0x40 (64)
idVendor:           0x1BBB
idProduct:          0xF000
bcdDevice:          0x0000
iManufacturer:        0x03
0x0409: "USBModem"
iProduct:             0x02
0x0409: "HSPA Data Card"
iSerialNumber:        0x04
0x0409: "1234567890ABCDEF"
bNumConfigurations:   0x01

ConnectionStatus: DeviceConnected
Current Config Value: 0x01
Device Bus Speed:     High
Device Address:       0x01
Open Pipes:              2

Endpoint Descriptor:
bEndpointAddress:     0x01  OUT
Transfer Type:        Bulk
wMaxPacketSize:     0x0200 (512)
bInterval:            0x00

Endpoint Descriptor:
bEndpointAddress:     0x81  IN
Transfer Type:        Bulk
wMaxPacketSize:     0x0200 (512)
bInterval:            0x00

Configuration Descriptor:
wTotalLength:       0x0020
bNumInterfaces:       0x01
bConfigurationValue:  0x01
iConfiguration:       0x01
0x0409: "USBModem Configuration"
bmAttributes:         0xA0 (Bus Powered Remote Wakeup)
MaxPower:             0xFA (500 Ma)

Interface Descriptor:
bInterfaceNumber:     0x00
bAlternateSetting:    0x00
bNumEndpoints:        0x02
bInterfaceClass:      0x08
bInterfaceSubClass:   0x06
bInterfaceProtocol:   0x50
iInterface:           0x00

Endpoint Descriptor:
bEndpointAddress:     0x01  OUT
Transfer Type:        Bulk
wMaxPacketSize:     0x0200 (512)
bInterval:            0x00

Endpoint Descriptor:
bEndpointAddress:     0x81  IN
Transfer Type:        Bulk
wMaxPacketSize:     0x0200 (512)
bInterval:            0x00

 

=======================================================

 

SetupPacket

0x80 0x06 0x00 0x01 0x00 0x00 0x12 0x00

RequestType

0x80 (Direction: Device-to-host, Type: Standard, Recipient: Device)

Request

0x06 (GET_DESCRIPTOR)

Value

0x0100 (USB_DEVICE_DESCRIPTOR_TYPE)

Index

0x00

Length

0x12

 

12 01 00 02 00 00 00 40 BB 1B 00 F0 00 00 03 02 04 01

bLength

0x12

bcdUSB

0x0200 (USB 2.0)

bDeviceClass

0x0

bDeviceSubClass

0x0

bDeviceProtocol

0x0

bMaxPacketSize0

0x40

idVendor

0x1BBB (T & A Mobile Phones)

idProduct

0xF000

bcdDevice

0x0

iManufacturer

0x3

iProduct

0x2

iSerialNumber

0x4

bNumConfigurations

0x1

 

 

SetupPacket

0x80 0x6 0x0 0x2 0x0 0x0 0x20 0x0

RequestType

0x80 (Direction: Device-to-host, Type: Standard, Recipient: Device)

Request

0x6 (GET_DESCRIPTOR)

Value

0x200 (USB_CONFIGURATION_DESCRIPTOR_TYPE)

Index

0x0

Length

0x20

 

09 02 20 00 01 01 01 A0 FA 09 04 00 00 02 08 06 50 00 07 05 01 02 00 02 00 07 05 81 02 00 02 00

 

bLength

0x9

bDescriptorType

USB_CONFIGURATION_DESCRIPTOR_TYPE

wTotalLength

0x20

bNumInterfaces

0x1

iConfiguration

0x1

bmAttributes

0xA0 ( Bus_Powered Remote_Wakeup )

MaxPower

0xFA

Interface Descriptor

bLength

0x9

bInterfaceNumber

0x0

bAlternateSetting

0x0

bNumEndpoints

0x2

bInterfaceClass

0x8 (Mass Storage)

bInterfaceSubClass

0x6 (SCSI Transparent Command Set)

bInterfaceProtocol

0x50 (Bulk-Only Transport)

iInterface

0x0

Endpoint Descriptor

bLength

0x7

bEndpointAddress

0x1 [OUT]

bmAttributes

0x2 (USB_ENDPOINT_TYPE_BULK)

wMaxPacketSize

0x200

bInterval

0x0

Endpoint Descriptor

bLength

0x7

bEndpointAddress

0x81 [IN]

bmAttributes

0x2 (USB_ENDPOINT_TYPE_BULK)

wMaxPacketSize

0x200

bInterval

0x0

 

 

URB_FUNCTION_BULK_OR_INTERRUPT_TRANSFER


Urb Field

Value

Length

0x80

USBD Status

USBD_STATUS_SUCCESS (0x0)

EndpointAddress

0x1

PipeHandle

0xFFFFFA80055E8208

TransferFlags

0x0 ( USBD_TRANSFER_DIRECTION_OUT )

TransferBufferLength

0x1F

TransferBuffer

0xFFFFFA800870AB98

TransferBufferMDL

0x0

UrbLink

0x0

 

 

55 53 42 43 10 90 A7 07 24 00 00 00 80 00 06 12

00 00 00 24 00 00 00 00 00 00 00 00 00 00 00

 

 

====================================   2222222222   =================================================

 

 

Device descriptor:
Descriptor Length:    12
Descriptor type:    01
USB version:        0200
Device class:        00
Device Subclass:    00
Device Protocol:    00
Max.packet size:    40
Vendor  ID:        1BBB
Product ID:        0017
Revision ID:        0000
Mfg.string index:    03
Prod.string index:    02
Serial number index:    04
Number of conf.:    01

Configuration descriptor:
Total length:        009A
Num.intf:        06
Conf.value:        01
Conf.string:        01
Attr.:            A0
Max.pwr:        FA

Interface descriptor:
Intf.number:        00
Alt.:            00
Endpoints:        02
Intf. Class:        FF
Intf. Subclass:        FF
Intf. Protocol:        FF
Intf.string:        00

Endpoint descriptor:
Endpoint address:    81
Attr.:            02
Max.pkt size:        0040
Polling interval:    20

Endpoint descriptor:
Endpoint address:    01
Attr.:            02
Max.pkt size:        0040
Polling interval:    20

Interface descriptor:
Intf.number:        01
Alt.:            00
Endpoints:        02
Intf. Class:        FF
Intf. Subclass:        FF
Intf. Protocol:        FF
Intf.string:        00

Endpoint descriptor:
Endpoint address:    82
Attr.:            02
Max.pkt size:        0040
Polling interval:    20

Endpoint descriptor:
Endpoint address:    02
Attr.:            02
Max.pkt size:        0040
Polling interval:    20

Interface descriptor:
Intf.number:        02
Alt.:            00
Endpoints:        02
Intf. Class:        FF
Intf. Subclass:        FF
Intf. Protocol:        FF
Intf.string:        00

Endpoint descriptor:
Endpoint address:    83
Attr.:            02
Max.pkt size:        0040
Polling interval:    20

Endpoint descriptor:
Endpoint address:    03
Attr.:            02
Max.pkt size:        0040
Polling interval:    20

Interface descriptor:
Intf.number:        03
Alt.:            00
Endpoints:        02
Intf. Class:        FF
Intf. Subclass:        FF
Intf. Protocol:        FF
Intf.string:        00

Endpoint descriptor:
Endpoint address:    84
Attr.:            02
Max.pkt size:        0040
Polling interval:    20

Endpoint descriptor:
Endpoint address:    04
Attr.:            02
Max.pkt size:        0040
Polling interval:    20

Interface descriptor:
Intf.number:        04
Alt.:            00
Endpoints:        02
Intf. Class:        08
Intf. Subclass:        06
Intf. Protocol:        50
Intf.string:        00

Endpoint descriptor:
Endpoint address:    05
Attr.:            02
Max.pkt size:        0040
Polling interval:    00

Endpoint descriptor:
Endpoint address:    85
Attr.:            02
Max.pkt size:        0040
Polling interval:    00

Interface descriptor:
Intf.number:        05
Alt.:            00
Endpoints:        03
Intf. Class:        FF
Intf. Subclass:        FF
Intf. Protocol:        FF
Intf.string:        00

Endpoint descriptor:
Endpoint address:    86
Attr.:            03
Max.pkt size:        0040
Polling interval:    05

Endpoint descriptor:
Endpoint address:    87
Attr.:            02
Max.pkt size:        0040
Polling interval:    20

Endpoint descriptor:
Endpoint address:    06
Attr.:            02
Max.pkt size:        0040
Polling interval:    20

 

 

 

 

 

Wednesday, 18 March 2015 10:17

VW801

 

 

UDP

 

 

Wednesday, 25 February 2015 12:07

USB Host Relay board

 

 

 

KMtronic USB Host  Arduino compatible relay board

 

KMtronic USB Host  Arduino compatible relay board

 

 

 

Multifunctional 8 Relay board with USB Host interface. USB Host allo to connect to board and control relays using any ready USB Device like Bluetooth, Joystick, Keyboard, Remote control, Mouse, RFID Reader, HID devices or custom developed modules.

What is idea?
Build open source universal relay board with possibilities control using any ready or custom made USB device.

 

 

Technical Details

  • Arduino MEGA ADK compatible
  • ATmega2560 microcontroller
  • Flash Memory: 256 KB of which 8 KB used by bootloader
  • SRAM: 8 KB
  • EEPROM: 4 KB
  • Clock Speed: 16 MHz
  • USB Host Chip: MAX3421E
  • Required power: 12VDC/1500 mA
  • Outputs: 8 relays each capable of switching 12VDC/10A or 240VAC/7A. Each relay has an LED to indicate when it is operated.
  • Two collors functional LED (Green + Red)

Dimensions:
KMTronic_8Relay_Dimension.pdf

Relays specifications:
Relays has Normally Open (NO) and Normally Closed (NC) Contacts rated for voltages:
- 12VDC/10A
- 24VDC/10A
- 125VAC/10A
- 250VAC/7A


 

After test examples "USB Host Library for Arduino" Lauszus (TKJElectronics) and Oleg Mazurov we just successfully control relays using:

USB Keyboard
http://www.info.kmtronic.com/usb-host-relay-board-keyboard-example.html

USB Mouse

USB Joystick

USB Bluetooth

USB Remote control

USB RFID Reader

Now try to expand examples with many more USB devices like:

USB WIFI module

USB 3G Module

Android USB Control

USB DS1820 Temperature reader

Custom USB Modules

 

 

 

 

 

USB > RF433MHz > 8 Channel Relay Board

 

 

 

 

 

 

 

 

 

Drivers
are available to work with the following operating systems :
All Windows versions, Linux, Mac OS X, Mac OS 9, Mac OS 8,
Windows CE.NET (Version 4.2 and greater), Arduino, Raspberry Pi ...

 

Required power:
12VDC / minimum 600 mA.

 

Wireless Data Transmittion Module:
CC1101 Low-Power RF Transceiver
(Texas Instruments)

 

USB Converter:
CDC USB to Serial Converter

 

Communication Parameters:
8 Data, 1 Stop, No Parity
Baud rate : 9600

 

 

Commands (ID01):
FIRST channel commands:
OFF command : FF 01 00 (HEX) or 255 1 0 (DEC)
ON command : FF 01 01 (HEX) or 255 1 1 (DEC)
...
EIGHT channel commands:
OFF command : FF 08 00 (HEX) or 255 8 0 (DEC)
ON command : FF 08 01 (HEX) or 255 8 1 (DEC)

 Status read (ID01):
Command - FF A1 00 
Reply - FF A1 xx xx xx xx xx xx xx xx
where xx is: 00 if relay is OFF, 01 if relay is ON

 

ID:
Relay board have an option to change the ID (from ID 01 to ID 15) manually
through a DIP Switch placed near power connector.

 

 

 

Distance:
In open area max 350 meters

 

 

 

 

 

 

 

 

 

KMTronic RF433MHz Relay Boards Installation Guide

 

KMTronic_RF433_Installation_Guide.pdf

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Thursday, 08 January 2015 07:43

Windows startup control KMtronic USB Relays

 

 

Execute a script a startup

 

 

Download KMtronic command line application, configure and test that work:

http://info.kmtronic.com/windows-command-line-example.html

 

 

Download "start.bat" and change COM port and path to KMtronic command line application:

http://www.info.kmtronic.com/images/kmtronics/USB_RELAY_Startup/start.zip

 

"start.bat" file:

timeout /t 10
D:/usbrelay.exe -c:20 -r:1#1

 

 

Start the policy editor of the local group: Start Menu > Run > Type gpedit.msc

 

 

 

  • Go to Computer Configuration > Windows Settings > Scripts (Startup/Shutdown)
  • Double click on Startup>Show files ...
  • Copy "start.bat" in folder

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Tuesday, 09 December 2014 11:22

NETBOARD

 

NETBOARD

 

RS485

 

 

 

 

PLC 8 relay remote control net

Vincenzo Scozzaro

 

8 channels WEB Relay board

 

 

 

 

 

 

 

 

TEMPORARILY NOT AVAIABLE

 

 

 

 

 

 

 

 

 

 

Wednesday, 17 September 2014 10:36

Raspberry Pi LCD 16x2 Display

Needed

1. Raspberry Pi
2. 16x2 LCD display 202A-D REV.A
3. Cables
4. Recommend install Raspbian

 

Schematic

 

 

 

Pictures on Display

 

 

 

 

 

 

 

 

 
 
 
 
Upgrade distribute (required for RPi.GPIO 0.3.1a) 
 
$ sudo apt-get install python-dev
 
$ sudo apt-get install python-setuptools
 
$ sudo apt-get install unzip
 
Download and test display
 
 
$ unzip KMTronic_CharLCD.zip
$ chmod +x KMTronic_CharLCD.py
$ sudo KMTronic_CharLCD.py
 
 
 
 
You can test the wiring from the previous step by simply running the KMTronic_CharLCD.py
python code, as it has a little code it in that will simply display a test message when wired
correctly
 
If you're using a Version 2 Raspberry Pi, pin #21 has been replaced with pin #27 so edit
KMTronic_CharLCD.py and change:
 
def __init__(self, pin_rs=25, pin_e=24, pins_db=[23, 17, 21, 22], GPIO = None):
 
to 
 
def __init__(self, pin_rs=25, pin_e=24, pins_db=[23, 17, 27, 22], GPIO = None):

 

Wednesday, 17 September 2014 07:33

Server Control

 

 

 

 

MySql Table

 

 

 

MAC Address

MAC address (ID) relay board

 

POWER

Status relays after power lost

 

LOST

Status relays when connection to server lost

 

STATUS

Curent status

 

REFRESH TIME

Time between two connections in secconds

 

Example

Relay board with MAC address 70-B3-D5-6D-60-1C:

- when lost power and be powered will turn all relays OFF

- when lost connection to server will turn relays 1,2,3,4,5 OFF, relays 6,7,8 ON

- will turn relays 1,3,5,7 ON, relays 2,4,6,8 OFF

 

 

 

 

 

 

 

 

 

Page 4 of 41