vltgroup / cctalk Goto Github PK
View Code? Open in Web Editor NEWccTalk implementation over simple async com port interface
License: MIT License
ccTalk implementation over simple async com port interface
License: MIT License
Hi, im wondering if you have an example of an implementation of your cctalk.
in your README.md : to start: instantiate com.vltgroup.ccTalk.bus.Bus over you com.vltgroup.ccTalk.comport.ComPort implementation
static byte[] BNVCode = null;
static comPort port="COM3";
Bus bus = new Bus(port, BNVCode);
regards!
This is the output I get:
--- exec-maven-plugin:1.2.1:exec (default-cli) @ examplePC ---
Picked up _JAVA_OPTIONS: -Xmx512M
2019-05-19 04:16:43,831 INFO com.vltgroup.ccTalk.bus.Bus.:49 scan CRC8:
2019-05-19 04:16:45,437 INFO com.vltgroup.ccTalk.bus.Bus.:55 scan CRC16:
2019-05-19 04:16:47,039 INFO com.vltgroup.ccTalk.bus.Bus.:61 scan ENCRYPTED:
2019-05-19 04:16:48,641 INFO com.vltgroup.ccTalk.bus.Bus.:68 scan FINISHED
Now I know you are sending the correct data because when I compared it with a working app I have in C# the bytes sent are the same and you are using the same serial parameters and flowcontrolmode that is used in the other app . The issue seems to be with the serialEvents it doesn't ever receive any.
AST GBA_ST1 uses CRC16bit for the checksum.
If you need any extra information please just ask.
Nitram
We're trying to implement ccTalk on Android, and your library is of great help. Thanks!
Currently we struggle with handling disconnection/reconnection of USB adapter and individual devices.
If we call Bus.close()
, it crashes with the following stack trace:
java.util.ConcurrentModificationException
at java.util.HashMap$HashIterator.nextEntry(HashMap.java:787)
at java.util.HashMap$EntryIterator.next(HashMap.java:824)
at java.util.HashMap$EntryIterator.next(HashMap.java:824)
at com.vltgroup.ccTalk.bus.Bus.close(Bus.java:216)
BTW, is there any way to prevent ditching non-responding devices forever after 20 secs? Or to recover from onDeviceDead
? Or to search for device(s) without recreating the whole Bus
?
I got this log
2019-05-19 04:16:43,831 INFO com.vltgroup.ccTalk.bus.Bus.:49 scan CRC8:
2019-05-19 04:16:45,437 INFO com.vltgroup.ccTalk.bus.Bus.:55 scan CRC16:
2019-05-19 04:16:47,039 INFO com.vltgroup.ccTalk.bus.Bus.:61 scan ENCRYPTED:
2019-05-19 04:16:48,641 INFO com.vltgroup.ccTalk.bus.Bus.:68 scan FINISHED
this is my device
this is my code
val comPort =
ComPort("/dev/ttyUSB0", this)
val bus = MyBus(comPort, byteArrayOf(1, 2, 3, 4, 5, 6))
val coinAcceptors = bus.coinAcceptors
val controler = AcceptorController()
for (acc in coinAcceptors) {
val a = bus.createCoinAcceptor(acc, controler)
a.run()
}
bus.setMasterInhibitStatusAllDevicesSync(false)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.