• To anyone looking to acquire commercial radio programming software:

    Please do not make requests for copies of radio programming software which is sold (or was sold) by the manufacturer for any monetary value. All requests will be deleted and a forum infraction issued. Making a request such as this is attempting to engage in software piracy and this forum cannot be involved or associated with this activity. The same goes for any private transaction via Private Message. Even if you attempt to engage in this activity in PM's we will still enforce the forum rules. Your PM's are not private and the administration has the right to read them if there's a hint to criminal activity.

    If you are having trouble legally obtaining software please state so. We do not want any hurt feelings when your vague post is mistaken for a free request. It is YOUR responsibility to properly word your request.

    To obtain Motorola software see the Sticky in the Motorola forum.

    The various other vendors often permit their dealers to sell the software online (i.e., Kenwood). Please use Google or some other search engine to find a dealer that sells the software. Typically each series or individual radio requires its own software package. Often the Kenwood software is less than $100 so don't be a cheapskate; just purchase it.

    For M/A Com/Harris/GE, etc: there are two software packages that program all current and past radios. One package is for conventional programming and the other for trunked programming. The trunked package is in upwards of $2,500. The conventional package is more reasonable though is still several hundred dollars. The benefit is you do not need multiple versions for each radio (unlike Motorola).

    This is a large and very visible forum. We cannot jeopardize the ability to provide the RadioReference services by allowing this activity to occur. Please respect this.

Motorola Mobat Micom and Arduino

Status
Not open for further replies.

mancow

Member
Database Admin
Joined
Feb 19, 2003
Messages
6,880
Location
N.E. Kansas
I am trying to learn how to code with Arduino so I can interface it with the RS232 port on a Motorola Micom HF radio. There are ton of these on ebay for less than $200 now. They are fully controllable via RS232 9600 baud serial. I built a cable and can control the radio with the MRC control software but the volume control was never integrated into the software. When the radio boots up it defaults to the lowest setting and is inaudible. I have a control head on loan but my goal is to learn enough to build an Arduino control head similar to the one in the Uniden remote head project thread.

My first goal I think would be to try to send the appropriate commands to set the volume. According to the documentation is breaks down as this:

Opcode: actual control code hex number
Length: length of entire control message excluding the length code, checksum and end of message which is always (03)

A volume message breaks down like this (all in hex):
24 = header indicating start of message
03 = length of message
18 = indicates direction of data (18 to radio) (81 from radio)
2B = opcode (2B is the opcode for volume control)
12 = volume level in hex
00 = temporary volume level (can be 01 for constant volume or 02 for clear constant)
7C = checksum (sum of all bytes in the message but checksum and EOM, modulo 256)
03 = EOM (end of message)

So, I could either have a table of various volume levels or some sort of algorithm that would calculate a potentiometer value and create the appropriate code according to those parameters. At first I would like to just have it match a few sensor levels and output a precanned data packet when the condition is met.

I found an example of code in the IDE that is somewhat similar but I'm not sure how to mod it to transmit my custom control packets. I could see where the printSensor should be replaced with possibly printSerial or something similar and perhaps strings of the precanned messages could be substituted.

Does anyone have any suggestions?


/*
Serial Call and Response in ASCII
Language: Wiring/Arduino

This program sends an ASCII A (byte of value 65) on startup
and repeats that until it gets some data in.
Then it waits for a byte in the serial port, and
sends three ASCII-encoded, comma-separated sensor values,
truncated by a linefeed and carriage return,
whenever it gets a byte in.

Thanks to Greg Shakar and Scott Fitzgerald for the improvements

The circuit:
* potentiometers attached to analog inputs 0 and 1
* pushbutton attached to digital I/O 2



Created 26 Sept. 2005
by Tom Igoe
modified 26 Oct 2011
by Tom Igoe and Scott Fitzgerald

This example code is in the public domain.

Arduino - SerialCallResponseASCII

*/

int firstSensor = 0; // first analog sensor
int secondSensor = 0; // second analog sensor
int thirdSensor = 0; // digital sensor
int inByte = 0; // incoming serial byte

void setup()
{
// start serial port at 9600 bps:
Serial.begin(9600);
pinMode(2, INPUT); // digital sensor is on digital pin 2
establishContact(); // send a byte to establish contact until receiver responds
}

void loop()
{
// if we get a valid byte, read analog ins:
if (Serial.available() > 0) {
// get incoming byte:
inByte = Serial.read();
// read first analog input:
firstSensor = analogRead(A0);
// read second analog input:
secondSensor = analogRead(A1);
// read switch, map it to 0 or 255L
thirdSensor = map(digitalRead(2), 0, 1, 0, 255);
// send sensor values:
Serial.print(firstSensor);
Serial.print(",");
Serial.print(secondSensor);
Serial.print(",");
Serial.println(thirdSensor);
}
}

