SparkFun Forums 

Where electronics enthusiasts find answers.

Everything with the AmbiqSuite SDK tools and software are welcome here.
User avatar
By branchus
Newbie here

I tried to work on the SDK with my Artemis ATP under fedora Linux, I got below message and said the COM port is open, I already tried to re-plug the usb cable, but doesn't help

sorry, seems I cannot post code block...
and I cannot post picture???

The error message in my gist ... b2c954c762

Am I using the wrong device? But I can see if I unplug the board, the ttyUSB0 will disappear

Last edited by branchus on Tue Apr 20, 2021 11:43 pm, edited 1 time in total.
User avatar
By branchus
Hi TS-Chris
Thank you for the reply, I followed the instruction and burn the latest bootloader. then I tried to upload again

still get error message, either port open or com port not found.

still cannot post message here. please refer to my gist, I also included the output of /dev/. ... b2c954c762
please let me know which device I should try.

User avatar
By TS-Chris
This sounds like some sort of issue in Linux, does the board work on a Windows PC?
User avatar
By branchus
I haven't tried the SDK under windows yet. but the board worked under windows with Arduino IDE...

I thought it might be driver issue, however the latest Linux driver cannot be compiled and installed on my Fedora 33 linux...
User avatar
By branchus
Thank you Paul

I tried the solution in that thread by stopping the ModemManager, however, doens't seem to solve my issue, still has the same error message...

I did some research, seem the linux has the driver build in

lsmod | grep ch34
ch341 28672 0

I also listed all the usb device with their dev
I'm now sure ttyUSB0 is the board, just need to solve the device is already in use (port is already open) issue...

/dev/ttyUSB0 - 1a86_USB_Serial
By paulvha
I remember it took me a long time to get the driver right for the CH341. The one that was with Ubuntu 1.20 did not work and after long searching I got it to work and even now it only works stable on 115K. I use the ASB for my ATP. I also have an edge-board and after a long pain with the CH341 I bought FTDI friend (as the EDGE does not have the CH341 -chip on the board). That worked in ONE go.. and runs 960000 without any problems with ASB all the time.

Running ls mode gives me :
Code: Select all
lsmod | grep ch34
ch340                  24576  0
ch341                  20480  0
usbserial              53248  2 ch340,ch341
User avatar
By branchus
I only got
lsmod | grep ch34
ch341 28672 0

but my board is Redboard Artemis ATP

I cannot install the latest Linux driver as it cannot be complied...

any other suggestions to get this sorted out?

By paulvha
I am not used to Fedora, but looking at the ASB source code ( around line 393, it does a:
add a line underneath that shows

It will at least which devices it finds and whether /dev/ttyUSB0 is one of them.

Else what error message did you get during compile of the driver?

Try removing the complete modemmanager : yum -y remove ModemManager
User avatar
By branchus
Thank you for the advice, I removed the ModemManager but still showing the below message
Code: Select all
/dev/ttyUSB0 is currently open. Please close any other terminal programs that may be using /dev/ttyUSB0 and try again.
If I use the asb, the output below, seems ttyUSB0 is not listed...
Code: Select all
Writing to file  ../gcc/redboard_artemis_atp/bin/startup_tests_Wired_OTA_blob.bin
Image from  0x0  to  0x2ddc  will be loaded at 0x20000
Connecting over serial port /dev/ttyUSB0...
Detected Serial Ports:
USB Serial
Com Port not found - Did you select the right one?
to compile the drive I got below message
Code: Select all
/home/bb/Downloads/ch341/ch34x.c:591:2: error: unknown type name ‘wait_queue_t’; did you mean ‘wait_event’?
  591 |  wait_queue_t wait;
      |  ^~~~~~~~~~~~
      |  wait_event
/home/bb/Downloads/ch341/ch34x.c:591:15: warning: unused variable ‘wait’ [-Wunused-variable]
  591 |  wait_queue_t wait;
      |               ^~~~
/home/bb/Downloads/ch341/ch34x.c:590:7: warning: unused variable ‘timeout’ [-Wunused-variable]
  590 |  long timeout;
      |       ^~~~~~~
/home/bb/Downloads/ch341/ch34x.c:589:6: warning: unused variable ‘bps’ [-Wunused-variable]
  589 |  int bps;
      |      ^~~
make[2]: *** [scripts/ /home/bb/Downloads/ch341/ch34x.o] Error 1
make[1]: *** [Makefile:1821: /home/bb/Downloads/ch341] Error 2
make[1]: Leaving directory '/usr/src/kernels/5.11.16-200.fc33.x86_64'
make: *** [Makefile:5: default] Error 2
By paulvha
I had that as well and added : #include <linux/wait.h> BUT actually, you can comment out line 591 as wait is not used. You can also comment out 590 and 589 to remove the warnings.
Attached my version CH34x
You do not have the required permissions to view the files attached to this post.
User avatar
By branchus
Thank you paulvha

I added the header file, still cannot compile, I commented out line 591, compile successful and loaded fine

I can see I have one one device when I run lsmod
Code: Select all
lsmod | grep ch34
ch341                  28672  0
ch34x                  24576  0
but when I tried to upload through usb still get the same error message (ModemManager has been removed)
ttyUSB0 is current open ...
 Topic permissions

You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum