Broken uno220rtc debian package Advantech UNO-220

Hello, I purchased one of this cases and a raspberry Pi4 but I have an issue. The raspberrian system that came in the SD card is:

raspios_full_armhf-2021-01-12/ 2021-01-12 15:28 -

When I place the SD card in the SD card in the raspberry pi slot, the pi cannot boot, it says it needs a newer raspberrian, I installed several different versions of the operative system like:

raspios_full_armhf-2021-03-25/](Index of /raspios_full_armhf/images/raspios_full_armhf-2021-03-25) 2021-03-25 15:36 -

The raspberry pi was able to boot but when i try to follow the process in this tutorial, i get this answer:
The following packages have unmet references


I tried installing different raspberrian system but the system from 1/12 is too old and the one from 3/25 the raspberry kernel is too new, what should I do?

Hello @danielf,
I am checking with Advantech and will provide an update when I have more info.

Scott Raeker

Hello @danielf,
Advantech provided the below info:

Please try this image:

Please let us know how it works.

Scott Raeker

Those are both year old versions of Raspberry Pi OS. There have been many bug fixes and improvements for the RasPi 4 in the past year so I strongly recommend you try one of the newer more bug free versions from April of this year.

Scott, thanks for the info sadly the image you sent gives the same result with the file uno220rtc, the file fails to install and gives the error that the kernel is too new.

I understand raspberry pi have much newer versions but Advantech haven’t created updated versions of the drivers for the UNO-220, that’s the reason why I’m looking for a version that will work with the raspberry pi and the case hat UNO-220

Hi @danielf looking at:

2021-05-28 should be supported… Just make sure you don’t upgrade the kernel before install the uno220* dpkg modules…

Looks like we can build them ourselves…

sudo apt update ; sudo apt install time
git clone https://github.com/Advantech-IIoT/UNO-220-POE-
cd ./UNO-220-POE-/
make rpidpkgrtc
voodoo@rpi4b8g-01:~/UNO-220-POE- $ make rpidpkgrtc
make[1]: Entering directory '/home/voodoo/UNO-220-POE-'
Cloning into '/home/voodoo/UNO-220-POE-/build/compiler'...
remote: Enumerating objects: 11011, done.
remote: Counting objects: 100% (11011/11011), done.
remote: Compressing objects: 100% (5532/5532), done.
remote: Total 11011 (delta 5763), reused 9924 (delta 4990), pack-reused 0
Receiving objects: 100% (11011/11011), 189.86 MiB | 9.43 MiB/s, done.
Resolving deltas: 100% (5763/5763), done.
Updating files: 100% (19060/19060), done.
Cloning into '/home/voodoo/UNO-220-POE-/build/kernel/4.19.118-v7l+/src'...
remote: Enumerating objects: 66216, done.
remote: Counting objects: 100% (66216/66216), done.
remote: Compressing objects: 100% (62021/62021), done.
remote: Total 66216 (delta 5180), reused 16660 (delta 3269), pack-reused 0
Receiving objects: 100% (66216/66216), 178.80 MiB | 7.80 MiB/s, done.
Resolving deltas: 100% (5180/5180), done.
Note: switching to 'fe2c7bf4cad4641dfb6f12712755515ab15815ca'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

okay it’s building for 4.19.118-v7l+

Edit 2:

voodoo@rpi4b8g-01:~/UNO-220-POE- $ make build_dpkg_img
make[1]: Entering directory '/home/voodoo/UNO-220-POE-'
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 2866M  100 2866M    0     0  16.7M      0  0:02:51  0:02:51 --:--:-- 19.0M
Archive:  /home/voodoo/UNO-220-POE-/build/download/raspbianfull20210507.img.zip
  inflating: 2021-05-07-raspios-buster-armhf-full.img  