void establishContact() {
while (Serial.available() <= 0) {
Serial.println("0,0,0"); // send an initial string
delay(300);
}
}
 

mancow

Member
Database Admin
Joined
Feb 19, 2003
Messages
6,880
Location
N.E. Kansas
Here is an easier code format.

To report the transmitter's frequency you send it the following hex code 24 01 18 08 (checksum and end of message not shown)

This returns

24 05 81 07 01 C9 C3 80

01 C9 C3 80 translates to 30000000 in binary

I believe it breaks down as
24 = display code
05 = length of message
81 = message from radio
07 = opcode for transmitter frequency
01 C9 C3 80 = binary frequency in hex

I am trying to play with the Uniden Arduino code and mod it to look for the approproate message headers and then display the radio output but the Arduino seems to not like to work with HEX in its raw format.

Anyone want to help me with this?
 

motorola_otaku

Member
Premium Subscriber
Joined
Dec 19, 2002
Messages
690
Just for S&G have you tried plugging a regular MCS2000 head into the front to see what works and what doesn't? The Micom head looks close enough to a Euro MCS/MC2100 head that I'll bet it runs on SB9600 and would give you at least some functionality with a MCS head, possibly even volume control.

Not that I don't think what you're doing is worthwhile.. you could have the makings of a vRCH-style setup that would be great for mobile use.
 

mancow

Member
Database Admin
Joined
Feb 19, 2003
Messages
6,880
Location
N.E. Kansas
I have wondered the same thing. I know another individual is working on a similar project and mentioned the idea of trying to mod the mcs head firmware so I'm assuming he has tried that but I don't know the outcome. I haven't had contact with him for a while. I wish I had one to test. Maybe the volume commands are similar or at least a few other button commands.
 

maxkelley

Member
Joined
Dec 3, 2008
Messages
42
Location
FN13GF
I've been working on a project lately to get decoded MDC ID's out of a CDM1550 to send to a computer, to then feed into a server program to send UDP broadcast packets over the network, so multiple dispatch positions can see the ANI without having to shell out $900 for an MDC decoder at each position... SB9600 has a wealth of possibilities, and there's a great thread over on BatLabs that has lots of SB9600 opcodes for the CDM series... I've been parsing the SB9600 with an Arduino, and I can successfully send text to the CDM display and emulate button-presses, etc. The hardest part is getting a checksum routine written, which I have done successfully, but it took lots of trial and error.

When you are trying to send a hex command in Arduino, you need to be cognizant of your datatypes to make sure that the raw hex is actually going to the serial output, and not the ASCII hex representation. So, for example:

byte command[5] = {0x50,0x51,0x34,0x20,0x10} // imagine this is my "command" that I want to send to the radio
Serial.write(command, 5) // will write the array of bytes to the serial port in raw hex form (length 5)

Mancow, would my CDM SB9600 arduino code for checksumming help at all? And what is this uniden remote control thread you speak of? I'm curious!
 

mancow

Member
Database Admin
Joined
Feb 19, 2003
Messages
6,880
Location
N.E. Kansas
This is really interesting. I would like to see how you are doing all of this and keep up with your progress if you don't mind. Maybe we can meetup by email or instant messenger too.

I'm just starting out with coding and arduino and all that so I'm at the very beginning stages. I know I've bitten off WAY more than I should but I seem not to get motivated to do stuff like this unless I have a large goal in mind and force myself to jump right into it.

Your byte command appears to be what I'm looking for but I believe it has been removed in Arduino 1.0 and replaced. This is what it says:
As of Arduino 1.0, the 'BYTE' keyword is no longer supported.
Please use Serial.write() instead.
* The behavior of Serial.print() on a byte has been changed to align it
with the other numeric data types. In particular, it will now print
the digits of its argument as separate ASCII digits (e.g. '1', '2', '3')
rather than a single byte. The BYTE keyword has been removed. To send a
single byte of data, use Serial.write() (which is present in Arduino 0022
as well).

It seems to convert HEX to ASCII when it's transmitted.

And yes, your code will help. Even if it's not directly related it will help me to start understanding this stuff.

As for the thread I mentioned, there is a thread on here in which a remote head for Uniden scanners was developed using an Arduino.

http://forums.radioreference.com/uniden-scanners/211905-homebrew-remotehead-dma-uniden.html

I will send you a private message and maybe we can catch up.
 
Last edited:

mancow

