All posts by Jayadeva

The Barefoot DJ

opencodi – building a new firmware for Pillar Codi robot

All project files are now on github:
Now here’s the skinny:
My nephew got a Codi robot a few years back. The toy is pretty lame and definitely not worth the > $100 that my sister paid for it. We played with it for about 10 minutes and it never got used again. Today I pulled it off the shelf to start reverse engineering it in hopes that I could make it into something fun and useful. 
Currently the robot only has the most basic functions as I can’t even get my Codi Parent app set up (The software interface from Pillar used to configure the device) as I can’t get past email verification. I have yet to get anything but an automated email response from Pillar Customer Service so I can’t even get the unit working as originally intended. It is essentially a paperweight at this point.
Coming up with a new firmware for this device is worth the time for a few reasons:
  1. These devices are cheap and readily available on ebay
  2. They look like a Reddit avatar
  3. They have all the right peripherals to make a cool IoT device
  4. The company is unresponsive and maybe out of business
I have disassembled the toy and found what hardware it is using:
  • Main processor: XR871ET – Datasheets | SDK
  • Audio processor: A101
  • Bluetooth(?): JL AS20AP24150
  • Storage: GD25Q64C – Datasheet
If I plug the robot into my Linux machine and run dmesg I get this error:
usb 3-3: new full-speed USB device number 60 using xhci_hcd
usb 3-3: Device not responding to setup address.
usb 3-3: Device not responding to setup address.
usb 3-3: device not accepting address 60, error -71
usb usb3-port3: unable to enumerate USB device
The chip does not have a USB connection, only UART and there is no built in USB to Serial converter on the board. Some tracing has confirmed that the USB port does connect to the UART of the chip using a non standard USB wiring configuration.
  • USB Pin #3 connects to Pin #49 UART0_TX
  • USB Pin #4 connects to Pin #48 UART0_RX
I have a USB to serial converter on the way (the one I have doesn’t seem to be working) and found a male micro USB plug with all 5 pins available to make the connection interface.
The USB pads on the back of the board connect to the JL AS20AP24150 chip.
  • DM pad connects to Pin #3
  • DP pad connects to Pin #4
Connecting a USB cable to these pads according to the label produces the same error in the terminal as seen above. I need to find a datasheet on this chip to see if I will need to reprogram it and why there are these breakout pads.
I am having trouble definitively identifying this chip and finding a datasheet and could use some help on this. Here is the chip:

Can someone find this please!!!???
Finally storage is handled by a GigaDevice 25Q64CS chip and a 4Gig SD card.
  1. Acquire USB to Serial converter and create custom USB plug for reading/writing firmware to XR871 chip.
  2. Determine if existing firmware image can be de-compiled and edited or if a new FW will need to be written from scratch.
  3. Trace out all connections and create a detailed schematic of the motherboard.
  4. Create custom firmware. Can I make this thing run Linux?
  5. Use Codi as a control hub for smart devices similar to Siri or Alexa… Mycroft or Rhasspy?
I am open to any ideas, suggestions or collaborations.

Installing Zenmap in Ubuntu 22.04

There are a few tutorials out there claiming to instruct one on installing Zenmap in newer versions of Ubuntu, unfortunately all the ones I have found simply do not work. The big problem is that Python 2  and pyGtk have been completely phased out and are no longer available in Ubuntu. Attempting to install any currently available .deb packages will result in failure.

FEAR NOT!!!! The nmap team has updated their code to Python 3 and the entire nmap suite can be installed quite easily from source. Zenmap, with a minor tweak to the config file will  work on Ubuntu 22.04 (LTS)!

OK, let’s get into it!

This install will be performed from the command line so get started by opening a terminal…

1: Install prerequisites

$ sudo apt install build-essential checkinstall zlib1g-dev libssl-dev libcurl4-openssl-dev

2: Get the source code from github

$ cd ~/Downloads
$ wget -O
$ unzip

$ cd nmap

3: Fix Zenmap config file

There is an error in the current Zenmap config file and if not fixed Zenmap will not be able to find your nmap binary.

$ nano zenmap/share/zenmap/config/zenmap.conf

Navigate to line 60 and fix the [paths] section. Change this:

nmap_command_path = ../nmap
ndiff_command_path = ../ndiff/ndiff

To this:

nmap_command_path = nmap
ndiff_command_path = ndiff

If you have already gotten everything installed but Zenmap can’t find nmap, you can do the same fix on the file in your home folder:


4: Compile and install

$ ./configure
$ make
$ sudo make install

5: Run Zenmap

For full functionality of Zenmap, it is recommended to be run as root.

$ sudo zenmap

Happy Hacking!

Creatality Ender 3 – Custom start gcode for Cura Bed Leveling and Clip

I have a Creatality Ender 3 3D printer I have upgraded with a 32 bit silent main board, glass print bed, and a BL Touch auto bed leveler.

Using the firmware from Creatality for the new board did not work at all. Nor did default start code. I was having trouble getting the bed leveling to work, the tip to deblob, and for the print head to avoid the clips for the glass bed.

After much trial and error I got a working Marlin Firmware installed on the new board. The final win was updated start code for Cura. Here is my custom start gcode that does the following:

  1. Preheat bed
  2. Preheat extruder during setup
  3. Levels the bed and enables leveling
  4. Draws the starter lines avoiding the clips for the glass bed
  5. Deblobs the tip

; Ender 3 Custom Start G-code
M117 Heating bed...
M140 S{material_bed_temperature_layer_0} ; Set Heat Bed temperature
M190 S{material_bed_temperature_layer_0} ; Wait for Heat Bed temperature
M117 Pre-heating extruder...
M104 S160; start warming extruder to 160
G28 ; Home all axes
M117 Leveling bed...
G29 ; Auto bed-level (BL-Touch)
M420 S1 ; enable bed leveling
G92 E0 ; Reset Extruder
M104 S{material_print_temperature_layer_0} ; Set Extruder temperature
G1 X10.1 Y20 Z0.3 F5000.0 ; Move to start position
M117 Heating extruder...
M109 S{material_print_temperature_layer_0} ; Wait for Extruder temperature
M117 Prepping extruder...
G1 X10.1 Y200.0 Z0.3 F1500.0 E15 ; Draw the first line
G1 X10.4 Y200.0 Z0.3 F5000.0 ; Move to side a little
G1 X10.4 Y20 Z0.3 F1500.0 E30 ; Draw the second line
G1 Z5.0 F3000 ; Move up and over for de-blob
G1 X15
G92 E0 ; Reset Extruder
M117 Printing...
; End of custom start GCode

That works for me, customize it to your needs. You can support us by subscribing to our YouTube channel and/or by checking out our sponsored links. Thanks!

Pietenpol Build. First elevator frame completed.

To construct a single elevator piece (two are required), twenty two spruce parts must be cut, milled, and glued together. That’s 44 custom wood parts for the elevators. And then sanding. Lots of sanding…. No wonder it takes some people ten plus years to finish one of these babies.

It’s finally starting to look like an aircraft part! I used gravity to hold the joints together as T-88 likes minimal clamping pressure. I used tape for clamping pressure around the spars to hold them against the trailing edge.

I have also glued on the 1/8″ backing plates for the hinges.

You may have noticed that there are only gussets on one side of the leading edge. If you are building your own Piet, it is crucial that the hinges are installed before putting the gussets on the other side. Otherwise you will not be able to properly torque the hinge bolts.


Pietenpol Air Camper: Elevator Construction Part 2 – Fitting and Glueing

After a long break I am back to work on the Air Camper. First elevator piece is being assembled. I used T-88 Epoxy and held everything in place with a jig.
Now I am waiting for hinge bolts from Aircraft Spruce. Looks like I will need to fully install the hinges before putting the gussets on the other side.

If you look closely at the next pic you can see that the hinge nuts and plate will be between the gussets and nearly inaccessible. Next step will be to get the plywood hinge back-plates built and glued in. Hopefully I will have enough time to get the other elevator piece finished before the bolts get here. Building the second identical elevator piece should go much quicker now that I have all the jigs built and the technique down.As you can see the joints are held together via the jig so there is no excessive clamping force starving the joints of adhesive.Please check back often as I will post updates as I build. If you would like to support my build you can subscribe to my YouTube channel, click on some ads or support me on Patreon. Thanks!

