URF SRF XRF ERF Configuration Wizard

StigOfTheDump

Senior Member
Hi,
Is there a tutorial on how to use this wizard?

I am converting a broken IP PTZ camera to a USB type. The camera itself will be wired with a USB extension cable. I am using SRF/ERF connected to the programming pins for testing the pan, tilt & zoom. Then I will make a remote control with an another ERF to control it. The casing is metal, apart from the smoked plastic dome, so I would like to mount the ERF in this dome.

I want to turn off the heartbeat LED. The wizard shows this as possible but I can't find how to use it and how to select whether I am configuring the SRF or ERF. Everything is working now and I don't want to mess up any other settings.

Thanks.

Stig
 

BeanieBots

Moderator
The hearbeat function is in the wizard as a pull-down selection.
You can have heartbeat, Off or RSSI.
All mine are set to RSSI but it does not work as an RSSI indicator.
With it set to RSSI, the ERFs are simply off and the URF lights during transmit (which is moderatley useful).
 

Technical

Technical Support
Staff member
You don't need to select erf/srf as they use the same settings.

The safest way to use the wizard is to first read the device's current settings, then change the specific setting, then write again. That way you should only alter the point of interest.
 

StigOfTheDump

Senior Member
Hi
With my breadboard connected to my PC wirelessly with SRF/ERF.
I read the settings, turned off the LED and then re-wrote them. The heartbeat has gone off on the SRF but not the ERF.

I took out the SRF and connected the breadboard with the ERF to my PC with my AXE027. The download socket is on the same pins as the ERF.
The wizard was unable to find the ERF.

How do I configure the ERF?
 

Technical

Technical Support
Staff member
The PICAXE ERF has inverted polarity, so you will need to invert the signals with a direct cable connection.
 

StigOfTheDump

Senior Member
Sorry I think we are talking at crossed purposes, or I don't understand you correctly.

I have a 20M2 on my breadboard with a download socket connected in the usual way. I also have an ERF fitted to my breadboard. There is a DIP switch to ground the CTS (and 10K to pull it high). There are 2 changeover DIP switches to connect the ERF Rx between Serial Out or B.1 and the ERF Tx between Serial In or C.7. Neither port has hardware pullups or pulldowns connected. The software pullups have never been used so should be in their supplied state unless altered inadvertently.

I can program the 20M2 with the SRF/ERF combo or if I disable the CTS with the AXE027. I want to turn off the heartbeat LED on the ERF on the breadboard.

Can I do this with the set-up that I have, or do I need to connect the ERF directly to the AXE027 without the 20M2?
If I need to connect directly:-
1 . Which pins do I connect to the tip, ring and sleeve?
2 . How do I invert the signals? can I do it with the wizard or can I cut up an old USB lead and connect directly?
3 . Do I need the CTS grounded?
4 . I assume I will also need the 5v and GND connections from my PSU.

The ERF wizard doesn't seem to offer disabling the LED, The URF SRF XRF ERF wizard does, but doesn't seem to ask which pins I have the ERF on. Which wizard do I use?
 

BeanieBots

Moderator
The ERF wizard doesn't seem to offer disabling the LED, The URF SRF XRF ERF wizard does, but doesn't seem to ask which pins I have the ERF on. Which wizard do I use?
If you wait a few (~6) more hours I'll be back home where I have a project that does what you want by sending the required AT commands.
(I too find that retina burning red heartbeat LED annoying on my project boards!)
The bit that's not published too well is the timing.
There are delays you MUST add in at the right places when sending AT commands or they are simply ignored.

