Author Topic: can not run Lasershark Jack Host Application need HELP!  (Read 16453 times)

Wan-anong

  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
can not run Lasershark Jack Host Application need HELP!
« on: March 25, 2018, 09:17:59 AM »
i can not run the  Jack application  . i have compiling and running the application as follows from this >>  http://macpod.net/electronics/lasershark/lasershark_usage_linux.php
but it don't work  can you please help me .

Macpod

  • Administrator
  • Full Member
  • *****
  • Posts: 179
  • Karma: +3/-0
    • View Profile
Re: can not run Lasershark Jack Host Application need HELP!
« Reply #1 on: March 25, 2018, 05:29:30 PM »
Hi Wan-anong,

What problem are you encountering specifically?

How do you plan to use the jack application too? I ask as there may be easier ways to accomplish your goal

Wan-anong

  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: can not run Lasershark Jack Host Application need HELP!
« Reply #2 on: March 26, 2018, 03:28:26 AM »
i plan to use galvanometer mirror and  use lasershark  to control it . i read your article using openlase and when i compile lasershark jack host application to receives data from OpenLase-based and transmits data to the Lasershark over USB . i do the following that you give but it's not work for me and i have no idea what wrong. can you please help me with this.

Wan-anong

  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: can not run Lasershark Jack Host Application need HELP!
« Reply #3 on: March 26, 2018, 06:34:48 AM »
We could not run our laser even though  we try to follow your instruction carefully

Compiling and Using the Lasershark Jack Host Application (for use with OpenLase):



this happen after we tryed to make it.....

iids@iids-X450CA:~/Desktop/lasershark_hostapp$ make
gcc -Wall -o lasershark_twostep lasershark_twostep.c lasersharklib/lasershark_uart_bridge_lib.c \
                        twosteplib/ls_ub_twostep_lib.c twosteplib/twostep_host_lib.c \
                        twosteplib/twostep_common_lib.c `pkg-config --libs --cflags libusb-1.0`
lasershark_twostep.c: In function ‘main’:
lasershark_twostep.c:301:5: warning: ‘memset’ used with constant zero length parameter; this could be due to transposed parameters [-Wmemset-transposed-args]
     memset(lasershark_serialnum, lasershark_serialnum_len, 0);
     ^
In file included from twosteplib/ls_ub_twostep_lib.h:27:0,
                 from lasershark_twostep.c:31:
lasershark_twostep.c: At top level:
twosteplib/twostep_common_lib.h:162:13: warning: inline function ‘twostep_verify_start_token’ declared but never defined
 inline bool twostep_verify_start_token(uint8_t *buf);
             ^
twosteplib/twostep_common_lib.h:161:13: warning: inline function ‘twostep_insert_start_token’ declared but never defined
 inline void twostep_insert_start_token(uint8_t *buf);
             ^
In file included from twosteplib/ls_ub_twostep_lib.h:27:0,
                 from twosteplib/ls_ub_twostep_lib.c:22:
twosteplib/twostep_common_lib.h:162:13: warning: inline function ‘twostep_verify_start_token’ declared but never defined
 inline bool twostep_verify_start_token(uint8_t *buf);
             ^
twosteplib/twostep_common_lib.h:161:13: warning: inline function ‘twostep_insert_start_token’ declared but never defined
 inline void twostep_insert_start_token(uint8_t *buf);
             ^
In file included from twosteplib/twostep_host_lib.h:27:0,
                 from twosteplib/twostep_host_lib.c:22:
twosteplib/twostep_common_lib.h:162:13: warning: inline function ‘twostep_verify_start_token’ declared but never defined
 inline bool twostep_verify_start_token(uint8_t *buf);
             ^
twosteplib/twostep_common_lib.h:161:13: warning: inline function ‘twostep_insert_start_token’ declared but never defined
 inline void twostep_insert_start_token(uint8_t *buf);
             ^
/tmp/ccmO9wSs.o: In function `twostep_cmd_set_steps':
twostep_host_lib.c:(.text+0x4d): undefined reference to `twostep_insert_start_token'
/tmp/ccmO9wSs.o: In function `twostep_cmd_set_safe_steps':
twostep_host_lib.c:(.text+0xd3): undefined reference to `twostep_insert_start_token'
/tmp/ccmO9wSs.o: In function `twostep_cmd_set_step_until_switch':
twostep_host_lib.c:(.text+0x156): undefined reference to `twostep_insert_start_token'
/tmp/ccmO9wSs.o: In function `twostep_cmd_start':
twostep_host_lib.c:(.text+0x1be): undefined reference to `twostep_insert_start_token'
/tmp/ccmO9wSs.o: In function `twostep_cmd_stop':
twostep_host_lib.c:(.text+0x226): undefined reference to `twostep_insert_start_token'
/tmp/ccmO9wSs.o:twostep_host_lib.c:(.text+0x28e): more undefined references to `twostep_insert_start_token' follow
/tmp/ccLUrsBM.o: In function `twostep_resp_valid':
twostep_common_lib.c:(.text+0x303): undefined reference to `twostep_verify_start_token'
collect2: error: ld returned 1 exit status
Makefile:41: recipe for target 'lasershark_tw

Macpod

  • Administrator
  • Full Member
  • *****
  • Posts: 179
  • Karma: +3/-0
    • View Profile
Re: can not run Lasershark Jack Host Application need HELP!
« Reply #4 on: March 28, 2018, 12:48:57 AM »
It looks like you are missing twostep_common_lib.h and twostep_common_lib.c . Did you remember to initialize and checkout the github submodules?

cd ~/Desktop
git clone https://github.com/macpod/lasershark_hostapp.git cd lasershark_hostapp
git submodule init
git submodule update


Wan-anong

  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: can not run Lasershark Jack Host Application need HELP!
« Reply #5 on: March 28, 2018, 04:04:32 AM »
i did it but it still has the same result :'(

Macpod

  • Administrator
  • Full Member
  • *****
  • Posts: 179
  • Karma: +3/-0
    • View Profile
Re: can not run Lasershark Jack Host Application need HELP!
« Reply #6 on: March 29, 2018, 12:19:49 AM »
It looks like something changed with gcc and I'll need to update the code to have it compile.

In the meantime in the Makefile you can remove "lasershark_twostep" from the following line and run make again. This should build everything fine:
all: lasershark_jack lasershark_stdin lasershark_stdin_circlemaker lasershark_stdin_displayimage lasershark_twostep

I'll try and fix this gcc issue this weekend but since you probably don't have a twostep board the result likely won't matter much for you

edit: I have removed the inlines and corrected some code that was throwing warning too as a bonus :)
« Last Edit: March 29, 2018, 11:09:39 PM by Macpod »