Re: [Machinekit] GUI Geared towards Embedded Platforms

2018-09-24 Thread Travis Gillin

Anyone who is interested in this project, here is a link to a video up the 
UI making some cuts https://youtu.be/qyyjcHG_G4M

On Monday, September 24, 2018 at 1:41:45 PM UTC-4, Travis Gillin wrote:
>
> Hi Chris,
>
> This is not a special version of Machinekit. This is merely a GUI like 
> Axis, Touchy, Gmoccappy, etc. None of the currently available UI can run 
> without X to my knowledge except for some Text based UI's. This makes 
> running machinekit and controlling it on RPi or Beagle Bone without a 
> remote display tough. Until now, as far as I know, it is most popular to 
> run machinekit on embedded hardware as you explained via an 
> HTTP server/client setup which requires another device for the display. You 
> can run axis. gmoccapy, etc from inside X (even over the network via ssh) 
> but it is awfully slow and very impractical for commercial applications. My 
> goal is to solve this issue, we want to use the onboard video 
> capabilities of an embedded platform as the display interface by making the 
> best use as possible of the hardware it has. By cutting X out of the way, 
> we get rid of a whole lot of bloat and have direct control over how we 
> render to the display.
>
>
> On Monday, September 24, 2018 at 1:23:28 PM UTC-4, Chris Albertson wrote:
>>
>> One question about a GUI that draws to the frame buffer:   How do you 
>> share the screen with other software?  Here is a scenario.   You boot the 
>> machine and I guess you get to the command like X11 is not started,  Next 
>> you run the special version of MK that has the buffer writing GUI and you 
>> see the program start and then write to the screen.But now you want to 
>> copy a G-Code file over the network.  How do you start a terminal window?   
>> I assume you'd need a second computer or an iPad and login in via ssh.
>>
>> I've had the same problem, you have a tiny micro controller, smaller even 
>> then a Raspberry Pi and you want to put up a display but the computer lacks 
>> hardware.   In those casesI like to use HTTP.  Basically  I build a tiny 
>> micro-size web server in to the device.Most WiFi routers do this and 
>> many ink jet or laser printers too.  The user sets them up using a web 
>> browser.  
>>
>> On Sat, Sep 22, 2018 at 11:10 PM schoo...@gmail.com  
>> wrote:
>>
>>> HI Travis,
>>>
>>> I will be interested to have a look at this later.
>>>
>>> The includes you want should be in the flavor package
>>>
>>>
>>> https://github.com/machinekit/machinekit/blob/master/debian/machinekit-rt-preempt.install.in#L4
>>>
>>> We don't have a -dev package and each kernel has a specific sub package 
>>> which also contains the includes etc.
>>>
>>> I suspect you may have just installed machinekit, whereas you need 'apt 
>>> install machinekit machinekit rt-preempt' for instance.
>>>
>>> I will check the package contents later, but see no reason why those 
>>> would be missing.
>>>
>>> regards
>>>
>>> On 9/22/2018 8:07 PM, Travis Gillin wrote:
>>>
>>> I'm working on a GUI that's meant for embedded applications with fairly 
>>> low resources. It's C and C++ based and runs entirely without X, deals 
>>> directly with the framebuffer and evdev for mouse & keyboard. (Touchscreen 
>>> also supported)
>>>
>>> I have a post here about it 
>>> https://forum.linuxcnc.org/41-guis/35225-new-gui-for-embedded-systems. 
>>> I posted here to figure out how to talk to LinuxCNC via C (libNML) and this 
>>> has all been figured out most part. My trouble now is when I try to build 
>>> against machinekit, there is no /usr/include/linuxcnc. (or 
>>> /usr/include/machinekit either) Specifically I need "" & 
>>> "" equivalents for MachineKit. I know this project was 
>>> forked a while ago but I believe the NML interface is the same.  Could 
>>> someone here point me in the right direction?
>>>
>>> Right now the GUI runs on LinuxCNC on a regular Intel-based PC just fine 
>>> and the only hang-up in migrating to our ARM platform is this little 
>>> difference between LinuxCNC and Machinekit. 
>>>
>>> I think this GUI will be a great addition to this project because it 
>>> will allow people to use HDMI or virtually any type of display from Beagle 
>>> Bone, Rasp Pi, or other embedded devices that Machinekit has been ported 
>>> too and not have the "click and wait" lag.
>>>
>>> Thanks,
>>> Travis
>>> -- 
>>> website: http://www.machinekit.io blog: http://blog.machinekit.io 
>>> github: https://github.com/machinekit
>>> --- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "Machinekit" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to machinekit+...@googlegroups.com.
>>> Visit this group at https://groups.google.com/group/machinekit.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>>
>>> -- 
>>> website: http://www.machinekit.io blog: http://blog.machinekit.io 
>>> github: https://github.com/machinekit
>>> --- 
>>> You received this message 

