Other options to wirelessly program PICAXE?

hippy

Technical Support
Staff member
Please accept our apologies for the broken links. It's my fault; I missed the BOM entries in Circuit Creator when checking links on the site to the shop were correct. We will get them corrected. Thanks for letting us know.
 

PhilHornby

Senior Member
With the ERF module being out of stock for a while, are there other options to wirelessly program a PICAXE?
I started looking at this, earlier in the year. It took quite of bit doing to get the Serial over Ethernet functionality to run. See: this thread

My plan was to use (modify) some alternate ESP-8266 firmware for this purpose. The software I had in mind was ESP-LINK by JEELABS

Of course, to be able to modify it, I needed to be able to (re-)build it...
...by the time I'd managed that (on Windows), I'd completely forgotten what I set out to do - and got side-tracked by something else :unsure:
 

Goeytex

Senior Member
Wireless programming can be tricky with a Picaxe ( Or any other Microcontroller). With the Picaxe, it requires RF modules that act as a transparent UART and that also support break signaling. Since ERF modules are no longer available the choices are slim.

I have had wireless programming success on non-Picaxe PIC's using Wireless Modules from INHAOS, specifically the LC-2000PA Series. But the LC-3000PA series should also work in a similar manner. These are 2.4GHz modules that provide good range and use a Master / Slave method. You will need a Master and a Slave as well as a USB/TTL adapter for programming these modules.

The tricky part is related to the rather odd way that a Picaxe is taken into programming mode. A serial "Break" must be simulated, and. or a chip reset performed using the DTR signal.
 

hippy

Technical Support
Staff member
The main difficulty is the break signalling, sending that '257th character' over a system which is intended to only carry 256. Some microcontrollers and their programming languages don't even offer break received detection which makes interfacing to what the downloader puts out something of a challenge, plus a UART will usually present the wrong polarity for interfacing to RS232, AXE027 and the PICAXE.

Then there is the problem of which 'wireless PICAXE' is being addressed when you have more than one, and how to handle downloading to a PICAXE which requires power-cycling before it will accept a download. Adding wireless capability on the PICAXE side will increase power demands which is often counter to wanting that for a standalone, remote and battery powered system.

That usually means there are only limited circumstances where wireless downloading is useful and it requires something more complicated than just an off-the-shelf module with a wireless transceiver to handle it. And, given the cost and limited use, it usually soon starts to not look so appealing. It's a bit of a Catch 22; make it more appealing in one respect and it loses it's appeal in some other way.

The PICAXE programming via ERF solution came about through a third-party figuring out how to add break functionality to their existing ERF product, giving 'added value' to it. Starting from the ground up it's a much more challenging task.

Unfortunately the manufacturer and developer of the custom firmware ERF sold their business to a company which ceased production of that and the entire ERF/URF related range.
 
Last edited by a moderator:

Hemi345

Senior Member
Thanks for all the replies. I was more interested in a pre-made solution like the ERF just for convenience. Two of my projects (powered by mains) are inconvenient located so was looking for wireless options. Usually I make changes to the program at my desk, go to the location of the device to program and realize I need to tweak the program a little. An hour goes by of standing holding the laptop with one hand trying to type with the other. A little ERF I can plug in-situ for this purpose would be great. Wish I would have picked one up before they discontinued it.

Since I have mains power available, I could use an Intel Compute Stick (w/PE6 installed) to connect to the device. Then use Remote Desktop from the comfort of my couch to make changes. But I'd rather get something cheaper.
 

hippy

Technical Support
Staff member
Raspberry Pi Zero W? Has anyone gotten a picaxe compiler/downloader to run on one of those--headless command line?
Not tried it on a Pi Zero W but the X86 Linux PICAXE compilers can be run on a Pi thanks to Fanoush figuring out how to -

https://picaxeforum.co.uk/threads/arm-binaries-for-command-line-compilers.22547

Jump to Post #14 for a quick how to for a Pi running Raspbian.

