Sedona for Raspberry Pi

616 views
Skip to first unread message

Chris McKinlay

unread,
Nov 23, 2016, 6:38:48 PM11/23/16
to Sedona Framework
Greetings Everyone:

Can someone let me know if there is a version of a more capable instance of Sedona for raspberry pi? It seems I have been using a demo version and as far as i can tell there are no SQL capabilities, and no way to update kits for it.
I am using a raspberry pi 2 B+ and I am also having trouble using the GPIO's. I've tried other strategies listed on this forum and haven't been successful yet. Please help.

Regards,

Chris

Andrey Skvortsov

unread,
Nov 24, 2016, 1:24:29 AM11/24/16
to sedo...@googlegroups.com
On 16-11-23 15:38, Chris McKinlay wrote:
> Greetings Everyone:
>
> Can someone let me know if there is a version of a more capable instance of
> Sedona for raspberry pi? It seems I have been using a demo version and as
> far as i can tell there are no SQL capabilities, and no way to update kits
> for it.
Why do think where is no way to update kits for it?

> I am using a raspberry pi 2 B+ and I am also having trouble using the
> GPIO's. I've tried other strategies listed on this forum and haven't been
> successful yet. Please help.
>
> Regards,
>
> Chris
>
> --
> You received this message because you are subscribed to the Google Groups "Sedona Framework" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sedonadev+...@googlegroups.com.
> To post to this group, send email to sedo...@googlegroups.com.
> Visit this group at https://groups.google.com/group/sedonadev.
> For more options, visit https://groups.google.com/d/optout.


--
Best regards,
Andrey Skvortsov
signature.asc

Chris McKinlay

unread,
Nov 24, 2016, 11:41:29 AM11/24/16
to Sedona Framework
I tried to update the kits in the open source editor you suggested. it seems to not have the ability to update kits even though it has a kit manager. I tried to directly upload .kit files to the RPI, but it wasn't accessible in the editor either. 
All I see is the kits from the rpiDigitalIo .kit file. 

Any suggestions?

Andrey Skvortsov

unread,
Nov 24, 2016, 12:54:03 PM11/24/16
to Sedona Framework
On 16-11-24 08:41, Chris McKinlay wrote:
> I tried to update the kits in the open source editor you suggested. it
> seems to not have the ability to update kits even though it has a kit
> manager. I tried to directly upload .kit files to the RPI, but it wasn't
> accessible in the editor either.
> All I see is the kits from the rpiDigitalIo .kit file.
>
> Any suggestions?

Do you mean SAE? It's not open source at all. If I'm wrong, please
point to the source code.


Really open source is Beremiz (www.beremiz.org) PLC editor and runtime. But
it does not work with Sedona.


I've not used SAE. So I can't help you here. But you can replace or
add kits by building them by yourself. All source code and build
instructions are available here.

http://www.sedonadev.org/doc/index.html


> On Thursday, November 24, 2016 at 1:24:29 AM UTC-5, Andrey Skvortsov wrote:
> >
> > On 16-11-23 15:38, Chris McKinlay wrote:
> > > Greetings Everyone:
> > >
> > > Can someone let me know if there is a version of a more capable instance
> > of
> > > Sedona for raspberry pi? It seems I have been using a demo version and
> > as
> > > far as i can tell there are no SQL capabilities, and no way to update
> > kits
> > > for it.
> > Why do think where is no way to update kits for it?
> >
> > > I am using a raspberry pi 2 B+ and I am also having trouble using the
> > > GPIO's. I've tried other strategies listed on this forum and haven't
> > been
> > > successful yet. Please help.
> > >
> > > Regards,
> > >
> > > Chris
> > >
> > > --
> > > You received this message because you are subscribed to the Google
> > Groups "Sedona Framework" group.
> > > To unsubscribe from this group and stop receiving emails from it, send
> > an email to sedonadev+...@googlegroups.com <javascript:>.
> > > To post to this group, send email to sedo...@googlegroups.com
> > <javascript:>.
signature.asc