Member
Database Admin
Joined
Feb 19, 2003
Messages
6,880
Location
N.E. Kansas
If anyone cares I got the volume control and button presses to work. This way the guys with the the PC control software can change the volume without a control head.
 

kb5udf

Member
Premium Subscriber
Joined
Apr 7, 2004
Messages
803
Location
Louisiana
$200 Micom HF on ebay

Not that I doubt you but is my searching that inept? I can't find anything lately
but the newer ALE radios for >$2500.

I've love a link to a $200 micom.

THANKS!

JB
 

mancow

Member
Database Admin
Joined
Feb 19, 2003
Messages
6,880
Location
N.E. Kansas
Watch ebay. A guy has a metric *** ton of them. I don't know what his current inventory is but he seems to sell them in groups of about ten once a week or two. My first one was $88 but it won't talk to a control head. Something is wrong with it but it works fine with the remote control software so I'm not too worried about it. A friend bought a couple others for about $120 each and they work fine. The guy offered to refund me but for $88 I wasn't going to send it back. People on the Micom Yahoo list have been talking about them a bit. For the price you just can't beat them at all. It will make you want to throw your Yaesu 857 or 897 out. They have embedded ALE as well and will do a full 125 watts. The syllabic squelch is my favorite part. Unlike a ham rig it's not really signal level dependent. It actually seems to be able to recognize speech and opens when someone is actually talking. I don't know how they do it but it's very reliable.

I now have the Arduino board capable of full range smooth volume control and also an up Vfo control. I am working on coding in a down button and other control head buttons. I set the volume max at hex B0 because full on FF was ridiculous. When I ramped it up and it hit FF the cat about shot through the ceiling and my head is still ringing. The audio is really quite amazing.

I have a lot to learn but I went from no programming knowledge at all to this point in about four days so I'm feeling good about the progress so far. The biggest hurdle will be to interpret the display information from the serial line and display that on an LCD properly.

My ultimate goal is a control head similar to the one in the Uniden forum for the car and also a radio configured as a manpack portable set to 25 watts with a battery and integrated tuner.
 
Last edited:

mancow

Member
Database Admin
Joined
Feb 19, 2003
Messages
6,880
Location
N.E. Kansas

mancow

Member
Database Admin
Joined
Feb 19, 2003
Messages
6,880
Location
N.E. Kansas
So far the volume and buttons are all worked out. I can control the entire radio now. The next hurdle is to poll for and interpret the LCD data coming back.
 

mancow

Member
Database Admin
Joined
Feb 19, 2003
Messages
6,880
Location
N.E. Kansas
Anyone want to help with parsing the serial data and placing it on the LCD?

I have all the strings worked out and data broken down. I'm just trying to figure out how to write it so it stores and incoming data string starting with 0x24 then count over several spaces and look for a certain OP code such as 03. If that op code is present then count over a certain number of places and display the ASCII in that original string at place 0,0 on the LCD.

I have come close but I keep messing something up.
 

mancow

Member
Database Admin
Joined
Feb 19, 2003
Messages
6,880
Location
N.E. Kansas
Anyone want to help with parsing the serial data and placing it on the LCD?

I have all the strings worked out and data broken down. I'm just trying to figure out how to write it so it stores and incoming data string starting with 0x24 then count over several spaces and look for a certain OP code such as 03. If that op code is present then count over a certain number of places and display the ASCII in that original string at place 0,0 on the LCD.

I have come close but I keep messing something up.
 

kb6nzv

Member
Joined
Apr 14, 2012
Messages
26
Location
Salem, OR
Following your thread

I stumbled upon your thread and found the idea pretty brilliant.
I'm now pursuing one of those radios on ebay and would be willing to help if I manage to land one.
I used to do assembler for several platforms back when rocks were soft and this project would marry my arduino curiosity with my love of HF radio.
 

mancow

Member
Database Admin
Joined
Feb 19, 2003
Messages
6,880
Location
N.E. Kansas
Starting to get somewhere.

http://dl.dropbox.com/u/5509596/2012-05-04_03-27-02_732.mp4

The head does a lot of processing. They seem to be simplifying code at times and are not always writing the entire LCD each time something happens. ALE scan is an example. When it scans it doesn't write the LCD like the regular VFO tuning does.

If I could figure out how to act upon entire data packets instead of one byte at a time off the buffer it would help a lot.

At least the basic functionality is here.
 

pheintz

Newbie
Joined
Feb 8, 2011
Messages
1
List of commands

Hi,

I know this is an old listing but per chance does anyone have a list of commands? I've picked up a half dozen micom 2bf and would like to write some control software.

73's

Paul W0PRH
 
Status
Not open for further replies.
Top