Re: [Machinekit] GUI Geared towards Embedded Platforms

2018-09-24 Thread Travis Gillin
Hi Chris,

This is not a special version of Machinekit. This is merely a GUI like 
Axis, Touchy, Gmoccappy, etc. None of the currently available UI can run 
without X to my knowledge except for some Text based UI's. This makes 
running machinekit and controlling it on RPi or Beagle Bone without a 
remote display tough. Until now, as far as I know, it is most popular to 
run machinekit on embedded hardware as you explained via an 
HTTP server/client setup which requires another device for the display. You 
can run axis. gmoccapy, etc from inside X (even over the network via ssh) 
but it is awfully slow and very impractical for commercial applications. My 
goal is to solve this issue, we want to use the onboard video 
capabilities of an embedded platform as the display interface by making the 
best use as possible of the hardware it has. By cutting X out of the way, 
we get rid of a whole lot of bloat and have direct control over how we 
render to the display.


On Monday, September 24, 2018 at 1:23:28 PM UTC-4, Chris Albertson wrote:
>
> One question about a GUI that draws to the frame buffer:   How do you 
> share the screen with other software?  Here is a scenario.   You boot the 
> machine and I guess you get to the command like X11 is not started,  Next 
> you run the special version of MK that has the buffer writing GUI and you 
> see the program start and then write to the screen.But now you want to 
> copy a G-Code file over the network.  How do you start a terminal window?   
> I assume you'd need a second computer or an iPad and login in via ssh.
>
> I've had the same problem, you have a tiny micro controller, smaller even 
> then a Raspberry Pi and you want to put up a display but the computer lacks 
> hardware.   In those casesI like to use HTTP.  Basically  I build a tiny 
> micro-size web server in to the device.Most WiFi routers do this and 
> many ink jet or laser printers too.  The user sets them up using a web 
> browser.  
>
> On Sat, Sep 22, 2018 at 11:10 PM schoo...@gmail.com  <
> schoo...@gmail.com > wrote:
>
>> HI Travis,
>>
>> I will be interested to have a look at this later.
>>
>> The includes you want should be in the flavor package
>>
>>
>> https://github.com/machinekit/machinekit/blob/master/debian/machinekit-rt-preempt.install.in#L4
>>
>> We don't have a -dev package and each kernel has a specific sub package 
>> which also contains the includes etc.
>>
>> I suspect you may have just installed machinekit, whereas you need 'apt 
>> install machinekit machinekit rt-preempt' for instance.
>>
>> I will check the package contents later, but see no reason why those 
>> would be missing.
>>
>> regards
>>
>> On 9/22/2018 8:07 PM, Travis Gillin wrote:
>>
>> I'm working on a GUI that's meant for embedded applications with fairly 
>> low resources. It's C and C++ based and runs entirely without X, deals 
>> directly with the framebuffer and evdev for mouse & keyboard. (Touchscreen 
>> also supported)
>>
>> I have a post here about it 
>> https://forum.linuxcnc.org/41-guis/35225-new-gui-for-embedded-systems. I 
>> posted here to figure out how to talk to LinuxCNC via C (libNML) and this 
>> has all been figured out most part. My trouble now is when I try to build 
>> against machinekit, there is no /usr/include/linuxcnc. (or 
>> /usr/include/machinekit either) Specifically I need "" & 
>> "" equivalents for MachineKit. I know this project was 
>> forked a while ago but I believe the NML interface is the same.  Could 
>> someone here point me in the right direction?
>>
>> Right now the GUI runs on LinuxCNC on a regular Intel-based PC just fine 
>> and the only hang-up in migrating to our ARM platform is this little 
>> difference between LinuxCNC and Machinekit. 
>>
>> I think this GUI will be a great addition to this project because it will 
>> allow people to use HDMI or virtually any type of display from Beagle Bone, 
>> Rasp Pi, or other embedded devices that Machinekit has been ported too and 
>> not have the "click and wait" lag.
>>
>> Thanks,
>> Travis
>> -- 
>> website: http://www.machinekit.io blog: http://blog.machinekit.io 
>> github: https://github.com/machinekit
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "Machinekit" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to machinekit+...@googlegroups.com .
>> Visit this group at https://groups.google.com/group/machinekit.
>> For more options, visit https://groups.google.com/d/optout.
>>
>>
>> -- 
>> website: http://www.machinekit.io blog: http://blog.machinekit.io 
>> github: https://github.com/machinekit
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "Machinekit" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to machinekit+...@googlegroups.com .
>> Visit this group at https://groups.google.com/group/machinekit.
>> For more options, visit 

