All Projects → RishiGupta12 → SerialPundit

RishiGupta12 / SerialPundit

Licence: AGPL-3.0 license
Serial port communication in Java - FTDI D2XX, HID API, X/Y modem

Programming Languages

HTML
75241 projects
java
68154 projects - #9 most used programming language
shell
77523 projects
c
50402 projects - #5 most used programming language
Makefile
30231 projects
CSS
56736 projects

Projects that are alternatives of or similar to SerialPundit

usbSerialPortTools
provide read and write debugging tools between USB serial port and serial port (UART ,RS232) under Android system
Stars: ✭ 38 (-67.24%)
Mutual labels:  uart, rs232, serial-port
FPGA-USB-Device
FPGA-based USB-device controller to implement USB-CDC, USB-HID, etc.
Stars: ✭ 29 (-75%)
Mutual labels:  usb-hid, usb-uart
Android-SerialPort
『Android Lib』 Android 平台上的 usb 串口调试库,支持串口号、波特率、数据位、校验位、停止位、流控等参数设置,能够控制数据的收发
Stars: ✭ 236 (+103.45%)
Mutual labels:  serialport, serial-port
libcssl
Columbo Simple Serial Library is an easy to use, event driven serial port communication library for Linux.
Stars: ✭ 38 (-67.24%)
Mutual labels:  uart, serialport
ble-serial
"RFCOMM for BLE" a UART over Bluetooth low energy (4.0+) bridge for Linux, Mac and Windows
Stars: ✭ 134 (+15.52%)
Mutual labels:  uart, serialport
BadSTM
Bad USB on STM32 with SD card
Stars: ✭ 27 (-76.72%)
Mutual labels:  hid, usb-hid
serial.nim
A Nim library for accessing serial ports.
Stars: ✭ 59 (-49.14%)
Mutual labels:  rs232, serialport
pySerialTransfer
Python package to transfer data in a fast, reliable, and packetized form
Stars: ✭ 78 (-32.76%)
Mutual labels:  uart, serialport
terminal
Terminal inside the microcontroller (cli for mcu)
Stars: ✭ 31 (-73.28%)
Mutual labels:  uart, rs232
openinput
Open source firmware for input devices
Stars: ✭ 43 (-62.93%)
Mutual labels:  hid, usb-hid
Mac Precision Touchpad
Windows Precision Touchpad Driver Implementation for Apple MacBook / Magic Trackpad
Stars: ✭ 5,107 (+4302.59%)
Mutual labels:  hid, usb-hid
Android Usb Gadget
Convert your Android phone to any USB device you like! USB Gadget Tool allows you to create and activate USB device roles, like a mouse or a keyboard. 🛠🛡📱
Stars: ✭ 118 (+1.72%)
Mutual labels:  hid
Logiops
An unofficial userspace driver for HID++ Logitech devices
Stars: ✭ 861 (+642.24%)
Mutual labels:  hid
Hidpytoy
A GUI app for playing with HID devices, written in Python
Stars: ✭ 25 (-78.45%)
Mutual labels:  hid
Xpadneo
Advanced Linux Driver for Xbox One Wireless Controller (shipped with Xbox One S)
Stars: ✭ 797 (+587.07%)
Mutual labels:  hid
Authorizer
Authorizer is a Password Manager for Android. It emulates an HID keyboard over USB and enters your credentials on your target device. Additionally it supports OTP 🔑📴
Stars: ✭ 172 (+48.28%)
Mutual labels:  hid
Karabiner Driverkit Virtualhiddevice
Stars: ✭ 108 (-6.9%)
Mutual labels:  hid
Vigembus
Windows kernel-mode driver emulating well-known USB game controllers.
Stars: ✭ 721 (+521.55%)
Mutual labels:  hid
Wifiduck
Wireless keystroke injection attack platform
Stars: ✭ 723 (+523.28%)
Mutual labels:  hid
Hidviz
A tool for in-depth analysis of USB HID devices communication
Stars: ✭ 505 (+335.34%)
Mutual labels:  hid

SerialPundit : Serial port communication and much more...

SerialPundit is a Software Developer Kit (SDK) for serial port and HID communication. It has been ported to Linux, MAC, Windows and embedded SE Linux platforms for both 64/32 bit architectures.

It is powerfully configurable for both poll and event driven application designs be it low volume low frequency data or high volume high frequency data.

It eliminates the complexities of serial port programming for different operating systems, allowing engineers to concentrate on their application logic, facilitating faster engineering and development, reducing development cost and time to market.

It is consistent, portable, efficient, testable, reliable, extensible and modifiable.

USB module features

  • USB Hotplug notification; calls listener whenever a USB-UART/HID device is added/removed.
  • Find COM port assigned to a USB device dynamically from USB-IF VID, PID and serial number.
  • Find information about all USB devices connected to system.
  • Custom baud rate setting and high baud rates (3 Mbps) settings supported.
  • USB power related information reporting like selective suspend or auto suspend.
  • Adapt application behavior based on firmware identified on USB device.
  • Statically find if a particular USB device is connected to system or not.
  • List all USB-HID devices connected to system.

