I have been searching for a library or some functions that can get the time from the device that is used to program the Arduino(laptop, phone whatever). Something like the Time library but that takes the current time. Would I need to have an internet connection for that, or is there any that do it offline too?
Unless you have an atomic clock, you can't get the exact time without an internet connection, GPS, etc.
If you have an ethernet port on your Arduino platform, you probably can use NTP to sync the time from your local network (or directly from NTP server on Internet).
The Arduino can't tell the PC to give up any information. You would need a program running on the PC that sends the time over the serial port to the Arduino in order to get the time as it appears on the PC.
Related
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.
I have a data buffer of data on my Serial port. This communication is developed in order to transfer the "maximum" value of possible data. Hence, the value of samples "send" if there is no connection with a computer is around ~11500 data/sec. If I attach the controller (who send the data) on a Windows 10 machine and I try to read (with java) the data, the information frequency drops down to ~ 950/1000 data/sec. Otherwise, if I attach the controller to the same machine, with the same software, but under Ubuntu, it reaches ~6000/7000 data/sec. So, there is a way to improve the Serial port under Windows?
If you are using a cheap USB-serial port, it is possible it only works at USB1 speeds, and/or the driver is basically a rebadged device driver demo from the Windows SDK (which is very poor). More expensive USB ports generally have their own drivers which are much better at higher data rates.
It is also possible that there is some sort of hardware flow control that isn't quite as efficient on Windows as it is on Linux.
Without knowing exactly which USB port you have, it's difficult to make suggestions.
Basically what I want to do is write iOS code on Xcode from my Windows PC which is connected to my Macbookpro. I tried a lot of applications for this and most of them connect through the internet and have screen action delays. Some of the other applications have a problem with sending mac commands from my windows keyboard.
So:
- Fast LAN connection
- Ability to pass mac shortcuts
- Responsive
- Hopefully free
- Hopefully copy paste data between computers
to state the obvious,so we are on the same page. the LAN is your Local Area Network, and the parameters of your LAN are defined by the Coverage area of your Modem's Wifi Range and the amount of Ethernet Hard Wire Connections, if you are trying to connect to a Mac on your LAN From a Windows Machine on the same LAN, That is not referred to as REMOTE CONNECTION, That is referred to as LOCAL NETWORKING, Connecting Remotely, or Remote Connection is when you connect From a Remote LAN or one that is not Your Personal LAN, and you use that LAN to Connect to a Computer on your LAN, that's remote connection, Hence, your connecting remotely, so.. Are you using Your LAN to achieve this and your having lag issues, or a you trying to do it remotely, if your trying to Remote Connect and your having trouble with Software, because i know it can be a pain, You should have mentioned what you have already tried, But.. Windows Remote Desktop Connection is buggy, i wouldn't recommend it, the way to go use to be TeamViewer as a free solution, then they Stopped the Free thing and started charging, Other Options were CrossLoop, it's good, but sometimes slow, Try if you haven't already, Most of the Good option are Paid, i rate Bomgar to be the highest, because your accessing Remotely via way of a Remote Box that is not technically inside the parameters of your LAN, hence more secure. LogMeIn is a good one
but as far as free is concerned, and to get the results you want, there is not much out there, obviously the idea is that they want you to buy the full versions, i'll do some research for you, but.. is it possible for you to provide a list of what you have already experimented with thus far, so i don't double handle. thanks
I have an Arduino application talking over USB to an application on Windows 8 using the MAVLINK protocol. The connection appears as COM3.
Is there a Windows application that can spy on this connection and display the traffic going in both directions? Raw bytes are fine, I don't need the protocol decoded.
You could log serial port activity using Portmon. (Edit: You need to first connect to the local computer via the Computer menu, and you must start capture on the port before a program opens it.)
You may not want to log USB traffic. Such a log would include a lot of extra information relating to the USB to serial adapter which is providing COM3. Portmon would only give you the bytes transferred over COM3, and the Mavlink protocol is entirely contained within that data stream. If you're sure you want to log all USB traffic to and from that device, then I recommend SnoopyPro. In Windows 7, you need to run it as administrator.
If you can use Windows XP in your environment, USB sniff should work for you. If you need something more powerful (and are willing to pay a fee for it) then USBLyzer might be a viable option.
The answer is SnoopyPro, and you can download it at:
SnoopyPro Sourceforge
This tool allows you to get USB information and also USB communication data. I used it in the past to know how a USB device worked in order to do its driver on Linux. I used this tool as a sniffer.
Basically, SnoopyPro allows you to intercept, display, record and analyze the USB protocol and all transferred data between any USB device connected to your PC and applications. It can be successfully used in application development, USB device driver or hardware development and offers the powerful platform for effective coding, testing and optimization.
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.