Re: [Machinekit] GUI Geared towards Embedded Platforms

2018-09-24 Thread Chris Albertson
One question about a GUI that draws to the frame buffer:   How do you share
the screen with other software?  Here is a scenario.   You boot the machine
and I guess you get to the command like X11 is not started,  Next you run
the special version of MK that has the buffer writing GUI and you see the
program start and then write to the screen.But now you want to copy a
G-Code file over the network.  How do you start a terminal window?   I
assume you'd need a second computer or an iPad and login in via ssh.

I've had the same problem, you have a tiny micro controller, smaller even
then a Raspberry Pi and you want to put up a display but the computer lacks
hardware.   In those casesI like to use HTTP.  Basically  I build a tiny
micro-size web server in to the device.Most WiFi routers do this and
many ink jet or laser printers too.  The user sets them up using a web
browser.

On Sat, Sep 22, 2018 at 11:10 PM schoone...@gmail.com 
wrote:

> HI Travis,
>
> I will be interested to have a look at this later.
>
> The includes you want should be in the flavor package
>
>
> https://github.com/machinekit/machinekit/blob/master/debian/machinekit-rt-preempt.install.in#L4
>
> We don't have a -dev package and each kernel has a specific sub package
> which also contains the includes etc.
>
> I suspect you may have just installed machinekit, whereas you need 'apt
> install machinekit machinekit rt-preempt' for instance.
>
> I will check the package contents later, but see no reason why those would
> be missing.
>
> regards
>
> On 9/22/2018 8:07 PM, Travis Gillin wrote:
>
> I'm working on a GUI that's meant for embedded applications with fairly
> low resources. It's C and C++ based and runs entirely without X, deals
> directly with the framebuffer and evdev for mouse & keyboard. (Touchscreen
> also supported)
>
> I have a post here about it
> https://forum.linuxcnc.org/41-guis/35225-new-gui-for-embedded-systems. I
> posted here to figure out how to talk to LinuxCNC via C (libNML) and this
> has all been figured out most part. My trouble now is when I try to build
> against machinekit, there is no /usr/include/linuxcnc. (or
> /usr/include/machinekit either) Specifically I need "" &
> "" equivalents for MachineKit. I know this project was
> forked a while ago but I believe the NML interface is the same.  Could
> someone here point me in the right direction?
>
> Right now the GUI runs on LinuxCNC on a regular Intel-based PC just fine
> and the only hang-up in migrating to our ARM platform is this little
> difference between LinuxCNC and Machinekit.
>
> I think this GUI will be a great addition to this project because it will
> allow people to use HDMI or virtually any type of display from Beagle Bone,
> Rasp Pi, or other embedded devices that Machinekit has been ported too and
> not have the "click and wait" lag.
>
> Thanks,
> Travis
> --
> website: http://www.machinekit.io blog: http://blog.machinekit.io github:
> https://github.com/machinekit
> ---
> You received this message because you are subscribed to the Google Groups
> "Machinekit" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to machinekit+unsubscr...@googlegroups.com.
> Visit this group at https://groups.google.com/group/machinekit.
> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> website: http://www.machinekit.io blog: http://blog.machinekit.io github:
> https://github.com/machinekit
> ---
> You received this message because you are subscribed to the Google Groups
> "Machinekit" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to machinekit+unsubscr...@googlegroups.com.
> Visit this group at https://groups.google.com/group/machinekit.
> For more options, visit https://groups.google.com/d/optout.
>