Serial port module features

  • Communication

    • Access to EIA232 standard DTR, CD, CTS, RTS and DSR signals.
    • Hardware and software flow-control options.
    • Both polling based and event listener based data/event read supported.
    • Parity and framing errors reporting supported.
    • Break condition send and receive API.
    • ARM Primecell AMBA compliant UART supported.
    • Standard and custom baud rates support.
  • File transfer protocols

    • X/Y modem FTP API implemented with finite state machine.
    • Progress listener for GUI applications (number of blocks, percentage, file name etc.).
    • Both text and binary mode transfer can take place.
    • Abort command support to cancel transfer at any time by sender or receiver.
    • Send and receive in files in parallel in various format and multithreading handling.
  • Vendor libraries integration

    • Vendor libraries like D2XX from ftdi, SimpleIO from microchip, USBXpress from silicon labs etc supported.
  • Others

    • Application specific parameters tuning for performance with and without modification of drivers.
    • Java NIO direct byte buffer API for faster data transfer.
    • IOCTL calls for GPIO control and power management.
    • Find which driver is driving a particular serial port (adapt to system).
    • Completely port reentrant, allowing it to be time sliced.
    • Extraction of shared libraries at user defined locations for isolated environment and security.
    • Input and Output byte stream (blocking and non *blocking) for serial port communication.
    • CRC and other utility class for common functions for quick application development.
    • Optimized read and write methods for single byte, multiple byte or string sending/receiving.
    • Fast set/unset break condition for DMX512 based devices to control stage lighting and effects.
    • OSGI budles can be created easily for integrating in existing OSGI based application.
    • Two lock concurrent queue algorithm based ring buffer for faster data/event processing.
    • Easily integrate into existing application server software like Apache mina for cloud and IoT etc.

HID module features

  • HID class API for communicating with USB-HID devices like MCP2200, CP2110 etc.
  • Dynamically find HID devices or get hotplug event notifications.
  • Input report listener for asynchronous operations.
  • Feature report, input report and output report in raw format available.
  • Find information like serial number, product name, manufacturer etc.

The project is :

  • Functional, stress, stability, unit tested (Junit for continuous integration).
  • Maven repository release for maven integration.
  • Extensive error detection and handling for reliable operations.
  • Fully Optimized for power, performance and memory.
  • Support for fault tolerant and recoverable application design.
  • Extensively documented both Java (online javadocs) and C code.
  • Scripts for quick builds, tests, installation etc.

Drivers and Services

  • Null modem emulator; tty2com is a feature rich null modem emulation driver supporting null modem, loopback, custom pinout and dynamic virtual serial port creation. Corresponding Desktop application, Eclipse IDE plugin, command line interface and Java/Python APIs are provided to manage virtual ports.

  • CP210x driver; kernel mode driver for usb-serial cp210x IC and products based on it with access to GPIO pins, IOCTL operations support, configuration and installations scripts, udev rules etc.

Getting started

The folder prebuilt-release in this repository contains ready-to-use jar file (sp-tty.jar) that can be imported in any project and referenced right away. Simply add sp-tty.jar in your project as an external library.

To add a jar in Eclipse, right-click on the Project → Build Path → Configure Build Path. Under Libraries tab, click Add Jars or Add External JARs and give the sp-core.jar and sp-tty.jar.

import com.serialpundit.serial.SerialComManager;
import com.serialpundit.serial.SerialComManager.BAUDRATE;
import com.serialpundit.serial.SerialComManager.DATABITS;
import com.serialpundit.serial.SerialComManager.FLOWCONTROL;
import com.serialpundit.serial.SerialComManager.PARITY;
import com.serialpundit.serial.SerialComManager.STOPBITS;

public class Example {
	public static void main(String[] args) {
		try {
			SerialComManager scm = new SerialComManager();
			long handle = scm.openComPort("/dev/ttyUSB1", true, true, false);
			scm.configureComPortData(handle, DATABITS.DB_8, STOPBITS.SB_1, PARITY.P_NONE, BAUDRATE.B115200, 0);
			scm.configureComPortControl(handle, FLOWCONTROL.NONE, 'x', 'x', false, false);
			scm.writeString(handle, "testing hello", 0) == true);
			String data = scm.readString(handle);
			System.out.println("data read is :" + data);
			scm.closeComPort(handle);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}

Resources

Help the project grow

  • Suggest features and enhancements
  • Report bugs and fixes
  • Help with missing documentation or improvements
  • Suggest more test cases and scenarios
  • Publish an article on your blog to educate others about this project
  • Provide peer support on mailing lists, forums or newsgroups

Author, License and Copyright

  • SerialPundit is designed, developed and maintained by Rishi Gupta. He does Linux driver development, embedded systems design, firmware development, circuit designing, prototyping, board bring up etc.
    Linkdin profile : http://in.linkedin.com/pub/rishi-gupta/20/9b8/a10

  • SerialPundit is DUAL LICENSED. It is made available under the terms of the GNU Affero General Public License (AGPL) v3.0 for non-commercial use and under the terms of a commercial license for commercial use of this library. Contact author for commercial license.

    See LICENSE file in repository for full license text for AGPL v3.0.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].