i want to send a picture with GPRS module and through a TCP connection to a server.
but my picture contains some "1a" (CTRL+Z) value in some bytes. As we know this is the terminator character for sending sms or data with AT commands. how can I send ctrl+z as a byte of data ?
Also when sending process reaches to character \0, it stops and returns an error. I mean GPRS module sends ERROR to serial port.
Example:
FF D8 FF E0 00 10
FF and D8 and FF and E0 will send successfully but error occurred at 00.
what is the problem?
thanks.
I was working on a project to sen sms from pc using AT Commands. Here I was using following command for ctrl+z.
outputStream.write(26);
Try sending 0x1A, or $1A if that doesn't work type $1A.
Related
I am usign one of Dorji's pruduct. The products name is DRF1276DM. The image of the product can seen in following images
In the application note the producers state that the module can communicate over serial port with TTL level UART. In their application note which can be found at http://www.dorji.com/docs/data/DRF1278DM.pdf. They state that if we send a command like AF AF 00 00 AF 80 03 02 00 00 92 0D 0A the device will response as AF AF 00 00 AF 00 03 02 00 00 12 0D 0A I try to check this command in order to test the device but I receive same command in my all trial. The device send me that 2400 O 8 1 DRF128X V2.7. In the application note they state that the device will send only one time this command when power is one but In my case the response is always same regardless to command code.
For checking the condition I try to use every command on http://www.dorji.com/docs/data/DRF1278DM.pdf but I recieved same respond. My first question is this. Are there any one who deal with same problem with me or could you give me any solution for this case. I am suspicious that the device get reset in every time when I try to send command over serial port. Is there any way to reset the device to default either using software or hardware.
In the application note they state that the first respond which I quoted above, will give the information for communcating device In our case I expected to communicate with device on odd parity 8 bit data size 2400 baud rate but the device only gives irrelevant or nonlogical bytes in 2400 baud rate. Only logical answer I received from device is on the 9600 baud rate. My second question is this. Is there a bug on this device setting or did I miss someting because as far as I know we cannot communicate with devices over multiple baud rate option.
PS:
I try to use their configuration tool which can be found in http://www.dorji.com/products-detail.php?ProId=61, but I got same "time out"
Error from device, I used 2400 boud rate and even parity but the result cannot changed.
Pin EN must be connected to logical 0
Firstly, the Error Time Out error appears because of a damaged UART-to-USB converter or this happens when you are using multiple jumper wires for a single pin of the module. Try using the a single female-to-female jumper wire to connect every pin of your module with the corresponding pin of the UART-to-USB converter.
Your UART is probably working fine, i have the same issues.
My DRF1278/76 modules dont seem to respon to me changing the baudrate in configuration parameters, it looks like its fixed to 9600 bauds, wich is a boomer
I had this problem too, my issue was the EN pin needs to be pulled low. Even with the USB to UART adapter I bought with the modules, that line is allowed to site high by default. Use a jumper to pull it to ground.
I am working with my Ardunio and the contactless reader/writer MFRC522 from NXP. I am using my ePassport (EU standard) and I want to start the Basic Access Control (BAC) procedure by sending the Get Challenge APDU command to its RFID chip.
Here in stackoverflow I found the APDU 00 84 00 00 08. To implement it on my Ardunio project I use the library of miguelbalboa (accessed here). Within this library there is a method to send data to an RFID chip and store its response. But first I get the ATQA which is the ATR equivalent to a contact card (which is in my case 00 08) and then a SAK (which is in my case 20). The library notes that it detected PICC compliant with ISO/IEC 14443-4 in my ePassport and finally I get its randomized UID. Next step I try to get the challenge with
// create MFRC522 instance „mfrc522“
// Init SPI bus
// Init MFRC522 device
// Select RFID chip (PICC_Select method)
byte sendData[] = {0x00, 0x84, 0x00, 0x00, 0x08};
byte backLen = 10; // I know that the answer (= the challenge) is 8 bytes long + 2 bytes for SW1 + SW2
byte sendLen = sizeof(sendData);
byte backData[backLen];
MFRC522::StatusCode status = mfrc522.PCD_TransceiveData(sendData, sizeof(sendData), backData, &backLen);
// Print „status“
No matter what I do/change/extend, the StatusCode returned is always
Timeout in communication
and I can’t find out: What am I doing wrong? I am now doubting that it is a programming error but maybe rather a hardware issue? Maybe the FIFO buffer on the MFRC522 does not accept this command although I didn’t find any restrictions in its technical specs but then I am thinking: all I do is sending and receiving bytes according to the ISO/IEC 7816-4 standard with an ISO/IEC 14443-4 contactless RFID chip…
EDIT: I tried the APDU command with my NFC device in my smartphone and an APDU Debug app from Google Play Store and there it works fine! So the chip or the APDU command itself can’t be the problem.
Have you tried sending a T=1 block?
The Block format PCB|CID|INF|EDC. This is described in http://read.pudn.com/downloads64/ebook/225463/M305_DESFireISO14443.pdf
I had success sending the GetVersion to DESFire but it timeout trying to fetch the next frame (0xAF)
I've been trying to control Panasonic PT AE3000U through computer serial port for a last few days. Computer that I am using has serial port on its back, and I've confirmed that port functions at some level by connecting RXD and TXD with jump wire.
Technical information about projector (10Mb): http://www.projectorcentral.com/pdf/projector_manual_4506.pdf
Section that tells about serial communications starts from page 51.
According to manual and that what I've read from online, start-up command in hex should be 02 50 4f 4e 03, but I haven't been able to get it work with that.
Variations of that command I've tried to send with RealTerm and Termite:
02 50 4f 4e 03
02504f4e03
0x02 0x50 0x4f 0x4e 0x03
0x020x500x4f0x4e0x03
And other similar combinations and formats
I assume that command on third row should be the right one, because if I send that as numbers with Realterm, and connect RDX and TXD together similarly as I did before, I get this on screen (display settings are "display as ascii").
http://i.imgur.com/PjpRms7.png
But when I connect cable to the projector and repeat the process, nothing happens. Baudrate is set at 9600, which should be correct.
So, I guess it somehow solved itself. I decided to restart my computer and projector. "Just in case there would be something left from all of mine failed attempts"
And it started to work, I sent line 0x02 0x50 0x4f 0x4e 0x03 with Realterm as numbers only.
My settings were:
Baudrate 9600
Parity: None
Data bits: 8
Stop bits: 1
how can i build the serialforwarder or use it to forward the received data to another program to make some process?
how to parse the data and use it as input data to another program such as Matlab or c# or java application.
which protocol used to parse the recieved data ?
last question: it is just for motes which is base station mote ? can i build one for any mote ?
You have to read thoroughly the serial stack...its not very easy but its do able.
You can directly read from serial port. You don't need serial forwarder in this case. There are few things to take care of.
For example if you want to read a serial message that is being send to serial port of your PC (usb sensorboards just work like serial, since they are using usb to serial converters lik FTDI chip).
in C# (same for Java, etc...) you can read byte streams that are coming in the serial port. You can parse this byte streams to extract a standard serial message of tinyos.
This is somehow explained in TEP #113 although it has some problems, but you should be able to find those problems and make your program work.
As it stated in TEP 113, a standard serial packet is something like:
7e 40 09 00 be ef 05 7d 5d 06 01 02 03 04 05 7e
That means, a packet starts with hex 7E ( I believe its 126 or 127) and ends also with 7E. The last 2 bytes are CRC of the packet. So you can in your c# program start reading from serial port when you encounter 7E and stop reading when you reach the next 7E in the stream. Everything in between will be your packet.
You have to be careful of escaping that is if a 7E is part of your packet content, to be not be confused with start and end dilimeters, it will be escaped to something else...that's also is explained in that TEP 113.
I believe there were some C++ code fro calculating the CRC that you can easily convert it to C# or Java code.
Also check the source code of Serial.h which contains some details about how a serial packet is being formed in TinyOS.
I'm currently working on a project in which I use antennas such xbee XBee 2mW Wire Antenna - Series 2 (ZigBee Mesh).
how can I get my antenna64bit address so I can set it up using my software automatically?
Can I send zigbee message to antenna so that it returns a message that contains it`s antenna address, then I decode the message and know the address of my antenna.
thanks.
If you want an easy way of doing this, you can send one message from the Router/End-Device to the Coordinator in your ZigBee network. You can use the special 16-bit Network Address 0x0000 to address the Coordinator.
This message should contain the 16-bit Network Address (or the 64-bit Address), so later the Coordinator can use this address in order to communicate back with this node. That is how you can do if you work with AT Mode. If you work with API Mode, the "Receive Packet" already contains the address of the sender, so you do not need to explicitely add it to your message.
When you press one time the commission button: the module sends a node identification broadcast transmission.
Thus, I assume you are using the API mode, so from your Coordinator API (software side) you can send a Remote AT Command Request, in broadcast, which set the CB (commission button) to 1. This is the same of press the commission button virtually at one time. Here is the packet:
7E 00 10 17 00 00 00 00 00 00 00 FF FF FF FE 00 43 42 01 67
Then, when all your devices receive this packet, they should answer to the coordinator with a Node Identification Indicator, which contains their 16-bit and 64-bit address. This way, you can automatically set up your network on software.