There is a Makefile, so you don't need to compile with gcc command directly, you can just type "make" in the source folder.
I got this error:
So I removed -Werror from the Makefile and it compiled successfully.
If you want to use "atinout" instead of "./atinout" for the commands, you can install the binary with "sudo make install".
Executing AT commands works too:
https://wiki.pine64.org/index.php/PinePhone#AT_commands
I got this error:
Code:
gcc -o atinout -W -Wall -Wextra -Werror -DVERSION=\"0.9.1\" -g atinout.c
atinout.c: In function ‘is_final_result’:
atinout.c:141:20: error: this statement may fall through [-Werror=implicit-fallthrough=]
141 | if (strcmp(&response[1], "K\r\n") == 0) {
| ^
atinout.c:145:9: note: here
145 | default:
| ^~~~~~~
cc1: all warnings being treated as errors
make: *** [Makefile:14: atinout] Error 1
So I removed -Werror from the Makefile and it compiled successfully.
If you want to use "atinout" instead of "./atinout" for the commands, you can install the binary with "sudo make install".
Executing AT commands works too:
https://wiki.pine64.org/index.php/PinePhone#AT_commands