Rf module problems

Hi ,
Last year I got some dorji modems and spoke a bit about them on the forum.
their pdf is here:
http://www.dorji.com/docs/data/DRF4432D20I.pdf

I have them configured in the same way in terms of stop bits and speed etc. I have one connected to the usb adaptor supplied with them and one on a pro mini,

I have connected the tx on the modem to rx on arduino and rx to tx .
I have 5V and GND connected to the appropriate places on arduino,

I loaded the DigitalReadSerial example on the arduino having put a 100ms delay on it instead of 1ms to not overlaod things,

I can see the RED LED on the Tx modem flashing and the BLUE LED on the rx modem flashing at the same speeds,
this starts when the script starts to serial print and stops when the script is stopped,

The tx should be sending "0" ten times a second, but i receive, "Vë" ten times a second,

this seems to be either a basic settings problem , or a problem with what is being sent and then interpreted,

can anyone give me a pointer?

driving me crazy ,

i basically get gobbledegook on all buad rates in the serial monitor,

I know I have the modules set to 9600, the USB adaptor from dorji is 9600 in windows, and the serial begin is 9600

what could be going wrong? no matter what I print I cant see any correlation

Does nobody have any experience with these modules?

ok ,
some progress is being made, maybe someone can work out whats going on before me ,

this line of code :
Serial.println("13");
returns "13" in the arduino serial monitor, and returns "gfy=" on the receiving modems serial monitor.

This line
Serial.println(13,HEX);
returns the same as above.

if I change it to :
Serial.print("13"); then I only get "gf" on the modems serial monitor, making me think that the new line character from arduino is being interpreted as "y="

so far I can print the following with the following results,
1 = g
3 = f
5 = e
7 = d
9 = c
11 = gg
13 = gf

what turns a "1" into a "g"????

Ok ive decided to post this with a different twist

Can I assume that an RF module will send data sent to it via Serial.print in such a way as it can be read on the corresponding receiver via a terminal dialogue?

Define "an RF module", "data", "read", "corresponding receiver", "terminal dialogue".

Is this your other Thread

What is the point in starting a new Thread when all the relevant data is in the first one?

Please ask the moderator to merge the two threads - you can use Report to Moderator in this post to do so.

It also seems like you have an even older Thread with information about this in it. Please provide a link to that?

...R

PeterH:
Define "an RF module", "data", "read", "corresponding receiver", "terminal dialogue".

rf module:
http://www.dorji.com/docs/data/DRF4432D20.pdf

Data:
a number from 0 to 255

Read:
evidently the part im not able to do

Correspongin receiver:
the same as the transmitter

Terminal dialogue:
A com port monitor? teminal ? putty?

Robin2:
Is this your other Thread

What is the point in starting a new Thread when all the relevant data is in the first one?

Please ask the moderator to merge the two threads - you can use Report to Moderator in this post to do so.

It also seems like you have an even older Thread with information about this in it. Please provide a link to that?

...R

Well at least someone replied to this one, that seems to be a "point"

You could simply have amended the title of the other Thread. Presumably you got no replies because people don't know anything about those devices.

So, again, please arrange for the Threads to be merged and also provide a link to the older Thread.

You haven't given details of how your wireless devices are connected to the Arduino (or what Arduino you are using).

If it is an Uno you can't simply connect the wireless to the Tx and Rx pins that are used by the Arduino to communicate with a PC.

...R

this is the code I have on my Tx .

#include <SoftwareSerial.h>
SoftwareSerial Tx(11, 10);


int incomingByte = 0;   // for incoming serial data

void setup() {
        Tx.begin(1200);
        Serial.begin(9600);     // opens serial port, sets data rate to 9600 bps
}

void loop() {

        // send data only when you receive data:
        if (Serial.available() > 0) {
                // read the incoming byte:
                incomingByte = Serial.read();

                // say what you got:
                Serial.print("I received: ");
                Serial.println(incomingByte, DEC);
                Tx.write(incomingByte);
        }
}