CW Straight Key, Steampunk Style. Made From Salvaged Materials

A CW (Morse Code) Straight Key is one of the simplest HAM Radio goodies to build. The concept is simple, short out the two Key leads. This leaves plenty of room for creativity and style with this make.

I used a piece salvaged aluminum around the size of 3mm X 13mm, a scrap piece of 2×2, some screws, washers, a spring, some ring connectors, a fulcrum pin, and a 3.5mm mono plug. I had all these parts in various “junk bins”.

First thing I did was use Inkscape to  make a simple SVG shape for carving out the wooden base from the 2×2.





CW-Key SVG Files

I used OpenBuilds CAM (OBCAM) to create the GCODE and OpenBuilds Control (OBC) to send the GCODE to the CNC.

Next I used the surfacing feature of OBC to make a little jig to hold my aluminum piece. Then I milled the Aluminum to match the base.

With the parts all made it was just a matter of assembling and then adjusting everything to work smoothly. Add some stain and sealer and I am ready for field day!

Check out the full video on YouTube and please take a second to subscribe to my channel:

73 – KK6VHH

MyDIYCNC Desktop CNC Machine $20 GRBL Resurrection

About 8 years before the writing of this article i purchased a CNC machine from Amazon created by a company called MyDIYCNC. I was interested in the technology and the price was right at only $250.

It was easy enough to assemble and get working with Linux using their FabCAM software. Well, so it seemed at first…

When the z-carriage would retract, it would skip some steps once in a while and eventually drive the tool head into whatever I was trying to mill. While the company’s customer support was responsive I could never figure the issue out and the project got shelved.

Long story short the company is no longer around but the machine was. Sitting on my shelf, sadly doing nothing.

Then one day while shopping for 3D Printer upgrades, I ran across this Arduino kit on amazon that will replace the proprietary brains, motor controllers, and software with a well supported open source system, GRBL.

I put the Arduino and drivers into this 3D Printed enclosure:

I used the power supply that came with the MyDiyCNC kit as well as the original spindle relay. The two wires on the right go to the spindle pins on the Stepper Hat:

I soldered some female plugs from jumper wires onto my motor wires and attached them to the motor driver output. Color order from top (reset button side of board, see photo) is Blue, Red, Black, Green:

I hooked the 12V+/- output from the power supply to (yellow+, black-) to the controller hat. This is also where I pulled 12V for the 40mm enclosure fan.

Don’t forget to put a jumper on the enable pins (right of reset button).

Once everything was all hooked up I adjusted the motor controllers amperage to 400mA (for the stock motors that came with the kit, your mileage may vary) using this guide.

Now you just need to flash GRBL to your Arduino and get some software for your computer. Here are some helpful links and files that go me through the rest of the setup phase including jumper settings for microstepping:

The last tweaks to get it to work correctly was to set the X, Y, Z max speed to 350mm/min (Firmware Settings) and 1/4 micro-stepping (Jumper under motor driver).

Now you can calculate your steps per millimeter here.

Finally, the software to control it.

I have been using OpenBuilds Control and their integrated CAM software. It works fairly well, though the GUI is prone to crashing. Upside is that when the GUI does crash, the job still completes. Unfortunately he crashed GUI can make it difficult to find perfect zero again.

Universal Gcode Sender will definitely play with GRBL and control the machine. However I have yet to use it to actually run a job. I will post updates after I give it a try.

Feel free to post any questions in the comments section below!

Kenwood TS-440S IC-10 Upgrade and DIY CAT Control for Linux

My radio club, SFARC, has helped me get into an HF rig, namely the Kenwood TS-440S. This radio is a bit old (1986ish) but, IMHO, this thing is awesome. It has a fairly compact form factor, runs of my 12V off grid power without issue, and with the following upgrades will talk to my computer.

I first purchased a digimode cable that has opto-isolated audio input/output as well as a USB PTT coupler which is allowing me to experiment with digital modes on this transceiver. While this is great, I would like to be able to view and control the frequency of my radio from FLDIGI via HamCAT or hamlib. Turns out this will require a little bit of hacking (awesome!) to get it working.

Kenwood TS-440 Digital Interface Cable