kelsey morgan

unread,
Dec 5, 2016, 10:20:11 AM12/5/16
to Sedona Framework
The SVM for the RPI provided on the Sedona Dev website does not have the necessary files in the data folder to utilize the kit manager in SAE.  If you check the sedona-rpi/kits, it only has the rpiDigitalIo kit in there, this is not enough.  

Merge the Sedona 1.2.28 build with the Sedona RPI IO data folder. A message will pop notifying you of duplicate file names.  Copy and replace over the file names, and then add any of the kits that you would like to install, to the kit directory.

In the pictures attached, I added the CControls_HVAC and CControls_Math kits.

After the 2 directories are merged, connect to the PI, and open the kit manager.  Check the boxes of the kits that you would like to add.  If an error message appears, the data folder was most likely not constructed as needed.

Click apply, and wait for the magic to happen.
kitdirectory.PNG
RPIwithCControlsMathundHVAC.PNG

Chris McKinlay

unread,
Dec 8, 2016, 5:29:18 PM12/8/16
to Sedona Framework
Thanks! Worked like a charm. 

I am now having another issue. I am currently trying to modify the gpio port pins to match by modifying the sedonadev/src/rpiDigitalIo/
native/rpiDigitalIo_Dio.c file as described in the link below.


After modifying the file as per the process found in the link. I tried to compile based on the instructions shown in the link below.


As soon as I got to the point where I attempted to run the python file makeunixdev.py I got the message below.

Traceback (most recent call last):
  File "makeunixdev.py", line 15, in <module>
    import env
ImportError: No module named env

Can  you please help?

Andrey Skvortsov

unread,
Dec 11, 2016, 3:20:46 PM12/11/16
to sedo...@googlegroups.com
On 16-12-08 14:29, Chris McKinlay wrote:
> Thanks! Worked like a charm.
>
> I am now having another issue. I am currently trying to modify the gpio
> port pins to match by modifying the sedonadev/src/rpiDigitalIo/
> native/rpiDigitalIo_Dio.c file as described in the link below.
>
> https://groups.google.com/forum/#!searchin/sedonadev/rpi%7Csort:relevance/sedonadev/iRDOOFx-mwg/RF5mmZduHwAJ
>
> After modifying the file as per the process found in the link. I tried to
> compile based on the instructions shown in the link below.
>
> http://www.shawnjacobson.com/2013/beaglebone-and-sedona
>
> As soon as I got to the point where I attempted to run the python file makeunixdev.py
> I got the message below.
>
> Traceback (most recent call last):
> File "makeunixdev.py", line 15, in <module>
> import env
> ImportError: No module named env
>
> Can you please help?

Hi Chris,

makeunixdev.py tries to find env.py in $sedona_home/adm, but because
PYTHONPATH environment variable isn't set correctly, then it fails.

It looks like you have not setup your environment correctly.
This is handled by shell script unix/init.sh. Run it from $sedona_home/adm/unix directory.

Like here:

$ cd adm/unix
$ . ./init.sh
$ python makeunixvm.py
signature.asc

Chris McKinlay

unread,
Dec 15, 2016, 2:41:12 PM12/15/16
to Sedona Framework
Thanks that helped. makeunixvm.py compiles now. However I am having another issue. When it compiles I receive prompts shown below. 
  
root@raspberrypi:~/sedonadev/adm# python makeunixvm.py
  Removing "/root/sedonadev/temp/generic-unix"
  Removing "/root/sedonadev/temp/generic-unix/.par"
  Removing "/root/sedonadev/temp/generic-unix/.par/out"
  Removing "/root/sedonadev/temp/generic-unix/.par/svm"
  InitStagePlatform [generic-unix.xml]
  ReadKits [4 kits]
  StageVM [/root/sedonadev/temp/generic-unix]
  GenNativeTable [/root/sedonadev/temp/generic-unix/nativetable.c]
  StagePlatform
