Help needed for Python-SMBus and I2C-tools

edited March 19 in Projects

Hi Emteria-Team and everybody else,

firstly I'll introduce what's planned with Emteria.OS.
I want to integrate a Raspberry based headunit running Emteria in my car, therefor I do evaluate your OS since a Month. The most things I need to run are working very well. Now there is the ultimate Showstopper. I bought a UPS from the german Company Olmatic called S.USV advanced. It's designed to work perfectly with the Raspberry but to control and configure the behavior of the unit (its also a VRM, so it regulates the 12V Boardvoltage down to whats needed on the Pi and HATS and RTC is integrated too) there is the installation of the two tools necessary. On their manual they point out howto do it on raspbian. Is there a way to get these packages into and upto running on Emteria?

I'm looking forward to hearing from you with a positiv feedback ;-)
If this works I'm going to buy a business license.

Tagged:

Comments

  • I2C tools is already included into emteria.OS. There are also packages for Android, but I never installed it myself. Maybe something like Termux will help you.

  • Hi kalkov, this is exactly what i did yesterday. xD But I didnt find Python-SMBus in the Pkg installer search.> @kalkov said:

    I2C tools is already included into emteria.OS. There are also packages for Android, but I never installed it myself. Maybe something like Termux will help you.

    Hi kalkov,

    thank you for your fast response. How can I use I2C tools within emteria? Is it only possible via SSH? Because Termux said command not found when I type i2cdetect -y -1. I also have to install the client on the OS, but i think it isnt possible with Termux causing forbidden writing permissions.

    Best regards, Kevin.

  • Well, obviously I can't provide you a tutorial for using termux - feel free to search the Internet. I2C should work with any shell (if it was initialized properly) like SSH, ADB, UART console or others:

    rpi3:/ $ i2cdetect -y 1
         0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
    00:          -- -- -- -- -- -- -- -- -- -- -- -- --
    10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    70: -- -- -- -- -- -- -- --
    rpi3:/ $
    
  • @kalkov said:
    Well, obviously I can't provide you a tutorial for using termux - feel free to search the Internet. I2C should work with any shell (if it was initialized properly) like SSH, ADB, UART console or others:

    rpi3:/ $ i2cdetect -y 1
         0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
    00:          -- -- -- -- -- -- -- -- -- -- -- -- --
    10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    70: -- -- -- -- -- -- -- --
    rpi3:/ $
    

    Hi Kalkov,

    many thanks. Wasn't meant in this way (tutorial). Asked only for the permissions to write in Emteria. I'll give it a try and report my results in the next days. Thank you again for your quick response :smiley:

  • Hi Kalkov,

    hope you're doing good.

    After i tried some commands in the ssh client, only things like "ls", "cd" and "chmod" seem to be followed. Is there a list or command for a list wich shell commands are working on Emteria?

    Anyway Termux seems to be won't install the deamon of the ups because of design differences to a normal linux. I'll have a look an the add-On AnLinux and will report.

    Is there the possibility that you or one of you could integrate the ups deamon in the Linux-subsystem or is it impossibible due to the design of Emteria.OS?

    Best regards, Kevin.

  • Android uses toybox for shell (http://landley.net/toybox/about.html).
    What is UPS deamon? You can cross-compile your software and run it in Android as usual.

  • the ups deamon is the client software (systemd pkg) for the uninterrupted power suply HAT from this Olmatic company. It seems to be written in python, think thats why the requirement ist the python-smbus pkg and the i2c-tools pkg is just for checking the adress and if the eeprom is read correctly. It controls the the HAT and with this client it is possible to power of the raspi completly if extern power fails (with file safe shutdown on battery) or time based start/shutdown and also writes the correct time from the RTC at the boot back to the OS. Tried it out on raspbian. I'll have a look on Toybox and cross-comiling.

    Thanks again.

Sign In or Register to comment.