-- 

Chris Albertson
Redondo Beach, California

-- 
website: http://www.machinekit.io blog: http://blog.machinekit.io github: 
https://github.com/machinekit
--- 
You received this message because you are subscribed to the Google Groups 
"Machinekit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to machinekit+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/machinekit.
For more options, visit https://groups.google.com/d/optout.


Re: [Machinekit] GUI Geared towards Embedded Platforms

2018-09-24 Thread Travis Gillin

Hey Schooner,

I bet you are right, I was using a pre-build Beagle Bone Black image of and 
the headers were missing there. I'll install the other packages and I bet 
that will clear things up so when I get a chance to give that a shot I'll 
let you know if that solved the problem.

I can add you to the repository, It will be public once it's stable and 
there at least some type of documentation for getting it up and running

Thanks,
Travis

On Sunday, September 23, 2018 at 5:53:15 AM UTC-4, Schooner wrote:
>
> Had a look at the forum thread in linuxcnc, sounds interesting.
>
> There is obviously a github repo somewhere you have shared with Michel 
> Wijnja
>
> If you would like to do the same, I will be happy to test build.
>
>
> On 23/09/18 07:11, schoo...@gmail.com  wrote:
>
> HI Travis,
>
> I will be interested to have a look at this later.
>
> The includes you want should be in the flavor package
>
>
> https://github.com/machinekit/machinekit/blob/master/debian/machinekit-rt-preempt.install.in#L4
>
> We don't have a -dev package and each kernel has a specific sub package 
> which also contains the includes etc.
>
> I suspect you may have just installed machinekit, whereas you need 'apt 
> install machinekit machinekit rt-preempt' for instance.
>
> I will check the package contents later, but see no reason why those would 
> be missing.
>
> regards
>
> On 9/22/2018 8:07 PM, Travis Gillin wrote:
>
> I'm working on a GUI that's meant for embedded applications with fairly 
> low resources. It's C and C++ based and runs entirely without X, deals 
> directly with the framebuffer and evdev for mouse & keyboard. (Touchscreen 
> also supported)
>
> I have a post here about it 
> https://forum.linuxcnc.org/41-guis/35225-new-gui-for-embedded-systems. I 
> posted here to figure out how to talk to LinuxCNC via C (libNML) and this 
> has all been figured out most part. My trouble now is when I try to build 
> against machinekit, there is no /usr/include/linuxcnc. (or 
> /usr/include/machinekit either) Specifically I need "" & 
> "" equivalents for MachineKit. I know this project was 
> forked a while ago but I believe the NML interface is the same.  Could 
> someone here point me in the right direction?
>
> Right now the GUI runs on LinuxCNC on a regular Intel-based PC just fine 
> and the only hang-up in migrating to our ARM platform is this little 
> difference between LinuxCNC and Machinekit. 
>
> I think this GUI will be a great addition to this project because it will 
> allow people to use HDMI or virtually any type of display from Beagle Bone, 
> Rasp Pi, or other embedded devices that Machinekit has been ported too and 
> not have the "click and wait" lag.
>
> Thanks,
> Travis
> -- 
> website: http://www.machinekit.io blog: http://blog.machinekit.io github: 
> https://github.com/machinekit
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Machinekit" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to machinekit+...@googlegroups.com .
> Visit this group at https://groups.google.com/group/machinekit.
> For more options, visit https://groups.google.com/d/optout.
>
>
>
>

-- 
website: http://www.machinekit.io blog: http://blog.machinekit.io github: 
https://github.com/machinekit
--- 
You received this message because you are subscribed to the Google Groups 
"Machinekit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to machinekit+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/machinekit.
For more options, visit https://groups.google.com/d/optout.


Re: [Machinekit] using hal_spi module

2018-09-24 Thread schoone...@gmail.com

  
  
Well, despite what /proc/cpuinfo says, I don't see how it can be a
BCM2835 Soc.

The elinux hardware history (https://elinux.org/RPi_HardwareHistory)
clearly shows the v3 B has a BCM2037 and even if you
were sold an almost identical v2 B purporting to be a v3 B, it would
have a BCM2036.

Looks like it is testing CS (chip select) to see if it is in an
active state and waiting until it is?
Hence my question about whether SPI was activated.
The most likely sources of the problem are either that SPI is
inactive or 
that whatever address *spi points to it does not contain what is
expected so the & test will never result as expected.

This in turn makes one suspicious about what will happen when the
driver is attached to a thread and started.
Will it work?

It might be useful to try to get the hal_gpio demo running on the
board with DEBUG set and look at the output.

Regards the args, that is peculiar.  Just ignore the print out.
Look at hal_gpio.c for an example of how RTAPI_MP_STRING should
appear, and then you can see them being used in the later code.
If there is any initialisation to be done it would normally be in
rtapi_app_main()

You need to find someone who is up on bit twiddling on the v3 B and
check all the addresses and offsets with them.
(Particularly the SPI_BASE offset, which may or may not vary between
models of Soc)


On 23/09/18 20:35, mngr wrote:


  
I am really sorry Schooner, I was excited about the
  findings...
I actually don't know which args suits my setup, I looked
  in the source, but I don't know how to find where they are
  used,
I tried to scroll it all, but found no place that seems to
  use them.

My board is a Raspberry Pi 3 model B  V 1.2 and attached
  you can find the cpuinfo output

Spi is enabled from raspi-config, and in /dev there is
  spidev0.0 and spidev0.1


Il giorno domenica 23 settembre 2018 19:35:25 UTC+2, Schooner ha
scritto:

   OK, good there is some
progress.

You will probably find that whilst loaded, it may not work.

That while statement is actually 
while(!( *(spi + 0) & 0x0001)
which is extremely specific and if something has changed or
if SPI is not enabled, it will hang forever.

(gripe here, I have asked you 3 specific questions and you
have not answered any of them)


On 23/09/18 18:01, mngr wrote:


  
Thanks for the explanation about machinkit
  workings,


I played with the stamps and found that it was
  blocking on
while (!(BCM2835_SPICS &
  SPI_CS_DONE)); (Line 438)


removing it halrun loads, now I will see if and
  what it writes. maybe I will have to control the low
  level implementation... but now I know more things.


One more question, how does a hal module read the
  args? 




Il giorno domenica 23 settembre 2018 17:47:44 UTC+2,
Schooner ha scritto:

   Sep 23 15:03:17
realtimepi rtapi:0: 4:rtapi_app:701:user hal_spi.so
default iparms: ''
Sep 23 15:03:17 realtimepi rtapi:0:
1:rtapi_app:701:user : hal_spi initerr
Sep 23 15:03:17 realtimepi rtapi:0:
4:rtapi_app:701:user : hal_spi initdbg
Sep 23 15:03:17 realtimepi rtapi:0:
4:rtapi_app:701:user halg_xinitfv:90 HAL:
initializing component 'hal_spi' type=1 arg1=0
arg2=0/0x0

Since you haven't said where these extra prints are
located, their presence means nothing to me
  


   The module is
obviously loading to a point but it does not look as
though the driver is getting any further than
hal_init, which calls halg_xinitfv()
then is failing catastrophically

You are loading with no args, are the defaults
suitable for your board / setup?
Not that it looks that it gets that far, due the