Xinyuan-LilyGO / LilyGO-T-A76XX

LilyGo A7670 A7608 SIM7672 series
MIT License
96 stars 42 forks source link

Unable to see Serial device on OSX / Macbook Sonoma #97

Closed pacmac closed 2 months ago

pacmac commented 2 months ago

Hi;

Just received a couple of these, sorry to say but there seems to be a huge lack of documentation for this product.

I downloaded and installed the nCH341SER_MAC drivers, however I am sceptical that they actually installed, and besides I have so many other USB Serial Adapters and ESP32 development boards and none of them have ever required me to download a specia driver.

It has 2 USB ports, one USBC, and the other Micro USB - why what are the different USB ports for ?

If I plug into the USB C, then the LEDs on the board do not come on and no serial device is created under /dev lsusb shows no device connected.

If I plug into Micro USB, then the LEDs on the board come on, however no Serial device is created under /dev and lsusb shows:

lsusb
Bus 001 Device 001: ID 1e0e:9011 1e0e Mobile Composite Device Bus  Serial: 200806006809080000
Bus 000 Device 000: ID 1e0e:9011 1e0e USB 3.1 Bus  Serial: 200806006809080000

I have tried holding GP0 button and pressing Reset/Enable but that makes no difference.

So thus far I have 2 boards and are unable to use them :-(

lewisxhe commented 2 months ago

Open the Serial Monitor, press the reset button, is there any startup message?

pacmac commented 2 months ago

Which USB to connect to USB-C or Micro-USB ?

lewisxhe commented 2 months ago

USB C

pacmac commented 2 months ago

Hello, thanks for helping.

Now when I plug it into USB-C the serial port is recognised.

I am using Aruino, is there any sketch already installed on the device ?

Also, what is the Micro-USB Connector for ?

Thanks

pacmac commented 2 months ago

Hi;

I can get the LILYGO AT Modem interraction on USB-C, I can get it to enter bootloading mode by pressing & Holding GP0 and then RST, but when I attempt to either upload a sketch or burn the bootloader I get:

Sketch uses 260685 bytes (19%) of program storage space. Maximum is 1310720 bytes.
Global variables use 21344 bytes (6%) of dynamic memory, leaving 306336 bytes for local variables. Maximum is 327680 bytes.
esptool.py v4.5.1
Serial port /dev/cu.usbserial-56750109731
Connecting....
Chip is ESP32-D0WD-V3 (revision v3.1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: a0:b7:65:fe:c3:a8
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 921600
Changed.

A fatal error occurred: Unable to verify flash chip connection (Invalid head of packet (0xE0): Possible serial noise or corruption.).
Failed uploading: uploading error: exit status 2

I am using very good quality USB C cable and can program many other devices without any problem so this is not related to my cables / hardware.

Pressing the BOOT button next to the RED LEDs appears to do nothing at all.

pacmac commented 2 months ago

OK, I slowed down the USB speed from 921600 to 460800 and I am able to upload sketch.

What sketch was running on the default board ?

lewisxhe commented 2 months ago

Default is ATDebug

pacmac commented 2 months ago

Hello again;

I seem to be unable to power off or prevent the modem from powering on:

#include <driver/gpio.h>

// The modem boot pin needs to follow the startup sequence.
#define BOARD_PWRKEY_PIN                    (4)
#define BOARD_POWERON_PIN                   (12)

void setup() {
  Serial.begin(115200);
  while(!Serial){delay(100);}
  delay(1000);
  Serial.println("Started");

  pinMode(BOARD_POWERON_PIN, OUTPUT);
  digitalWrite(BOARD_POWERON_PIN, HIGH);

}

void loop() {
  Serial.println("Loop");
  delay(1000);
}

I have also tried:

digitalWrite(BOARD_POWERON_PIN, LOW);

But it makes no difference, the modem always powers on.

pacmac commented 2 months ago

I know I can use AT command to power it off, but I dont want it to come on at all until I request it to.

I my application the device sleeps, wakes up takes some measurements and goes back to sleep.

And then once in a while, maybe once a week it will switch on the modem and send data.

I do not want the modem switching on every time it wakes up from sleep.

I dont seem to be able to prevent it turning on, even when I sleep the modem stays on, then when it wakes up, it goes off momentarily and then switches on again.

pacmac commented 2 months ago

OK, seems that when powered by USB, the modem always comes on. that makes development more tricky as I cannot make it behave like it would if deployed.

But now that I understand that its OK.