Issue with communicating with FONA 3G (aka SIM5320a) - arduino-uno

My issue is fairly simple to describe but I have no idea what the problem could be. So I got my FONA 3G and immediately after taking it out of the box, I connected the battery and I wired up my FTDI board (aka USB to serial converter), and then I plugged it into my USB port to try and establish communication. I just tried the most basic at command AT(using PuTTy). You're supposed to get an OK in response but the FONA doesn't appear to even notice that I'm trying to talk to it. I type AT and press enter and nothing happens at all.
The issue is most certainly not my FTDI board, I'm very experienced communicating with wifi modules and other GSM modules using PuTTy. So please don't be concerned with the setup. That's 100 percent definitely not the problem.
I was able to send AT commands after plugging the module into my laptop directly using the module's USB input, but there is still some issue with its UART. I haven't been able to send or receive any communications directly from RX and TX. It wont respond to any programs I load up onto my arduino. Its like the UART is asleep.
If you have experience with FONA 3G, please speak up and tell me what steps you took to get the UART to respond. What should the status indicator look like before its ready to receive commands? Any knowledge you have about the FONA3G module would be helpful.
As a side note, the FONA3G has a chip number. It is SIM5320a. I don't know if that helps. Most people know it as FONA 3G.

All right. Thanks to those of you who posted comments. It turned out to be an issue with the baud rate! Its always the simple stuff. Adafruit said this thing has auto baud meaning you can use any baud rate but they are wrong. It requires 115200 to work properly. Also I'd like to point out that there was nothing wrong with my setup. Sometimes you should trust the person when they say their setup is 100 percent fine.

Related

Is it possible to have timing issue with a DS18B20 1-wire temp sensor on ESP32 with arduino?

i have and ESP32 module that i have a DS18B20 sensor connected to with a 4.7k pullup resistor. the problem is that i get very inconsistent reading a lot of -127 readings in my current program. With WiFi running, Asynch mqtt, websocket etc running on the esp. what i found strange is that when i try the test program, it seems to be pretty consistent, but the test program doesn't start wifi or anything else. Also we have motor VFD near the device and when a motor start, i stop getting readings completely. I have now very confused about all that. Is there anyone that can have any insigth or recommendation about that? I am starting to think maybe a got a fake DS18B20 this is why it is so picky. I have some hundreds of the, and they seems to be all pretty inconsistent ?
Thanx a lot!

Arduino on MacOS disabled my USB ports

Trying to test my program. Plugged my arduino in. Got a message saying it's drawing too much power and the USB ports have been disabled. Now when I go to tools > port, the "serial port" option is grayed out. I've tried powering the arduino with the 9v battery, but the battery started to get hot, so I disconnected it again. I've found solutions for this on Linux and Windows but as far as I can tell absolutely nobody uses macOS if they don't have to. It just so happens that I have to.
The MacOsx protect USB ports, disconnecting if the current drain is too high. Its good to not burn the USB port.
The fact of battery is get hot, indicates that your board is consuming much current. Can be a short cut, deffect in board, or in any that you plugged in Arduino.
Please try connect the Arduino without any wire connections in battery,
if still get hot, your Arduino board has burn-out and must be replaced.

Problems reading serial data on Windows IOT rasberry pi3

I have an Adafruit Ultimate GPS on a USB serial interface and using the same UWP application can read data just fine on a x86 build on a desktop. When I try a ARM build on the PI3 (remote), everything appears to work, but the serial data read never returns. No timeout, nothing. On the desktop, it starts getting GPS data from the chip right away. I also tried the CustomSerial sample app and am getting the same result. I do have the manifest updated to show serial port access, so don't think that is the problem.
Any ideas would be greatly appreciated. Thanks.
Problem resolved, operator error. Prolific driver not supported, was trying to read data from on-board serial port. Move the GPS sensor to the on-board serial, all is working now. Apologies for the distraction.

How to send modem AT Commands to a board from from OSX

