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

Trouble communicating with Cicada via serial #2

Open
Jaribeau opened this issue May 2, 2020 · 7 comments
Open

Trouble communicating with Cicada via serial #2

Jaribeau opened this issue May 2, 2020 · 7 comments

Comments

@Jaribeau
Copy link

Jaribeau commented May 2, 2020

Hey!
I've been playing with the Cicada (2g v1.2) (thanks to the Okra guys in Phnom Penh for hooking us up!) - and have been struggling to get any proper response from my AT commands to it.

  • I'm connected to the Cicada from my mac via usb
  • I've been using the examples - mostly serial_linux.cpp - and a serial monitor to try to get a nice OK back from the SIM. In both cases I'm getting garble back.
  • When I first start it up, the IMEI and a few other pieces come cleanly amidst a whole pile of garble (see the snippet below)
                                                                                              T      *T      T       ¥
                                                                                                                                                                                         T&┴       ┌
         T      :U!MT6261,1418B08SIM800C24_BTUU!␊SDC_T␋└␊O┤├H▒┼␍┌␊⎼UM␊
                                                                      Z>L1⎽␋└_R␊⎽␊├_A┌┌=>␊│⎻␊␌├┴⎺┌├:4,*⎼␊⎽┤┌├┴⎺┌├:0,┬▒⎼└:0,▒⎻⎻:0,IF:0▒┌U%␊
                                                                                                                                          IMEI:861230047519380U1␊
                                                                                                                                                                 "RL =1, GEA = 0│70, SM =1, PFC = 1!7U5␊
             (MS GPRS = 1, └┤┌├␋⎽┌⎺├ =12, ␊│├ ␍≤┼ = 1U1␊!$[SIM_DRV] 10 : °°°°°°°°, 0, 0, 0, 0^T U'
                                                                                                  @
                                                                                                   U'&
                                                                                                      @%
                                                                                                        U)
                                                                                 

or if I'm running the serial_linux example:

Sending command: AT+cpin?
10 bytes written
31 bytes received
Received message: w�ӥ

Sending command: AT+cpin?
10 bytes written
31 bytes received
Received message: $
 �

What I've tried:

  • Running a few different examples
  • Sending raw AT commands via serial
  • Changing baud rates in my serial monitor, and in serial_linux
  • It feels like a baud rate issue, but I've all standard rates to no avail. I'm primarily using 115200 w/ 8 data bits.

I'm hoping it's something simple that I'm overlooking. If you have any suggestions on what to try would be wonderfully appreciated.

I'm out for an hour or two, but then I'm going to try from a linux machine, and hopefully an ESP if I can get my hands on one today.

@lippit
Copy link

lippit commented May 2, 2020

Hey,
is there some other process trying to communicate with the modem at the same time? On Linux, there is "ModemManager", which tries to connect the modem automatically, and always spams the serial line with garbage. You need to turn it off in order to access it properly.
I assume there is something similar on Mac.

@Jaribeau
Copy link
Author

Jaribeau commented May 6, 2020

No luck so far - I didn't have much luck tracking down the ModemManager equivalent in MacOS, and was having some trouble getting it to compile on linux (some c++ version issues). I decided to setup an ESP32 as a serial bridge to try to just get some barebones OKs in response to my ATs. After quite a bit of trying I've not managed that either.

Here's my setup on that:

  • Cicada powered with 1.5amp usb adapter
  • MCU RX to Cicada host interface 13
  • MCU TX to Cicada host interface 12
  • Connected 3v3 and GND between ESP and Cicada

The module is connected to the network fine (LED changes to slow blink shortly after powering up) - but then sending AT commands is met with a nice stream of these reversed question marks ⸮����⸮��⸮�⸮�⸮�⸮��⸮��⸮�⸮�⸮���⸮�⸮�. I tested with another device to confirm that my serial messages are getting properly relayed along. I'm trying to talk with it at 9600 baud, but have tested all standard rates to see if that was the issue.

The LED switching to a slow blink leads me to believe that I haven't destroyed the SIMCOM chip while testing, and I know serial messages are at least being sent properly.

So I imagine I've got the Cicada wired up incorrectly, or my serial configuration is bad.

@lippit
Copy link

lippit commented May 7, 2020

Yeah, sounds like some hardware issue to me. I used a dev board from Simcom when developing this, which had a USB<->UART bridge included. You definitely need a serial bridge, the onboard USB connector on the Cicada board is only for firmware updates.

The default baud rate is 115200. For power, the Cicada needs booth 3.3V and 5V, that should be ok when you connect a power supply and the 3.3V from the ESP. Logic levels are 3.3V, that should also be ok with an ESP32 UART bridge.

I'll also ask my colleagues from the hardware team, probably they have an idea.

@Jaribeau
Copy link
Author

the onboard USB connector on the Cicada board is only for firmware updates.
Good to know 👍

Thanks for the help - let me know if any of the others have suggestions.

@xl0
Copy link

xl0 commented May 15, 2020

Heya. Sorry for the late reply.

Do you have a multimeter?
Would you be able to check the voltage on the Cicada power supply?

image

It should be 4.05v.

Please double-check continuity on all wires, including 3.3v and GND.

If you power Cicada from the host interface, you need to set the POWER line high, but it's always on when powering from USB, which seems to be the case, and you are getting the blinking.

Otherwise, it looks like you are doing things correctly. I'll see if we can send you another one, plus an STM32 dev board with a known to work USB-UART interface on it.

@xl0
Copy link

xl0 commented May 15, 2020

Heya.

Thinking about it, we did not update the documentation regarding the host connector!

image

Which means, all the pin numbers are shifted! The new Cicada will have it labelled more clearly:

image

I'll upload it to public git as soon as it passes our internal review, and make sure to update the README too. Was this the issue?

@Jaribeau
Copy link
Author

That was indeed the issue, thanks!

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

3 participants