0

I am working on a project where I need to convert bursts of data (in the range of 300 bytes) from Iridium's short burst data service . This is meant to replace a dial-up connection, so I need to take those bursts of data from the short bursts and convert them into the continuous stream of a dial-up connection.

I'm a relatively inexperienced programmer, and the only language I know is java.

How could I go about converting the data? Are there any background materials on how types of information packets operate and how to manipulate them in java?

[Edited for clarity]

EDIT2: I do not need to convert the data the other way around (from the stream to the chunks)

Community
  • 1
  • 1
  • 2
    Your question isn't very clear. What exactly do you want to convert *from*, and *to*? – Oliver Charlesworth Jun 03 '11 at 00:48
  • Can't you directly write the bytes into an OutputStream? it is the stream which will internally group the bytes into packets and manage the low-level mechanism of the dial-up connection – ignis Jun 03 '11 at 00:58
  • Do you need to go in both directions (i.e. also get data and burst it out in 300 byte chunks?) – Foon Jun 03 '11 at 01:19

1 Answers1

2

Your question is not clear on whether you are writing software to talk to the Iridium transceiver, or whether you are on the server-side, but I will assume you are on the client side since, judging by their website the server side is standard IP networking.

The program talks to the transceiver using an RS-232 interface and the AT (modem) command set. Using Java you will need some sort of serial library; I have had extensive experience with such, in particular with a program to manage a bank of modems bridging their comms to an IP network and at that time the only comms package which worked and was stable was SerialPort from SerialIO. The other potentially viable option is RxTx but when I worked with that several years ago it was unstable and would crash the JVM every few days. With either one you can (and should) constrain yourself to the JavaComm API which will enable you to easily switch out serial libraries.

Once you are talking to your serial port manipulating the transceiver should be the same as manipulating a modem, you will need to refer to the doco for specifics. If it's faithful to a modem, it will operate it two modes, command and data. In command mode you are sending AT xxx commands terminated by CRLF. When you are in data mode you are sending binary data.

The structure of the binary data will almost surely be dictated by the Iridium system, and you will need to conform to that; again see their doco.

If you have the luxury of defining your own data protocol, or if you have free-form messages atop their protocol my best advice is to make your messages logically keyword/value pairs to ensure long-term flexibility. If you are tight on space (and it seems like the size restrictions for Iridiums devices are fairly severe) you could make your keywords predefined (agreed on by client and server) and send a binary integer instead of, say a UTF-8 or ASCII string. The protocol should include or infer a very basic type so that numeric values, especially, can be as condensed as possible.

Anyway, I hope that gives you some direction and ideas of what to expect... please feel free to ask questions via comments, especially for particular questions about using a serial port from Java.

Lawrence Dol
  • 63,018
  • 25
  • 139
  • 189