I suppose one neat idea would be a Zero W in USB Gadget mode plugged into a PC presenting itself as a USB Virtual Serial Port communicating with another Zero W with an AXE027 plugged into it. Not sure that would be particularly easy though.
 

lbenson

Senior Member
... Zero W in USB Gadget mode plugged into a PC presenting itself as a USB Virtual Serial Port ...
But since you can connect to the headless RPiZW through ssh, and get to the command line, there should be no need for a second RPi.
 

premelec

Senior Member
I wonder if the [expensive!] wireless RS232 transceivers would work... just an academic interest on my part as I've never used them; I still use my OLD RS232 programming cable with a USB to RS232 adaptor on newer computer.
 

hippy

Technical Support
Staff member
I've just remembered this thread: https://picaxeforum.co.uk/threads/picaxe-programming-via-bluetooth.28745 which is pertinent. I've read it through several times and can't for the life of me, fully understand how it works :unsure: ... but its author (@guydu99) claims it does.
I don't understand it all either but it seems to me it is something which can be coerced into working in some cases if one is prepared to jump through a whole load of hoops, and a whole lot of complexity with that, so long as one does not care that it all stops at a dead end when it doesn't work as expected.

I'm not knocking it because it seems a good proof of concept which shows it can work while highlighting the problems and traps which can be encountered.

It's the making things easy and reliable while overcoming those problems in a satisfactory way which is the hard part.
 

Hemi345

Senior Member
I'm very interested in the bluetooth programming method. After the holidays, I'm going to try it and see since I already have a few bluetooth modules. I think I understand what he's doing and I believe if I figure it out, it won't be too terribly clunky, just not a one-click-and-done method that some may be looking for. But it looks perfect and cheap for someone that needs to fine tune a program over the course of a few days/weeks and the location of the project isn't readily accessible/comfortable.
 

hippy

Technical Support
Staff member
I got it working with Pi ZeroW with help from a forum member with an excellent write up.
Having booted my Pi Zero W, despite what I had said earlier, it seems I had previously tested the compilers with that and had them work. Always good to check they still do. The compilers should work on any Pi.

It is a shame Pi's don't have programmable polarity on their UART. That means either a MAX232 or other inverter needs to be used or an AXE027 or other USB-to-serial download cable connected, and that requires an OTG connector cable for a Zero. I will have to look to see if there's any bit-banged UART support which could help there. Note that the Pi's UART and GPIO pins are not 5V tolerant and not as robust as the PICAXE I/O is.

The downside of a Pi used over SSH, Telnet or RDP, is it is simply adding a cheap PC closer to the PICAXE which can have files copied to it, compiled then downloaded. It's not quite so elegant as developing on Windows and downloading from PE6.

If there were some way to share the Pi's serial port over the network and have PE6 see that it could become a solution. Reading what guydu99 did it seems they may have achieved this using other hardware. It's also a trick I used early on in trying to do remote PICAXE programming so it might be worth revisiting that to achieve a Pi solution.
 

PhilHornby

Senior Member
If there were some way to share the Pi's serial port over the network and have PE6 see that it could become a solution.
What I forgot to say out loud, in my earlier post (#5), is that this is what I was attempting to do with the ESP8266.

The "Serial over Ethernet (Program Picaxe connected to another computer over internet)" functionality of PE6 implements just that (albeit from Windows PC to Windows PC). My working assumption, is that this is achieved using RFC2217 - so that all (;)) that was required was to add some RFC2217 support to the ESP8266. As mentioned earlier, I think I actually found the basis for this, already written (in the Jeelabs firmware).

I'll bet RFC2217 support exists for the Pi ... running some O/S or other...

Before that he said:
It is a shame Pi's don't have programmable polarity on their UART.
This was an issue with the ESP8266 as well. My googling revealed a single other person who wanted to do it ... and the only response he received was "why?". Digging around in the development kit for the ESP8266, revealed that the functionality is there - but not exposed in any API (just a couple of bits to toggle).

It might turn out to be the same story on the Pi...

(The addition of a Raspberry Pi to a Picaxe project, could easily be considered a case of "the tail wagging the dog" though :) )
 
Top