Does anyone out there who has developed on a dev board attached to a Mac OSX machine's USB port know how to send AT tty modem commands to the board? Arduino folks? Anyone?
TL;DR
I purchased a development STEVAL-SPBT2ATV2 "USB Dongle for the Bluetooth class 2 SPBT2532C2.AT module", which, according to the docs and spec has "downloaded FW, enabling the user to create a Bluetooth link with simple AT commands."
Which would be great, except all the documentation is only for old MS Windows, and doesn't give any hints on how to program this device from OSX or Linux.
Do I need to install a driver of some sort? Everything I've tried is like talking to a brick wall: I send commands, but nothing comes back from the board.
Things I've tried:
/dev/tty.Bluetooth-Modem already existed. Didn't seem to do anything. I think that's the built-in bluetooth device.
/dev/tty.AmpedUp-AMP-SPP and /dev/cu.AmpedUp-AMP-SPP showed up when I went to "Network -> set up bluetooth device" - which is good (correct device name) but strange, why under network?
Then under Bluetooth I can add a "serial port used to connect to this computer" and get the choice of Modem or RS-232. I guessed Modem.
I really hope I don't have to mess with the /etc/tty files
Nothing. the device never seems to react, or send any data back. I've tried several ways to send data to the device. Silence.
echo "AT+AB GPIOConfig 2 O^M" > /dev/cu.AmpedUp-AMP-SPP # ctrl-v ctrl-m for the ^M
screen /dev/tty.AmpedUp-AMP-SPP
cat /dev/tty.AmpedUp-AMP-SPP
minicom # via brew
chat /dev/cu.AmpedUp-AMP-SPP
From the docs:
Each dongle has the following factory default:
UART: 115200 baud, no parity,1 stop bit,8 data bits
Local name: “Amp'ed UP!’
Class of device: Misc Device
Profile: SPP (serial port profile)
Service name: “AMP-SPP”
Deep sleep: disabled
Page and inquiry scan: 1.28s interval, 11 ms duration
Security: disabled
Bonding PIN: “1234”
Bonding allowed: always enabled
I figured out where I was wayyy off-base with some help from a friend.
I thought that I was trying to establish a OSX->Terminal->Serial (Over USB)->Chip communication channel to program the chip.
When in reality, I was trying to establish a OSX->Terminal->Serial (over Bluetooth->Bluetooth) -> Chip channel to talk to the chip using the existing firmware, which includes enough defaults to have 4 GPIO/LED outputs. The USB only comes in later if I want to change the firmware.
Which means plugging the board into my laptop's USB port isn't necessary and only complicates the issue - better is plugging it into a spare USB charger next to my laptop.
... Which let me narrow down the problem to 2 things:
OSX isn't holding an open bluetooth communication channel to the BT device, so of course I won't be able to talk to it, even if the serial port is set up right
Even if I could talk to it, Apple iOS is so locked down that I won't be able to connect to it from an iPhone/iPad. :(

Communications between Visual C++ and Arduino:

I have a Arduino app that needs to talk to my PC across the USB (Serial) connection. I have this bit of code that I lifted from the Arduino Playground at
http://arduino.cc/playground/Interfacing/CPPWindows#VisualStudio2008
this->serialPort1->PortName = "COM5"; // Replace with your COM port!
this->serialPort1->Open();
this->serialPort1->Write( "7" ); // In the future, you'll expand on this
// to write your custom data to the board
this->serialPort1->Close();
My question is how does one determine what COM port the Arduino USB cable is attached to?
There are several ways you can approach this.
The most obvious is that you simply make your application configurable and tell it which serial port to use. The port name should never change, unless you have other processes on your machine allocating virtual COM ports such as Bluetooth drivers.
A second option is that you can do what the Arduino app does and scan the serial ports on the system looking for the hardware. Since you are using the CLR, System.IO.Ports.SerialPort.GetPortNames() will give you a list of all the serial ports on the system. (You can also get this from the registry.) Then you can enumerate through them and check the status of the pins to see which serial ports have devices attached. You should probably include in your sketch a way to query the Arduino so that you can send it a command and have it give a fixed response. This would allow you to discern your application from other serial devices such as modems.
There is a third option which would involve figuring out where the FTDI driver stores its configuration information in the system/registry and going from there. This is a bit more involved, so I can't give any information on if this approach is even viable.

Resources