Frecuency Hoping using SMIRF v2

I want to know what is the minium delay time between commands to configure the smirf v2 in the quick configuration mode. when I open the terminal and I press ctrl+t 5 times and then select the proper configuration. the smirf v2 accept this configuration but when I send all the string, the smirf base doesn’t accept the configuration.

Thanks

Good question.

The channel switching is nearly instantaneous. The bottleneck is the PIC recording the new selection into EEPROM memory. Allow ~1-200ms before sending any data down the link.

Break down exactly what you are sending the SMiRF and I will see if there is any problem with the string.

-Nathan

Hi Nathan

I send the following string:

20 20 20 20 20 49 14 120

To change the channel to 14 and just exit of the quick configuration mode.

is it correct? I’m using a visual basic test program.

Do you have a visual basic program to test if it works??

Thanks

Shoot. That looks correct…

Take a look at the C code on SMiRF v2.1. This code is called after 5 sequential ctl+t characters are received:

    while(1)
    {
        //RX_Xmitted = RX_In; //Clear the incoming buffer

        //Wait for the user to transmit the command
        while(RX_Xmitted == RX_In); 
        command = RX_Array[RX_In];
        RX_Xmitted++;
        if(RX_Xmitted == FIFO_SIZE) RX_Xmitted = 0;

        if (command == 'x')
            break; //Return to main routine
        else
        {
            //Wait for the user to transmit the new setting
            while(RX_Xmitted == RX_In); 
            new_setting = RX_Array[RX_In];
            RX_Xmitted++;
            if(RX_Xmitted == FIFO_SIZE) RX_Xmitted = 0;

            if (command == '1') channel_number = new_setting; //Channel Switch
            if (command == '2') address_number = new_setting; //Address switch
            if (command == '3') power_level = new_setting; //Power level configuration
            if (command == '4') //Record to eeprom
            {
                onboard_eewrite(channel_number, RF_CHANNEL_SPOT);
                onboard_eewrite(address_number, RF_ADDRESS_SPOT);
                onboard_eewrite(power_level, RF_POWERLEVEL_SPOT);
            }
            
            //These values are NOT automatically recorded to EEPROM to save the 15ms of recording time
        }
    }

I really don’t know. I too use VB for a lot of testing. I’ll see if I can get to testing it today.

Try inserting a small delay (50-100ms) between the 5 ctl characters and the channel selection characters.

-Nathan

Are u planning to change the frequency often?

I mean changing the EEPROM every 0.5s will eventually cause the eeprom byte to fuzzle and the smirf to stop working…

hi Pittuck and Nathan

I need please you send me a Vb code to test because I think my program is not correct. I want to change the channel many times without saving in the eeprom. is it can be done??? or not??-

Thanks for your help

well up to nathan that one, i do not know smirf

What version of VB do u use? i use .net standard and vb 5 Pro (and VB embedded for pocket pc)

if u are using .net u will need to get a mscomm wrapper like net comm ocx (what i use) or if using vb 5 u can use the ms comm.

Lastly do u have any programming hardware, just in case nathan can supply a hacked version of the smirf firmware for you.

I have a small program in VB 6 which uses mscomm to send data over the serial port the problem is how to make a delay between the 5’s 20 and the next string to configure the channel.?? Can you send me a example of this??.

Thanks

use a timer

set it up for ur required time length (its set in ms) then double click it to get the ontick event. Here set a boolean flag to true and turn the timer off.

In the main code to do a delay:

timer1.start()

do while booleanflag=false

doevents(); '(application.doevents() if using .net)

loop

tbooleanflag=false

and that will do a delay for u! lol

it should do at least, code not tested, but its pretty easy to see where it is going.