mount: /home/voodoo/UNO-220-POE-/build/mount/root: failed to setup loop device for /home/voodoo/UNO-220-POE-/build/release/2021-05-07-raspios-buster-armhf-full.img.
make[1]: *** [rules/project/image.mk:34: mount_dpkg_img] Error 32
make[1]: Leaving directory '/home/voodoo/UNO-220-POE-'
Command exited with non-zero status 2
133.94user 98.48system 5:46.70elapsed 67%CPU (0avgtext+0avgdata 9276maxresident)k
853560inputs+22672888outputs (47major+169412minor)pagefaults 0swaps
make: *** [Makefile:20: build_dpkg_img] Error 2

So that’s broken, lets try x86…

Regards,

Good to know, thanks.

That makes them a no recommend or use, when connected to the internet, for my employer and I.

Hello @danielf,
Advantech provided below updated info:

Please make sure the customer runs the first two lines of instructions to update the source and download the correct drivers.

For official Raspios

Driver installation guide (only supports up to official raspios_full_armhf-2021-05-28)

I did the following:

  1. Purchased a brand new 32Gb SD drive.

  2. Wrote the image * * raspios_full_armhf-2021-05-28

  3. Booted the Raspberry Pi disconnected from the Advantech UNO-220 to insure the image was good. It booted.

  4. Powered down and installed the Raspberry Pi in the Uno-220.

  5. Booted. It booted just fine.

  6. Changed sources.list to 777 permission.

  7. Followed the directions above and added the non beta testing package source to the sources.list file.

  8. Viewed the sources.list file to insure editing took.

  9. Ran sudo apt-get update. I got the following result:

> Ign:1 https://advantechralph.github.io/uno-220/dpkg  InRelease
> Ign:2 https://advantechralph.github.io/uno-220/dpkg  Release                                                        
> Ign:3 https://advantechralph.github.io/uno-220/dpkg  Packages                                                       
> Get:4 http://raspbian.raspberrypi.org/raspbian buster InRelease [15.0 kB]                                           
> Ign:5 https://advantechralph.github.io/uno-220/dpkg  Translation-en             
> Get:6 http://archive.raspberrypi.org/debian buster InRelease [32.6 kB]          
> Ign:7 https://advantechralph.github.io/uno-220/dpkg  Translation-en_US                     
> Ign:8 https://advantechralph.github.io/uno-220/dpkg  Translation-en_US.UTF-8                
> Ign:3 https://advantechralph.github.io/uno-220/dpkg  Packages
> Ign:5 https://advantechralph.github.io/uno-220/dpkg  Translation-en
> Ign:7 https://advantechralph.github.io/uno-220/dpkg  Translation-en_US
> Ign:8 https://advantechralph.github.io/uno-220/dpkg  Translation-en_US.UTF-8
> Ign:3 https://advantechralph.github.io/uno-220/dpkg  Packages
> Ign:5 https://advantechralph.github.io/uno-220/dpkg  Translation-en
> Ign:7 https://advantechralph.github.io/uno-220/dpkg  Translation-en_US
> Get:9 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages [13.0 MB]
> Ign:8 https://advantechralph.github.io/uno-220/dpkg  Translation-en_US.UTF-8     
> Get:3 https://advantechralph.github.io/uno-220/dpkg  Packages [1,139 B]
> Ign:5 https://advantechralph.github.io/uno-220/dpkg  Translation-en                                   
> Get:10 http://archive.raspberrypi.org/debian buster/main armhf Packages [391 kB]
> Ign:7 https://advantechralph.github.io/uno-220/dpkg  Translation-en_US                   
> Ign:8 https://advantechralph.github.io/uno-220/dpkg  Translation-en_US.UTF-8             
> Ign:5 https://advantechralph.github.io/uno-220/dpkg  Translation-en                       
> Ign:7 https://advantechralph.github.io/uno-220/dpkg  Translation-en_US                    
> Ign:8 https://advantechralph.github.io/uno-220/dpkg  Translation-en_US.UTF-8             
> Ign:5 https://advantechralph.github.io/uno-220/dpkg  Translation-en                      
> Ign:7 https://advantechralph.github.io/uno-220/dpkg  Translation-en_US                  
> Ign:8 https://advantechralph.github.io/uno-220/dpkg  Translation-en_US.UTF-8            
> Ign:5 https://advantechralph.github.io/uno-220/dpkg  Translation-en                        
> Ign:7 https://advantechralph.github.io/uno-220/dpkg  Translation-en_US                      
> Ign:8 https://advantechralph.github.io/uno-220/dpkg  Translation-en_US.UTF-8                
> Get:11 http://raspbian.raspberrypi.org/raspbian buster/contrib armhf Packages [58.8 kB]                             
> Get:12 http://raspbian.raspberrypi.org/raspbian buster/non-free armhf Packages [104 kB]                             
> Get:10 http://archive.raspberrypi.org/debian buster/main armhf Packages [391 kB]                                             
> Get:10 http://archive.raspberrypi.org/debian buster/main armhf Packages [391 kB]                                             
> Fetched 13.2 MB in 1min 33s (142 kB/s)
> Reading package lists... Done
> N: Repository 'http://raspbian.raspberrypi.org/raspbian buster InRelease' changed its 'Suite' value from 'stable' to 'oldstable'
> N: Repository 'http://archive.raspberrypi.org/debian buster InRelease' changed its 'Suite' value from 'testing' to 'oldstable'
  1. Ran sudo apt-get install uno220config uno220rtc uno220gpio uno220uart. I got the following result:

pi@raspberrypi:/etc/apt $ sudo apt-get install uno220config uno220rtc uno220gpio uno220uart
Reading package lists… Done
Building dependency tree
Reading state information… Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
uno220rtc : PreDepends: raspberrypi-kernel (<= 1.20210108-1) but 1.20210430-1 is to be installed
E: Unable to correct problems, you have held broken packages.

This is the result I keep getting. As far as I can tell I am following your colleagues directions to the letter. What’s next???

Hello @danielf,
I have passed all your detailed info and results on to Advantech and am waiting for a response. As soon as we have any more information we will update this post.
Best Regards,
Scott Raeker

Hello @danielf,
Just got the below info from Advantech.

Sorry.
For RTC driver, please manually down it from this link.
0.1-5

The RTC driver on the apt source is an old version, we will correct it soon.

Please try again, and let us know how it works. Thanks!

Best Regards,
Scott Raeker

Okay i just updated the directions, i tested: 2021-05-07-raspios-buster-armhf-lite.zip

Do not install uno220rtc from apt… Instead just install

sudo apt-get install uno220config uno220gpio uno220uart

Then download install the latest version of uno22rtc_0.15_armhf.deb and install it with dpkg:

wget https://github.com/Advantech-IIoT/UNO-220-POE-/raw/docs/dpkg/uno220rtc_0.1-5_armhf.deb
sudo dpkg -i uno220rtc_0.1-5_armhf.deb 

Tested with the temp script:

pi@raspberrypi:~ $ ./rpi_uno220.py 
metric:id=RPiCPUtemp,n=Temperature,vd=36.0,u=C
metric:id=RPiCPUtemp,n=port0,vd=1.0,u=x

Regards,

Thanks for all the help, the raspberry pi with the uno-220 is up and running. I’m not sure if this question will belong here.
I’m trying to use node red to do the programming of the gpio and all the info we need. is there any tutorial in how to obtain the pin number, I2C address and Bus? I found this palette:

Will this palette be ideal to do the programming in node red or is there other way i can get inputs and outputs from the UNO-220?

Hello @danielf,
I have not used node red so cannot offer any insight into using it for programming the UNO-220. The only testing I have done is using Advantech’s examples in UNO-220-POE-/dpkg/TEST at docs · Advantech-IIoT/UNO-220-POE- · GitHub and the basic Python program in my original post.