Strange ESP8266 response [closed] - arduino

Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 3 years ago.
Improve this question
I am currently playing with esp8266. It is connected to arduino via software COM port. Arduino is sending AT commands and esp is sending responses back.
The problem is that small responses look absolutely normal but longer ones are kind of damaged. First I thought this was because poor wiring but problem remained after correcting it. Also long responses are always corrupted after certain point and there is not absolute garbage but something looking slightly like correct thing:
AT+CWLAP
+CWLAP:(3,"MGTS_GPON_1936",-81,"94:4a:0c:44:8d:58",0,23,0)
+CWLAP:("::,C"N7:e,Ar8":,C""::,C"-2:0:O-ea,Aa":c,C"5::0LG8,f9):P-9:3Lv8:5,AT68d1
"9":"
458e1
AT+CWLAP
+CWLAP:(4,"Vikus",-60,"f4:6d:04:a0:ee:36",1,40,0)
+CWLAP:(3,"NURIK":55Ae4,803WM_205)PS,30):_,37,Ae9e13+,s-0e0PR,453LT9":,):_"8:1+,"::,+T"::,+,"5:3
busy s...
Recv 4 bytes
SEND OK
+IPD,166:<html>
<head><title>400 Bad Request</title></heaor>r e/
e<<tS
After replacing power supply, arduino, esp module and load capacitor things not changed:
AT+CIPSTART=
"UDP","time1.google.c⸮Kb⸮⸮⸮j
0,CONNECT
OK
AT+CIPSE
ND=48
OK
>
Secv 48 cytes
SE
ND OK
+RE⸮⸮⸮⸮"
⸮
AT+CWLAP
+CWLAP:(3,"NUR
IK",-74,"38:2c:4a:98:85:4f",1,0,0)
+CWLAP:(4,"MGT_P96,4":8b:::
8"18⸮⸮⸮*A⸮B⸮b⸮U⸮⸮͡⸮⸮⸮ʲ⸮⸮%⸮х⸮⸮⸮bkʂb2⸮⸮⸮⸮*⸮颊҂⸮Ҫ⸮b⸮b⸮
Ғ*⸮⸮bb⸮b⸮Jj
+CWLP3"oOK0"7,04:::8a080
⸮*A⸮B⸮b⸮⸮k⸮͉bj⸮b2Ѳ

Looks like a bus clock mismatch or corrupt RAM. Can you replace each side at a time with the same hardware?
Also check out your power supply.
Corruption in long messages also may be the indicator of inadequate load support capacitors.

The reason is Arduino's Software serial can't properly work on 115200 baud rate needed to communicate to esp8266. To fix this you have to send command AT+UART_DEF=9600,8,1,0,0 to change esp baud rate and after that change SoftwareSerial speed to 9600.

Related

Can't connect to network using GSM SIM900A [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 1 year ago.
Improve this question
I'm new in the arduino community, I spent a lot of days to get up with my gsm sim900A module, but it seems not working it keeps blinking 1 sec, so the sim not registered to the network or something like that, I wonder if anybody has the same problem of me, but I really need help with that.
Thank you
According to blog by Erfinden
Steps :
Insert sim and lock it.
Connect the adapter and power it
Now wait for some time (say 1 minute) and see the blinking rate of ‘status LED’ (GSM module will take some time to establish connection with mobile network)
Once the connection is established successfully, the status LED will blink continuously every 3 seconds.
So just blinking an LED doesn't meant that your GSM is not working, it is how it works.
GSM Module sim900a is working over 5v. try to power it up from an external source don't use arduino for voltage supply

error handling in Ethernet [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 3 years ago.
Improve this question
Standard Ethernet has no error correction. If FCS doesn't check out fine, the frame is dropped with no further effort.
Ethernet doesn't notify the switch at the other end of the link that it
is dropping the packet, something like ICMP of IP, neither does it ask for retransmission.
Isn't that a bit odd? One would have guessed a retransmission mechanism right when an error comes up-- before it propagates, without burdening the higher levels with overhead due to this.
In TCP for instance, a packet loss in Ethernet layer is likely to cause
destination buffer overflows due to gaps in the byte sequence, and from there retransmission of dropped segments due to this lack of buffer space, which is a much bigger waste of resources than fixing it right at the link layer.
TIA.
//=================================
EDIT:
The Q here is:
Why doesn't Ethernet have a retransmission mechanism when there is a CRC error? That is,
when the receiving switch sees an error on the frame, why doesn't the it
ask the sending switch at the other end of the link to retransmit the frame? Or doesn't even just notify the sender?
Ethernet is just dropping the packets whenever there are such errors. Without any retransmission or notification, the packet loss won't be discovered
until some other control mechanism in an upper layer protocol.
Wouldn't it be a sound logic to make Ethernet at least notify the sender? Is retransmission overhead the only reason for
not having an elaborate error handling?
Remember Ethernet isn't point-to-point. If an ethernet packet is corrupted, how can you tell who to send the failure message to?
The BER for Ethernet is very very low typically of the order of 10^(-10).
So the overhead for ACKing each frame would get higher than just ignoring errors and let upper layers handle if there is need.
Ok, you won't see it very much any more.... But in a half-duplex ethernet enviroment (csma/cd) packets will be resent if a collision is detected by the transmitting stations.

Why isn't 4B5B used like I2C, SPI? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I was explaining I2C/SPI serial protocols to my friend when he mentioned there's a way to send data between two devices using one wire with the 4B5B protocol. If this is true, why isn't 4B5B used to, say, send data between arduino and peripheral devices?
The short answer is that 4B5B isn't a protocol you can use while I2C and SPI are.
I2C and SPI qualify as OSI Network level 1 and 2 specifications, covering both physical electrical specifications of connection between devices and how the connected devices use the connection to communicate. 4B5B is merely a bit encoding scheme, covering only how to represent 4 bits of data in 5 bits of signal to ensure that the resulting signal has adequate auto-clocking content. 4B5B is not a "protocol" or a level 1 or level 2 network specification, meaning that if you try to connect two devices "using 4B5B" you will still have far too many unspecified details to be able to actually create a connection over which you can exchange data.
Here's a not so useful answer: I think the main reason why it is not part of the Arduino platform is that it isn't implemented on most of the chips on which Arduino is built:
Arduino Nano and Uno are based on ATmega168/ATmega328. Neither 168 nor 328 have 4B5B nor Dallas 1-wire protocol support.
Arduino Due uses ATSAM3x8e. It likewise lacks support for one-wire protocols
Arduino Lenonardo uses a different AVR-architecture chip, the ATmega32u4, but same story.
In the end, the question probably should be put to Atmel rather than Arduino designers.

Does anyone have any sample code or suggestions to help me to interface my 100 pin uc3a1512to a device via RS-485? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 years ago.
Improve this question
I am attempting to connect and control a device which only accepts RS-485 input. I wish to communicate to this device via my existing UC3A1512. Does anyone have any existing source code or examples that may help me to create this interface?
I need a method of outputting data via RS-485 format.
I do not need to establish round trip communication, I simply need the ability to send commands to the device.
I have looked at Atmel's website and also on AVRFreaks and I see nothing of value to my project.
Please review page 10 of this Adobe PDF from Lin Engineering to understand more about the device I need to communicate with.
RS-485 is just the electrical specification for a differential serial bus. There are many different data formats that can be used. To connect RS-485 to a microcontroller you need some hardware driver IC, there are plenty to choose from (a quick search at Farnell found 39).
The low level serial format may be 9600 8N1, if page 13 of the driver manual is any indication.
The higher level format (how to send commands to the motor) is not specified in the document, and I didn't find it elsewhere.
In the UC3A1512 you need to configure one of the USARTs to RS-485 operation, see Chapter 26 of the data sheet. Once the interface is configured the operation may be similar to RS-232, if a simple command format is used.
RS485 is a simple symmetrical serial bus. The data that you need to send over that serial link must be specified in the reference data sheet for your UC3A1512 device.
To create and debug your application (probably on an emulator it is useful that you can send it from your host PC before you try it from the embedded controller. This is easy, as RS485 allows multiple connections in contrast to RS232 which is point to point.
RS485 can be converted to regular serial RS232.
If your computer has no RS232 port anymore (most don't) you can get an USB to RS232 converter.
So far the most relevant answers have come from my question posted on electronics.stackexchange.com
Had I known this existed prior to posting my question on Stack I would have limited my question to Electronics & Robotics ONLY. As I had already asked the question and receive answers, I have opted to keep both questions open.
Thanks for your responses!

I want to establish a TCP/IP connection over a UART connection (Windows XP/7) [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 3 years ago.
Improve this question
I want to connect two computer via serial but for each to see each other via a TCP/IP connection. Ie, create new network device on the computers that are in actual fact serial ports.
The reason for this is that I am actually testing the medium in which the serial connection is made (wireless), and part of the experiment will be to use TCP/IP.
The radio being tested is a telemetry radio for use in low power applications. It polls once a second, sending data out on the wireless channel every poll when something has been received via the serial port. It uses a Modbus RTU delimiter to determine the end of data coming in on the serial port.
slip and ppp are more suitable for use with actual serial modems from what I understand.
This is actually a very hard problem. TCP/IP is a very chatty protocol and you will have problems with the radio system you have described because of the pattern of packets and ACKs you will have. In the past for some similarly unsuited applications I worked on a system that fibbed about the TCP/IP connection by faking some packets while pushing the data over a link like you have.
It is a pain, but we were doing it to support sshing over a totally inappropriate channel (high loss and high latency with moving endpoints) but it worked.
SLIP (Serial Line IP) sounds like something you might want to look into for this project.
you may use Simple TCP/IP, UDP connection by using UART using a software like this:
http://www.serialporttool.com/CommTunnel.htm

Resources