I never do a permanent write so it must be sent each time the board is powered.
Thus, you get heartbeat for a few seconds (shows it's powered and working) then it's switched off.
Actually set to RSSI but it's never given any indication of any nature when in that mode.

Alternatively, use the wizard to create the template and then adjust it to send the command you want out via sertxd which is how I did it.
 

StigOfTheDump

Senior Member
Thanks BB, I can wait till later, still plenty else to do.

It's not so much the annoyance factor as having it inside the dome with the camera might cause reflections. I considered paint and pliers but thought there might be a more elegant solution that can be reversed at a later date, as it's only for a temporary project lasting 10 weeks.
 

BeanieBots

Moderator
As promised....

With your ERF connected for download, run this..
Code:
Pause 1200 'wait at least 1 second with no activity.
Sertxd ("+++") 'enter command mode
Pause 1200 'wait another second
Sertxd ("ATLI R",cr) 'change LED indicator to RSSI (which will always be off)
Sertxd ("ATAC",cr) 'apply the change
'Sertxd ("ATWR",cr) 'uncomment if you want changes to be permanent
Sertxd ("ATDN",cr) 'all done & exit command mode
Pause 5000 'This should not be required but sometimes it is???
Hope it works for you
 

StigOfTheDump

Senior Member
Hi sorry to appear so thick but

Where do I run this? I tried putting it on my 20M2 with the AXE027 then switching over to ERF then rebooted the picaxe with the SRF unplugged from the PC and then plugged back into the PC. I also tried downloading it to the 20M2 by SRF/ERF. I seem to have switched off the heartbeat on the SRF but not on the ERF.
 

BeanieBots

Moderator
As you have found out, the wizard can be used to set things on the SRF.
The ERF needs to be done by downloading and running the little program I posted.
The pauses are required.
Maybe your RSSI works.
Try changing sertxd ("ATLI R",cr) to sertxd ("ATLI O",cr)

If you power off the ERF, the heartbeat will return unless you uncomment the write to memory line. (ATWR)
 

StigOfTheDump

Senior Member
Thanks, I just succeeded.

I used the ERF configuration wizard and inserted an extra subroutine where indicated. I used your ("ATLI R",cr) statement in the rest of the routine that I copied from one of the others.

Code:
[color=Black]BeanieBots:[/color]
[color=Green]'Pause 1200 'wait at least 1 second with no activity.
'Sertxd ("+++") 'enter command mode
'Pause 1200 'wait another second

; Set the frequency for required transmission baud rate
  [/color][color=Blue]setfreq [/color][color=Black]baudFreq
  [/color][color=Blue]pause [/color][color=Navy]1
  
  [/color][color=Blue]Serout [/color][color=Black]Tx, baudRate, [/color][color=Blue]([/color][color=Red]"ATLI R"[/color][color=Black],[/color][color=Blue]cr) [/color][color=Green]'change LED indicator to RSSI (which will always be off)

; Wait for an OK response or timeout and go to 'Fail'
  [/color][color=Blue]serin [PLAIN][[/PLAIN][/color][color=Black]timeout,Fail[/color][color=Blue][PLAIN]][/PLAIN][/color][color=Black], RX, baudRate, [/color][color=Blue]([/color][color=Red]"O"[/color][color=Blue])[/color]

[color=Green]''Sertxd ("ATAC",cr) 'apply the change
'Sertxd ("ATWR",cr) 'uncomment if you want changes to be permanent
'Sertxd ("ATDN",cr) 'all done & exit command mode
'Pause 5000 'This should not be required but sometimes it is???[/color]
[color=Blue]return[/color]
The LED is now off and I have downloaded another program via SRF/ERF so all seems well. I will just tidy it up a bit and save it somewhere safe for future use.

I named my subroutine after you to remind me later where it came from. If you object, I will change it.

Thanks again.
Stig
 

BeanieBots

Moderator
More than happy to have my name in somebody's code.

I'm surprised that just that subroutine does the job. You don't even enter AT command mode or commit the change!
Either way, glad you got it sorted.
Good luck with the rest of your project.
 

StigOfTheDump

Senior Member
I had the AT command mode line in, but as it was a subroutine of the ERF wizard it, was already in command mode and failed. After the subroutine it goes back into the original ERF wizard where it is committed. In effect I have just added your command into the ERF wizard but not changed anything else. I didn't find this wizard as user friendly as the URF SRF XRF ERF wizard as it doesn't read the existing settings in. I was worried I might change something inadvertently.

I am guessing "ATLI H" will switch it back on if I decide to make the change permanent.
 

BeanieBots

Moderator
The wizard reads in everything so that you can see what they are.
It would not be practical (but quite possible) for a PICAXE to get it all but why bother?
If you only change one thing, only one thing gets changed.
Reading in everything, changing one item and then writing everything back is IMHO more likely to result in an error.

Anyway, the important thing is that you are now sorted out and yes "ATLI H" will put the LED back into heartbeat mode.
The full set of AT commands can be found on the ceisco web site. (not sure if it's on Rev-Ed's).
 
Top