simon-xisystems / uBloxSara5Kotlin

Library for uBlox Sara GSM/GPS chip

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

RockBlock-SBD - In Alpha, testing underway to ensure operability.

Background

Libaray forked from (https://github.com/slipperyseal/B9) in order to extract classes used to communicate to a RockBLOCK Iridium Short-Burst Data (SBD) modem (https://www.groundcontrol.com/product/rockblock-9603-compact-plug-play-satellite-transmitter/).

Code has been refactored to use JSerialComm library as oppsed to the Pi4J library, primarilly to make the code more portable.

Use

Quite simply, establish a Desktop Serial Port and pass that to a RockBlock instatiation.

val serialPort = DesktopSerialPort("COM22")
val rockBlock = RockBlock(serialPort)
rockBlock.initialize()

We can now use the RockBLOCK to send and receive;

println("Signal Level = ${rockBlock.getSignalLevel()}, has Reception? = ${rockBlock.hasReception(2)}")
println("Status = ${rockBlock.status}")

We also have a helper function to wait for signal and then to send data, used like this;

 rockBlock.sendTestMessage("HEllO WORLD, DOES THIS SEND?")
 rockBlock.waitForReception(1000, 2) //wait for signal
 rockBlock.sendAndReceive() //tell rockblock to complete a tx/rx cycle

About

Library for uBlox Sara GSM/GPS chip

License:Apache License 2.0


Languages

Language:Kotlin 66.7%Language:Java 33.3%