Issue #1: The 13 pin DIN, ACC 2, only provides audio and PTT functions. If I want to provide a serial interface I need to use the 6pin DIN, ACC 1, interface. I need to build an interface cable.

Issue #2: This interface is a serial connection using TTL voltage (5.5v) but with the same logic as a standard serial port. I need an FTDI breakout board with inverted logic.

Issue #3: The 440 requires an upgrade kit (IC-10) to provide serial communication capabilities. This kit is semi-rare and costs about 50 bucks.

In this article issue #1 will be addressed with a six pin din plug ordered from amazon.

Issue #2 will be handled by an FTDI USB board I already have on hand and an XP virtual machine running FD_PROG to invert the logic. Unfortunately this makes this solution NOT 100% Linux. To resolve this I will use the command line Linux program ftdi_eeprom to clone my firmware and post it here so Linux only users can use ftdi_eeprom or flashrom to program their FTDI boards with ease.

Issue #3 is easily resolved by ordering the chips individually or by purchasing one of my $15 IC-10 kits from eBay.

IC-10 Chipset for Kenwood TS-440 / R5000

#1: Build the plug.

After receiving the plug from Amazon, I repurposed a shielded USB cable to build the plug. I hooked up all the wires even though CTS/RTS were not required. RFU style as it were. Perhaps adding flow control in the future would speed things up. I don’t know I haven’t tried. Anyway….

Disassembled Plug

These are the pin numbers as viewed from the solder side:

  1. GND
  2. TXD
  3. RXD
  4. CTS
  5. RTS

Here is how I hooked up the 5 wire USB cable:

  1. GND -> Cable shield
  2. TXD -> Green
  3. RXD -> White
  4. CTS -> Black
  5. RTS -> Red
Wiring Diagram

#2: Install the chips.

After I received my chips, I installed them following this guide. To sum up, remove the top and bottom cover from the radio. Then remove the face-plate screws and then loosen the 5 small screws for the metal grounding plate so it may be removed. Once this is done the chip slots will be exposed ( they are the only two empty slots on the back of the face-plate ). You will need to use a flat surface to bend the pins slightly inwards so that they will line up with the sockets when you insert them. Pay close attention and make sure the chips are fully seated properly into the sockets.

Once this is done reassemble the radio and ensure that it is working properly. Now the ACC 1 port has serial com capabilities.NICE!

#3: Hook Up the FTDI Breakout Board

The only pins required for communication are GND, TRX, and RTX. You supposedly can use a 5 wire connection using CTS/RTS flow control but it is not necessary. The FTDI breakout I used for this project only made CTS and DTS readily available so I went with the three wire setup. There may be advantages to having flow control and I would be interested to hear input on this in the comments.

My Notes

Attach the TX from your rig to the RX on the FTDI and the RX from the rig to the TX on the FTDI. GND goes to GND.

FTDI on the proto board

#4: Program the FTDI Board

Although the wiring is done, we still need to invert the logic on the FTDI board. There is no linux app to easily do this so I ran the FD_PROG utility using an XP virtualbox install to run this program. There are multiple drivers available from FTDIChip, make sure you use the correct driver for your system.

If you don’t have a windows install to program your FTDI chip, you can flash the following firmware to your FTDI chip using ftdi_eeprom. This firmware has the inverted logic necessary to communicate with your rig.

  1. FTDI Firmware File
  2. ftdi_eeprom Config File

Download both files to the same location, plug in the FTDI and program it. Something like this:

ftdi_eeprom --flash-eeprom ftdi.config

#5: Time to play radio!

You can now use FLDIGI or similar to read/send the frequency and PTT key your radio. Software config is beyond the scope of this article, but this is what it looks like:

If you enjoyed this article you can support me by subscribing to my YouTube channel and/or visiting some links from my sponsors. Thanks!


  1. FTDI Chip Utilities
  2. FTDI Chip Drivers
  3. Installing an IC-10 kit into a Kenwood TS-440S/AT HF Radio
  4. TS 440 Serial Communications Interface
  5. TS-440 SAT Modifications
  6. Kenwood TS-440 mods reviews software and diagrams
  7. Build an Easy USB Computer Interface for Your Old Kenwood Rig