CLRC663 Module SPI -> I2C

February 23, 2022 Leave a comment

I got this CLRC663 RFID module from Aliexpress. I wanted to try and get it to work with I2C. The datasheet of the controller chip says it’s quite doable.

If you need to change your CLRC663 module to work with I2C, you can easily do so by using a hot air gun/rework station and changing resistors R2 -> R1, and R4 -> R8.

Communication Type Selection

You will also want to set the I2C address by moving R29 -> R9 and R28 -> R8 (I’m not sure why there are two R8s on this board. *shrugs*). This will set the the controller pins 28 and 30 to GND.

I2C Address Selection

After these changes are made, you should be able to communicate with the chip at I2C address 0x28.

SOLVED: Numeric or value error in Oracle APEX Interactive Grid

September 25, 2020 Leave a comment

I have been working with Oracle APEX framework for work. I keep getting this error when saving data in an interactive grid:

APEX INTERACTIVE GRID ORA-06502: PL/SQL: numeric or value error: character to number conversion error

The application has been working for months, and then it breaks. I have no idea why. The error is happening when updating a Varchar field, so it’s certainly not table data type problem, even though, the error would lead you to believe that.

After hours, even days, of troubleshooting and only able to fix the problem by rebuilding the interactive grid, I found the root cause.

Under in the APEX development interface, for the page that is having the problem, in the Processing section, there is a process with type  Interactive Grid – Automatic Row Processing (DML) which processes row updates when data is changed and saved by the user. Under the settings there’s an options Prevent Lost Updates which is intended to prevent two users from saving the same record differently. I turned this off, and it’s working now.

There is obviously a bug in Oracle’s code:

  1. I created a new record, then updated that same record, and received the error. There’s no way that record was opened by anybody else.
  2. If this is the “feature” doing it’s job, and making sure the same record can’t be edited twice by different users, the error message is extremely poor, frankly, its so unrelated, it can’t possibly be the intended error when an conflicting update is detected.

I was thinking of logging an Service Request with Oracle, but two problems here, this isn’t really a supported application, as it’s “free” with the database. And also, the Oracle support page isn’t working; lovely. It’s been broken for at least two days.



Solution: BI Publisher QR Codes

December 12, 2019 14 comments

I saw a post on StackOverflow asking How to use variable in link for QR Code and I was quite intrigued. I didn’t think it could be done at first. But then I figured it out.

I do know that BI Publisher has built in Chart support, so my first thought was to just use that. But BI Publisher charting cant generate QR Codes. None the less, I linked to BI Publisher Report Designers guide to explain those details if anyone stumbled upon this post looking for actual charts.

My second thought was to follow a blog entry that an Oracle developer posted about using QR Codes in BI Publisher. It mentioned making a java class, and using an IDAutomation QR Font. It was quite complex. This is probably the method to go after if you want all the data to remain internal to the Oracle server in the enterprises data-center. I posted the details to that too.

Finally, I remember using dynamic images at Emerson for insertion of Casting images into Work-orders/Shop-packets. I figured why not give it a shot. I created a quick XML test file, and a simple RTF file. I use the concat (concatenate) function in BI Publisher to combined the Google Charts API for QR codes and the variable I wanted encoded.

Test XML


Test RTF Template

RTF Template

RTF Template



[when copy/pasting from this page, replace the x in the URL with one hand-typed.]

My first attempt failed because of a space in my test data. If you have spaces or special characters in the data you want encoded in the QR code, make sure you URL encode the data that you want to pass into the Google API URL. Oracle allows you to do this with the UTL_URL function. Also note: this post is being made with WordPress, the single quotes are improperly being replaced with smart quotes and/or HTML entities… use care if copying and pasting, and make sure to use the single quote as per screen shot.

Example use of UTL_URL.ESCAPE

select rownum row_num, utl_url.escape(record_value) value from test_table

Once I removed the space from my test data, it worked! I was shocked how easy it could be.

Test Output

PDF Output

PDF Output

Other Considerations

One last thing to note, if you expect this to work on your enterprise server/network/data-center, you’ll probably have to open up the firewall.

Updating Realtek Drivers for PFSense on a ZOTAC ZBox

January 25, 2019 8 comments

A long while back I built a ZOTAC Zbox (ZBOX-CI323NANO-U) to run PFSense and act as my router. For the most part, it has worked pretty well.  The features are great, without any of the gimmicky stuff you’d find on a consumer router. It’s also a lot more upgradable than a consumer router.

One problem though, on occasion I’d have to restart the ZBOX when the internet would stop working. The display I had connected to the PFSense machine said this during a failure:

re1: watchdog timeout

Each time the error occurred, I would hunt around the internet for a few minutes to find a solution, but I was never able to find one. I gave up for a while. But recently I took a deeper dive.

I found some pages blaming the default network adapter drivers and how they don’t work well with realtek adapters. I also found this page announcing new realtek drivers. I’ve dabbled with Linux a bit, but I’d still consider myself pretty novice. It was pretty difficult for me to get the drivers copied over to the machine, and then installed.

Here’s the process I followed to get them installed:

Read more…

Whole Home Humidifier

January 23, 2018 2 comments

1320352173735008201water-droplet-hi.pngDry air is very unpleasant to be in for extended periods of time. Last winter I tried to rectify the problem by using a single ultrasonic humidifier. It seemed totally inadequate, so I purchased a second higher capacity unit. I quickly became annoyed at how tedious it was to fill the reservoirs. And neither really solved my problem well. This year, I decided to install a whole home humidifier system.

Installing a Humidifier is not an easy task, and required quite a bit of knowledge of different building systems. See below for all of the work that I did, what I learned, and a list of parts.

System Selection

The most common type of whole home humidifier is a bypass humidifier, where water trickles down a special mesh pad that heated air passes over. The humidifier unit itself is quite large and must be attached to a fairly large surface area of unobstructed flat ductwork, as well as have a return/supply bypass. Unfortunately I did not have the space on either side of my furnace (cold air return, or heated air supply) to place the bypass unit.

I did quite a bit of research to find some alternatives. I selected a steam humidifier; an AprilAire 800. The AprilAire 800 is a steam generating machine which placed on a wall/support close to the hot air supply of the furnace. A steam pipe is connected from the steam generator to the ductwork. The AprilAire 800 has a replaceable canister with electrodes in it.  The unit fills the canister with water and generates steam. Periodically, the system will flush the mineral rich water out to reduce mineral buildup in the canister.

A significant benefit to a steam system is that it doesn’t need the furnace to run heat at the same time it is humidifying, it only requires air circulation.

The unit has a capacity of 34.6 gallons a day, but my configuration will be at 23.3 gallons a day. Seems the maximum capacity of a bypass unit would be about 12 gallons a day. Ultrasonic units have a capacity closer to 3 gallons a day.

Read more…