this is the code I have on my Rx

#include <SoftwareSerial.h>
SoftwareSerial Rx(A5, A4);


int incomingByte = 0;   // for incoming serial data

void setup() {
        Rx.begin(1200);
        Serial.begin(9600);     // opens serial port, sets data rate to 9600 bps
}

void loop() {

        // send data only when you receive data:
        if (Rx.available() > 0) {
                // read the incoming byte:
                incomingByte = Rx.read();

                // say what you got:
                Serial.print("I received: ");
                Serial.println(incomingByte, DEC);
              //  Rx.print(incomingByte);
        }
}

I have them connected to pins 11 and 10 on the Tx and A4 and A5 on the Rx
these are defined in the code for a software serial.
The boards are pro mini.
I can see the transmition and recpetion lights flash accordingly when I expect them to, but received data is not what I expect although not random.

Robin2:
You could simply have amended the title of the other Thread. Presumably you got no replies because people don't know anything about those devices.

So, again, please arrange for the Threads to be merged and also provide a link to the older Thread.

You haven't given details of how your wireless devices are connected to the Arduino (or what Arduino you are using).

If it is an Uno you can't simply connect the wireless to the Tx and Rx pins that are used by the Arduino to communicate with a PC.

...R

old thread

Thanks for tidying things up. I see that I contributed to the other Thread also.

Your code suggests that you are using software serial at 1200 baud but the default for the transceivers seems to be 9600 baud?

Until you get things working I suggest you simplify the Tx code so that it just sends a fixed value rather than one taken from the Serial.read().

Getting wireless stuff to work can be tricky because you can't monitor the wireless transmission. So eliminate as many variations as you possibly can.

You might also try disconnecting the transceivers and just wiring the two pro-minis software serial pins together Rx-Tx and Tx-Rx to make sure that works. Don't forget to connect the Grounds.

...R

Robin2:
Your code suggests that you are using software serial at 1200 baud but the default for the transceivers seems to be 9600 baud?

I reduced it to 1200 at some point in order to make sure there wasnt a conflict or something dumb, I have set the modules to 1200 vias their GUI.

I will try just linking the two pro minis software serial ports and ground :slight_smile: (i would have missed that for sure) tommorow and see if I can get it working that way.

Im almost certain that at some point either the data type is changing or that the modules are doing something wierd
We shall see

Can you be confident you have correctly changed the transceivers to 1200 baud? How did you do that?

I noticed in the datasheet that there is a SET pin on the transceivers. How have you that wired?

...R

the tranceivers come with a usb that has a jumper to take the set pin low,
you then just connect with a GUI and set how you like.

assuming the GUI is working well, I have the serial data set to 1200 and the output set to 38400. according to the tech sheet this is a good way of not overloading the buffer.

I have connected up the pro minis tx - rx rx - tx and the grounds :slight_smile:

The code posted above works perfectly up to 4 characters in one trasnmition, anything over four and it only picks up 1,2,3 and the last one,

So, Confirmed that the modules are doing something funky. If anyone has any ideas on what could be going on I would love to hear them

Software serial doesn't work very well. Have you tried my suggestion of taking the hardware serial code out of the Tx sketch and just sending the data using a loop.

Another thought is to use Hardware serial to send the data from the Tx device

I am trying to think how to identify whether the problem is at the Tx or Rx end.

Maybe on the Rx side you could save (say) 20 bytes into an array before printing anything to the Serial Monitor.

I might try the code myself later with a couple of Unos.

...R

Hi ,
i havent tried taking hardware serial out,
I will now try that ,

for now I have a code which can transmit any number of 1's 5's or 9's in any order and any combination reliably, the output is not what i expected it to be but doesnt vary ,

other characters vary depeding on cuantity and order, somewhere some data must be getting merged and corrupted.
i can go ahead and program a set of events based off of the 159 transmition, and it will look like its working, but I will know its a pile of crap.

I hope to track down at least which end of the code is causing problems,