Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

m8c the answer is Abort #22

Closed
decadenet opened this issue Oct 4, 2021 · 9 comments
Closed

m8c the answer is Abort #22

decadenet opened this issue Oct 4, 2021 · 9 comments

Comments

@decadenet
Copy link

Hello,
m8c seems not working. After running m8c the response is Abort.

pi@raspberrypi:~ $ m8c /dev/ttyAMC0
INFO: Looking for USB serial devices.
INFO: Found M8 in /dev/ttyACM0.
INFO: Opening port.
Abandon
pi@raspberrypi:~ $

@laamaa
Copy link
Owner

laamaa commented Oct 4, 2021

Your user probably does not have the proper rights to use the port, or there is some other problem with libserialport. Please try running the program with 'LIBSERIALPORT_DEBUG=1 m8c' and paste the full log here.

@defensem3ch
Copy link

I'm having the same issue so I hope it's ok if I leave my own comment on this issue. I tried runing with sudo and mine failed also so I'm not sure it's a permissions issue. Here's the log (running on Linux Mint 20.2):

❯ sudo LIBSERIALPORT_DEBUG=1 ./m8c
INFO: Looking for USB serial devices.
sp: sp_list_ports(0x7ffe76601fd0) called.
sp: Enumerating ports.
sp: Enumerating tty devices.
sp: Iterating over results.
sp: Found device /dev/ttyS15.
sp: serial8250 device, attempting to open.
sp: Port type is unknown, skipping.
sp: Found device /dev/ttyS6.
sp: serial8250 device, attempting to open.
sp: Port type is unknown, skipping.
sp: Found device /dev/ttyS23.
sp: serial8250 device, attempting to open.
sp: Port type is unknown, skipping.
sp: Found device /dev/ttyS13.
sp: serial8250 device, attempting to open.
sp: Port type is unknown, skipping.
sp: Found device /dev/ttyS31.
sp: serial8250 device, attempting to open.
sp: Port type is unknown, skipping.
sp: Found device /dev/ttyS4.
sp: serial8250 device, attempting to open.
sp: Port type is unknown, skipping.
sp: Found device /dev/ttyS21.
sp: serial8250 device, attempting to open.
sp: Port type is unknown, skipping.
sp: Found device /dev/ttyS11.
sp: serial8250 device, attempting to open.
sp: Port type is unknown, skipping.
sp: Found device /dev/ttyS2.
sp: serial8250 device, attempting to open.
sp: Port type is unknown, skipping.
sp: Found device /dev/ttyS28.
sp: serial8250 device, attempting to open.
sp: Port type is unknown, skipping.
sp: Found device /dev/ttyS0.
sp: Found port /dev/ttyS0.
sp: sp_get_port_by_name(/dev/ttyS0, 0x55eafb3542d0) called.
sp: Building structure for port /dev/ttyS0.
sp: get_port_details returning SP_OK.
sp: sp_get_port_by_name returning SP_OK.
sp: Found device /dev/ttyS18.
sp: serial8250 device, attempting to open.
sp: Port type is unknown, skipping.
sp: Found device /dev/ttyS9.
sp: serial8250 device, attempting to open.
sp: Port type is unknown, skipping.
sp: Found device /dev/ttyS26.
sp: serial8250 device, attempting to open.
sp: Port type is unknown, skipping.
sp: Found device /dev/ttyS16.
sp: serial8250 device, attempting to open.
sp: Port type is unknown, skipping.
sp: Found device /dev/ttyACM0.
sp: Found port /dev/ttyACM0.
sp: sp_get_port_by_name(/dev/ttyACM0, 0x55eafb3542d8) called.
sp: Building structure for port /dev/ttyACM0.
sp: get_port_details returning SP_OK.
sp: sp_get_port_by_name returning SP_OK.
sp: Found device /dev/ttyS7.
sp: serial8250 device, attempting to open.
sp: Port type is unknown, skipping.
sp: Found device /dev/ttyS24.
sp: serial8250 device, attempting to open.
sp: Port type is unknown, skipping.
sp: Found device /dev/ttyS14.
sp: serial8250 device, attempting to open.
sp: Port type is unknown, skipping.
sp: Found device /dev/ttyS5.
sp: serial8250 device, attempting to open.
sp: Port type is unknown, skipping.
sp: Found device /dev/ttyS22.
sp: serial8250 device, attempting to open.
sp: Port type is unknown, skipping.
sp: Found device /dev/ttyS12.
sp: serial8250 device, attempting to open.
sp: Port type is unknown, skipping.
sp: Found device /dev/ttyS30.
sp: serial8250 device, attempting to open.
sp: Port type is unknown, skipping.
sp: Found device /dev/ttyS3.
sp: serial8250 device, attempting to open.
sp: Port type is unknown, skipping.
sp: Found device /dev/ttyS20.
sp: serial8250 device, attempting to open.
sp: Port type is unknown, skipping.
sp: Found device /dev/ttyS10.
sp: serial8250 device, attempting to open.
sp: Port type is unknown, skipping.
sp: Found device /dev/ttyS29.
sp: serial8250 device, attempting to open.
sp: Port type is unknown, skipping.
sp: Found device /dev/ttyS1.
sp: serial8250 device, attempting to open.
sp: Port type is unknown, skipping.
sp: Found device /dev/ttyS19.
sp: serial8250 device, attempting to open.
sp: Port type is unknown, skipping.
sp: Found device /dev/ttyS27.
sp: serial8250 device, attempting to open.
sp: Port type is unknown, skipping.
sp: Found device /dev/ttyS17.
sp: serial8250 device, attempting to open.
sp: Port type is unknown, skipping.
sp: Found device /dev/ttyS8.
sp: serial8250 device, attempting to open.
sp: Port type is unknown, skipping.
sp: Found device /dev/ttyS25.
sp: serial8250 device, attempting to open.
sp: Port type is unknown, skipping.
sp: sp_list_ports returning SP_OK.
sp: sp_get_port_transport(0x55eafb3548e0) called.
sp: sp_get_port_transport returning 0.
sp: sp_get_port_transport(0x55eafb354980) called.
sp: sp_get_port_transport returning 1.
sp: sp_get_port_usb_vid_pid(0x55eafb354980) called.
sp: sp_get_port_usb_vid_pid returning SP_OK.
sp: sp_get_port_name(0x55eafb354980) called.
sp: sp_get_port_name returning /dev/ttyACM0.
INFO: Found M8 in /dev/ttyACM0.
sp: sp_copy_port(0x55eafb354980, 0x7ffe76601fc8) called.
sp: Copying port structure.
sp: sp_get_port_by_name(/dev/ttyACM0, 0x7ffe76601fc8) called.
sp: Building structure for port /dev/ttyACM0.
sp: get_port_details returning SP_OK.
sp: sp_get_port_by_name returning SP_OK.
sp: sp_copy_port returning 0.
sp: sp_free_port_list(0x55eafb3542d0) called.
sp: Freeing port list.
sp: sp_free_port(0x55eafb3548e0) called.
sp: Freeing port structure.
sp: sp_free_port returning.
sp: sp_free_port(0x55eafb354980) called.
sp: Freeing port structure.
sp: sp_free_port returning.
sp: sp_free_port_list returning.
INFO: Opening port.
sp: sp_open(0x55eafb354a80, 0x3) called.
sp: Opening port /dev/ttyACM0.
sp: get_config(0x55eafb354a80, 0x7ffe76601f30, 0x7ffe76601f00) called.
sp: Getting configuration for port /dev/ttyACM0.
sp: get_flow(3, 0x7ffe76601f30) called.
sp: Getting advanced flow control.
sp: sp_last_error_message() called.
sp: sp_last_error_message returning Inappropriate ioctl for device.
sp: get_flow returning SP_ERR_FAIL: Getting termiox failed: Inappropriate ioctl for device.
sp: sp_free_error_message(Inappropriate ioctl for device) called.
sp: sp_free_error_message returning.
sp: get_config returning SP_ERR_FAIL.
sp: sp_close(0x55eafb354a80) called.
sp: Closing port /dev/ttyACM0.
sp: sp_close returning SP_OK.
sp: sp_open returning SP_ERR_FAIL.
sp: sp_last_error_message() called.
sp: sp_last_error_message returning Inappropriate ioctl for device.
sp: sp_free_error_message(Inappropriate ioctl for device) called.
sp: sp_free_error_message returning.
[2]    1870809 abort      sudo LIBSERIALPORT_DEBUG=1 ./m8c

