UART / console redirection - page 3 - General Discussion and Assistance - CHDK Forum supplierdeeply

UART / console redirection

  • 37 Replies
  • 23755 Views
*

Offline srsa_4c

  • ******
  • 4451
Re: UART / console redirection
« Reply #20 on: 26 / December / 2013, 11:01:07 »
Advertisements
Patch for finsig_dryos: it finds every address currently required by this hack.

*

Offline ahull

  • *****
  • 634
Re: UART / console redirection
« Reply #21 on: 14 / January / 2014, 11:29:51 »
I might get a chance to play with this again tomorrow, anything new I should be aware of?


*

Offline srsa_4c

  • ******
  • 4451
Re: UART / console redirection
« Reply #22 on: 16 / January / 2014, 14:27:54 »
I might get a chance to play with this again tomorrow, anything new I should be aware of?
No real news, I have updated reyalp's latest patch - you now need to put
OPT_CONSOLE_REDIR_ENABLED=1
into localbuildconf.inc instead of changing platform_camera.h . The patch includes the updated stubs files for the ixusw, for most cams PRIMARY.BIN is needed to get a re-generated stubs_entry.S . I have removed my ptp addition, reyalp's method supersedes it.

IMHO this feature could replace the current, Vx only CAM_CONSOLE_LOG_ENABLED code. Not sure what I should do with all the related code snippets in various ports - erase them or keep them.

For remote console, use reyalp's previously attached cli.lua replacement for chdkptp (replace the stock cli.lua that comes with it).

The patch is not final, needs cleanup (and re-generated stubs).

*

Offline ahull

  • *****
  • 634
Re: UART / console redirection
« Reply #23 on: 16 / January / 2014, 15:46:50 »
Thanks for the update, I didn't get any spare time at all today, perhaps tomorrow.
I am itching to get started with this, but real life keeps getting in the way. :D
I presume I just need to to an svn checkout of the trunk, apply both patches, compile and go... I'll let you know how I fair.
 


Re: UART / console redirection
« Reply #24 on: 30 / January / 2014, 16:15:02 »
Hey all!

Glad you liked the SSDV "hack", after all that's what CHDK is all about :)
I have been having a play about reading from the UART on my a530 in an effort to try and get coordinates from a GPS module. No luck so far, even after having a chat with fsphil who helped me out a lot before. All I managed to do was crash the camera a few times ;)

Where do we stand with reading from the UART in LUA on a vxworks camera at the moment?

Regards,
Chris Stubbs

*

Offline srsa_4c

  • ******
  • 4451
Re: UART / console redirection
« Reply #25 on: 31 / January / 2014, 15:32:16 »
I have been having a play about reading from the UART on my a530 in an effort to try and get coordinates from a GPS module. No luck so far, even after having a chat with fsphil who helped me out a lot before. All I managed to do was crash the camera a few times ;)

Where do we stand with reading from the UART in LUA on a vxworks camera at the moment?
The scripting side hasn't changed, you still need to use call_event_proc() or call_func_ptr() to play with firmware functions. Although my initial reason for opening this thread was to find and present a solution to communicate with the camera's built-in console utilities, I'll try to help with external communication.
On Vx cameras, the "event shell" is always active, it reads stdin and writes to stdout. If you try to read from the console device, it's possible that the event shell will interfere. Which method(s) have you tried so far?

Re: UART / console redirection
« Reply #26 on: 24 / May / 2014, 19:32:39 »
Which method(s) have you tried so far?

Sorry its been a while. The method I was toying with was just:
Code: [Select]
fh=io.open("/tyCo/0")
No code past this point ran and the screen slowly faded to white. Returning to normal on a power cycle.

I have purchased a SX230 (DryOS) to play with too as it has built in GPS, and hopefully still a broken out UART I can use to write to my radio module.

*

Online reyalp

  • ******
  • 14080
Re: UART / console redirection
« Reply #27 on: 24 / May / 2014, 19:58:54 »
Which method(s) have you tried so far?

Sorry its been a while. The method I was toying with was just:
Code: [Select]
fh=io.open("/tyCo/0")
This won't work on any camera, because the Lua IO uses the Fut API (something like C stdio), not low level open. I think that the Open, Read, Write eventprocs registered by SystemEventInit should work, so you shouldn't need to mess with ROM pointers unless you also need ioctl. I haven't verified this though.

Quote
I have purchased a SX230 (DryOS) to play with too as it has built in GPS, and hopefully still a broken out UART I can use to write to my radio module.
DryOS works rather differently.


On an unrelated note, I'd still like to get the script/console stuff into the trunk at some point.
Don't forget what the H stands for.


*

Offline Ant

  • *****
  • 509
Re: UART / console redirection
« Reply #28 on: 24 / September / 2016, 17:50:25 »
Should this patch work with latest CHDK / CHDKPTP ?

I need debug output generated by ==== Developer Process ====
On g7x a function 0xFC32D612 used for it.
But I don't see this output in file generated with UART redirection.

*

Online reyalp

  • ******
  • 14080
Re: UART / console redirection
« Reply #29 on: 24 / September / 2016, 18:08:47 »
Should this patch work with latest CHDK / CHDKPTP ?
Try it? It's been long enough that there might be some conflicts but I wouldn't expect anything too terrible. Of course, there's no guarantee that more recent cameras don't do something differently.

This is still something I'd like to get into the trunk, FWIW.

Quote
I need debug output generated by ==== Developer Process ====
On g7x a function 0xFC32D612 used for it.
But I don't see this output in file generated with UART redirection.
Without looking at it, I would guess that this means some thing is needed to enable the output, so implementing the console hooks may not help.
Don't forget what the H stands for.

 

Related Topics