*** Success! ***
gcc -D__UNIX__=1 -DSOCKET_FAMILY_INET=1 -DPLAT_BUILD_VERSION=\"1.2.28\" /root/sedonadev/temp/generic-unix/*.c -O2 -o /root/sedonadev/bin/svm
  Success [/root/sedonadev/bin/svm]
Creating folder /root/sedonadev/temp/generic-unix/.par/out
/bin/sh: 1: /usr/lib/jvm/bin/java: not found

When attempting to run bin/svm --plat & after it fully compiles I receive the message below:


Running SVM in Platform Mode
-- MESSAGE [sys::App] starting
-- MESSAGE [sox::SoxService] started port=1876
-- MESSAGE [sox::SoxService] DASP Discovery enabled
-- MESSAGE [web::WebService] started port=8080
-- MESSAGE [sys::App] running
ERROR: missing  native method 4::0
Cannot run VM (12)

Please help.

Thanks

Nicholas Wingle

unread,
Dec 19, 2016, 7:36:25 AM12/19/16
to Sedona Framework
Chris,

Looks like you are having a issue with it finding java.

"/bin/sh: 1: /usr/lib/jvm/bin/java: not found"

What happens when you do "sedonac -ver"

Nick

Andrey Skvortsov

unread,
Dec 20, 2016, 2:05:14 AM12/20/16
to sedo...@googlegroups.com
On 16-12-15 11:41, Chris McKinlay wrote:
> Thanks that helped. makeunixvm.py compiles now. However I am having another
> issue. When it compiles I receive prompts shown below.
>
> root@raspberrypi:~/sedonadev/adm# python makeunixvm.py
> Removing "/root/sedonadev/temp/generic-unix"
> Removing "/root/sedonadev/temp/generic-unix/.par"
> Removing "/root/sedonadev/temp/generic-unix/.par/out"
> Removing "/root/sedonadev/temp/generic-unix/.par/svm"
> InitStagePlatform [generic-unix.xml]
> ReadKits [4 kits]
> StageVM [/root/sedonadev/temp/generic-unix]
> GenNativeTable [/root/sedonadev/temp/generic-unix/nativetable.c]
> StagePlatform
> *** Success! ***
> gcc -D__UNIX__=1 -DSOCKET_FAMILY_INET=1 -DPLAT_BUILD_VERSION=\"1.2.28\"
> /root/sedonadev/temp/generic-unix/*.c -O2 -o /root/sedonadev/bin/svm
> Success [/root/sedonadev/bin/svm]
> Creating folder /root/sedonadev/temp/generic-unix/.par/out
> /bin/sh: 1: /usr/lib/jvm/bin/java: not found

Chris, just for your information. Your build wasn't fully successful.
You've not built sedona kits because of missing java.
You can try to use java from OpenJDK
that should be available from raspbian repo or install Oracle's
version of java.


> When attempting to run bin/svm --plat & after it fully compiles I receive
> the message below:
>
>
> Running SVM in Platform Mode
> -- MESSAGE [sys::App] starting
> -- MESSAGE [sox::SoxService] started port=1876
> -- MESSAGE [sox::SoxService] DASP Discovery enabled
> -- MESSAGE [web::WebService] started port=8080
> -- MESSAGE [sys::App] running
> ERROR: missing native method 4::0
> Cannot run VM (12)
This message means that your sedona application tries to access native
method 4::0, but your compiled svm doesn't have such method.

You can read more about native methods (and how sedona works in
general) here:
http://www.sedonadev.org/doc/nativeMethods.html


Method 4::0 apparently comes from rpiDigitalIo kit. If you open
rpiDigitalIo/kit.xml, you'll see declaration for native methods in
this kit. Implementation of these methods are in rpiDigitalIo/native
directory.


To compile into svm support of certain native methods, you has to
define in platform definition XML file where C source files for these methods are.

For details look at
http://www.sedonadev.org/doc/platTutorial.html
signature.asc

John Potpolak

unread,
Jan 17, 2017, 2:20:14 PM1/17/17
to sedo...@googlegroups.com
Has anyone used Sedona to access io via a SPI or i2c bus ?

> To unsubscribe from this group and stop receiving emails from it, send an email to sedonadev+unsubscribe@googlegroups.com.

> To post to this group, send email to sedo...@googlegroups.com.
> Visit this group at https://groups.google.com/group/sedonadev.
> For more options, visit https://groups.google.com/d/optout.


--
Best regards,
Andrey Skvortsov

--
You received this message because you are subscribed to the Google Groups "Sedona Framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sedonadev+unsubscribe@googlegroups.com.

Chris McKinlay

unread,
Apr 13, 2017, 1:01:15 PM4/13/17
to Sedona Framework
Greetings again:

I have taken a bit of break from this project and I am trying to understand the premise behind what my issue is.

I have followed the steps above and ended up with the same result. I believe the native methods are included correctly however, I am confused at how to implement the SVM and Sedona Framework without fault or error.

When I followed the steps to recompille SVM with makeunixvm.py I received a 4::2 error. Where 4::1 and 4::2 involve read and write properties.

I currently having it working on RPI 1, so am I incorrect to say that all I need to do is change the rpiDigitalIO_Dio.c file so that it corresponds with the RPI 3 GPIO?

If you could give me an example of what the modified file looks like that would be great. I think this may be my primary issue from my research. Please correct me if I am wrong.

Regards,

Chris

Andrey Skvortsov

unread,
Apr 13, 2017, 2:42:15 PM4/13/17
to sedo...@googlegroups.com
On 17-04-13 10:01, Chris McKinlay wrote:
> Greetings again:
>
> I have taken a bit of break from this project and I am trying to understand
> the premise behind what my issue is.
>
> I have followed the steps above and ended up with the same result. I
> believe the native methods are included correctly however, I am confused at
> how to implement the SVM and Sedona Framework without fault or error.
>
> When I followed the steps to recompille SVM with makeunixvm.py I received a
> 4::2 error. Where 4::1 and 4::2 involve read and write properties.

These errors probably happen at run stage, not during SVM compilation.


> > > -- MESSAGE [sys::App] running
> > > ERROR: missing native method 4::0
> > > Cannot run VM (12)
> > This message means that your sedona application tries to access native

Is your error the same as you previously had?
signature.asc
Message has been deleted

Chris McKinlay

unread,
Apr 16, 2017, 5:10:50 AM4/16/17
to Sedona Framework
Hello again:


I recompiled the svm. I ran the svm and ran into the same error as before. I also experienced a new error after trying to troubleshoot the rpiDigitalIo_Dio.c file (4::2)so that the number of RPI 3 gpio pins were applied and the addressing matched.

From my understanding what 4::2 is explained under i believe src/rpiDigitalIo/kit.xml as it is a read or write native method which is applied in the rpiDigitalIo_Dio.c file.

If you can help me discover how to correctly implement this c file that would be helpful because that may be perhaps the issue. Then the second part may be a compile issue however compiling seems to happen successfully with no problems except for when I get an error when I run bin/svm --platform & and get the 4::2 message.

I could use some advice on which files to run as I changed from jykes to Javac in my init.sh file. I tried to run makeunixdev.py afterward and ran into errors. It seemed to mess everything up.

I look forward to hearing from you.

Regards

Chris

Chris McKinlay

unread,
Apr 21, 2017, 4:44:01 PM4/21/17
to Sedona Framework
Hi Again:

I have fixed the 4::2 error. Long explanation related to some file structure issues. I have SVM running on SAE again. I move the DO from the rpiDigitalIo kit into the programming environment and it loads successfully. When I move the DI into the environment the SVM crashes and I get this error:


Running SVM in Platform Mode
-- MESSAGE [sys::App] starting
-- MESSAGE [sox::SoxService] started port=1876
-- MESSAGE [sox::SoxService] DASP Discovery enabled
-- MESSAGE [web::WebService] started port=8080
-- MESSAGE [sys::App] running
ERROR: missing  native method 4::0
Cannot run VM (12)

I am back to this square and could use some leads on this topic on how to fix it.

Thanks,

Chris

Andrey Skvortsov

unread,
Apr 21, 2017, 5:01:48 PM4/21/17
to sedo...@googlegroups.com
Hi Chris,

On 17-04-21 13:44, Chris McKinlay wrote:
> Hi Again:
>
> I have fixed the 4::2 error. Long explanation related to some file
> structure issues. I have SVM running on SAE again. I move the DO from the
> rpiDigitalIo kit into the programming environment and it loads
> successfully. When I move the DI into the environment the SVM crashes and I
> get this error:
>
> Running SVM in Platform Mode
> -- MESSAGE [sys::App] starting
> -- MESSAGE [sox::SoxService] started port=1876
> -- MESSAGE [sox::SoxService] DASP Discovery enabled
> -- MESSAGE [web::WebService] started port=8080
> -- MESSAGE [sys::App] running
> ERROR: missing native method 4::0
> Cannot run VM (12)
>
> I am back to this square and could use some leads on this topic on how to
> fix it.
>
> Thanks,

tThe problem is that you build SVM without needed by rpiDigitalIo kit
native functions. See rpiDigitalIo/native directory. This C file
should be compiled into SVM to make rpiDigitalIo work.

How the build system knows what native kits should be supported and
where the native source code is?
All native kits and source code for native should be listed in
platform manifest. It's used by build system.
For example, see here.
http://hg.sedonadev.org/repos/sedona-1.2/file/007b9be5f1e1/platforms/src/generic/unix/generic-unix.xml

Read more about native code here:
http://www.sedonadev.org/doc/platDef.html
http://www.sedonadev.org/doc/nativeMethods.html

I assume that you've build generic-unix platform. So you have to
modify generic-unix.xml to include references to rpiDigitalIo and
rebuild SVM.


Happy hacking.


> Chris
>
> On Sunday, 16 April 2017 05:10:50 UTC-4, Chris McKinlay wrote:
> >
> > Hello again:
> >
> >
> > I recompiled the svm. I ran the svm and ran into the same error as before.
> > I also experienced a new error after trying to troubleshoot the
> > rpiDigitalIo_Dio.c file (4::2)so that the number of RPI 3 gpio pins were
> > applied and the addressing matched.
> >
> > From my understanding what 4::2 is explained under i believe
> > src/rpiDigitalIo/kit.xml as it is a read or write native method which is
> > applied in the rpiDigitalIo_Dio.c file.
> >
> > If you can help me discover how to correctly implement this c file that
> > would be helpful because that may be perhaps the issue. Then the second
> > part may be a compile issue however compiling seems to happen successfully
> > with no problems except for when I get an error when I run bin/svm
> > --platform & and get the 4::2 message.
> >
> > I could use some advice on which files to run as I changed from jykes to
> > Javac in my init.sh file. I tried to run makeunixdev.py afterward and ran
> > into errors. It seemed to mess everything up.
> >
> > I look forward to hearing from you.
> >
> > Regards
> >
> > Chris
> >
> >
>
signature.asc

Chris McKinlay

unread,
Apr 24, 2017, 4:18:33 PM4/24/17
to Sedona Framework
It Works!

Andrey Skvortsov

unread,
Apr 24, 2017, 4:23:13 PM4/24/17
to sedo...@googlegroups.com
On 17-04-24 13:18, Chris McKinlay wrote:
> It Works!

Congratulations.
> > an email to sedonadev+...@googlegroups.com <javascript:>.
> > > To post to this group, send email to sedo...@googlegroups.com
> > <javascript:>.
signature.asc
Reply all
Reply to author
Forward
0 new messages