@defensem3ch
Copy link

OK I talked to jefftheworld and apparently the issue is that the libserialport shipped with my distro has a bug. He advised compiling those libs and rebuilding m8c, which I will do

@defensem3ch
Copy link

OK I followed the instructions in #20 but am now getting this error:

❯ ./m8c
./m8c: error while loading shared libraries: libserialport.so.0: cannot open shared object file: No such file or directory

@defensem3ch
Copy link

OK I got it. Just had to run

❯ sudo ln -s /usr/local/lib/libserialport.so.0.1.0 /usr/lib/libserialport.so.0.1.0
❯ sudo ln -s /usr/local/lib/libserialport.so.0 /usr/lib/libserialport.so.0
❯ ./m8c

and then it worked!

@laamaa
Copy link
Owner

laamaa commented Oct 7, 2021

Glad to hear you got it to work. Doing make clean && make in m8c code directory after installing the new lib should theoretically take care of referencing the correct files, but good that you found a workaround anyway. :)

@laamaa
Copy link
Owner

laamaa commented Oct 7, 2021

@decadenet Could you please try the same thing as @defensem3ch did and see if that solves the issue.

@JeffAlyanak
Copy link
Contributor

@laamaa Not all distros are configured to load libraries from /usr/local/lib/ where the libserialport makefile puts them.

@laamaa
Copy link
Owner

laamaa commented Oct 22, 2021

I'm closing this issue as it is very likely a duplicate of #20.

@decadenet please comment if the problem persists even after building libserialport from sources.

@laamaa laamaa closed this as completed Oct 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants