Show Posts
Pages: [1] 2 3 ... 10
1  Using Arduino / Networking, Protocols, and Devices / Re: read network conf from sd on: March 21, 2013, 05:51:53 am
Thank you so much! karma+1
2  Using Arduino / Networking, Protocols, and Devices / read network conf from sd on: March 21, 2013, 05:27:17 am
Hi,
i'd like to know if it is possible to accomplish this:
  • copy a text file into a sd card with some network settings (ip, mac, gateway)
  • read the file at arduino boot
  • use the configuration read to setup the ethernet communication

if it possibile, have you any link to point me in the right direction?
Thank you
3  Using Arduino / Networking, Protocols, and Devices / Re: rs232 converter 2.8v on: March 12, 2013, 03:12:23 am
ok, so just power it with 5v and link to rs232 terminal, rs232 is +-13V level. should it works fine?
4  Using Arduino / Networking, Protocols, and Devices / rs232 converter 2.8v on: March 11, 2013, 01:18:33 pm
Hi,
I attached a rs232 device on RX and TX pins of my board but I need a TTL converter because the output of the rs232 is not TTL compatible, so I bought this one
http://www.cooking-hacks.com/index.php/rs232-shifter-smd.html and I figured out I need 2.8V as Vcc, so I built a voltage divider to get 2.8v as Vout.
I attached to Vcc but I can not read the serail data vie the converter. If I wire directly the rs232 device into the board it works fine but the data read is not correct.
Before to build the voltage driver I powered the converter with 5V, is it possibile that I burned out it?
Otherwise how can i debug it?
Thank you
5  International / Hardware / Re: leggere carta regionale dei servizi on: March 08, 2013, 10:20:08 am
Grazie. Per il calcolo del checksum devo passare la stringa esatto?
6  International / Hardware / leggere carta regionale dei servizi on: March 08, 2013, 09:56:22 am
Ciao, vorrei leggere i dati dalla mia carta regionale dei servizi, ho fatto qualche tentativo ma la cosa è più complessa del previsto, almeno per me.
Ho questo lettore di card http://en.china-creator.com/product_show.asp?id=472 qui un po' di doc http://speedy.sh/sSebC/CRT-188-Specification.pdf. Ha un'interfaccia seriale con livelli logici TTL quindi posso collegarla direttamente ad Arduino e comunicare con esso.

Qualcuno ha esperienza in materia?

La prima operazione che stò provando a fare è il RESET, da quello che vedo http://speedy.sh/k3epD/CRT-Card-Reader-Communication-Protocal.pdf dovrei inviare il comando 0x02 0x00 0x02 0x30 0x30 0x03 BCC . Ho provato in questo modo
Code:
void setup() {
  Serial.begin(9600);
  Serial1.begin(9600);
}

void loop() {

  //et_prepareMessage();
  Serial1.write("02");
  Serial1.write("00");
  Serial1.write("02");
  Serial1.write("30");
  Serial1.write("30");
  Serial1.write("03");     
  Serial1.write(getCheckSum("0200020x300x300x03"));
 
  if (Serial1.available()) {
    int inByte = Serial1.read();
    Serial.write(inByte);
    Serial1.write('0x05');
  }
  delay(1000);
}

void et_prepareMessage() {
  buffer[0] = '0x02';
  buffer[1] = '0x00';
  buffer[2] = '0x02';
  buffer[3] = '0x30';
  buffer[4] = '0x30';
  buffer[5] = '0x03';
  buffer[6] =   getCheckSum(buffer);
}

int getCheckSum(char *string) {
  int i;
  int XOR;
  int c;
  // Calculate checksum ignoring any $'s in the string
  for (XOR = 0, i = 0; i < strlen(string); i++) {
    c = (unsigned char)string[i];
    if (c == '*') break;
    if (c != '$') XOR ^= c;
  }
  return XOR;
}
ma non ritorna niente.
Stò usando un arduino mega adk ed il lettore è collegato ai pin 18(TX1) e 19(RX1).
Qualcuno sa darmi qualche dritta?
Grazie
7  Using Arduino / Networking, Protocols, and Devices / Re: send data packet to serial on: March 08, 2013, 08:45:14 am
Hi, I made in this way
Code:
char buffer[7];

void setup() {
  Serial.begin(9600);
}

void loop() {
  delay(1000);
  et_prepareMessage();
  delay(200);
  Serial.write(buffer);
}

void et_prepareMessage() {

  buffer[0] = '0x02';
  buffer[1] = '0x00';
  buffer[2] = '0x02';
  buffer[3] = '0x30';
  buffer[4] = '0x30';
  buffer[5] = '0x03';
  buffer[6] =   getCheckSum(buffer);
}

uint8_t getCheckSum(char *string)
{
  int XOR = 0;
  for (int i = 0; i < strlen(string); i++)
  {
    XOR = XOR ^ string[i];
  }
  return XOR;
}
I declared the buffer globally, but the output on the serial is pretty strange, take a look at this screenshot

is it right?
Thank you
8  Using Arduino / Networking, Protocols, and Devices / send data packet to serial on: March 08, 2013, 07:29:13 am
Hi, I have to send this command to a serial device

0x02
0x00
0x02
0x30
0x30
0x03
BCC

i made in this way
Code:

void setup() {
  Serial.begin(9600);
}

void loop() {
  delay(1000);
  Serial.print(et_prepareMessage());
}

char* et_prepareMessage() {
  char buffer[7];
  buffer[0] = '0x02';
  buffer[1] = '0x00';
  buffer[2] = '0x02';
  buffer[3] = '0x30';
  buffer[4] = '0x30';
  buffer[5] = '0x03';
  buffer[6] =   getCheckSum(buffer);

  return buffer;
}

uint8_t getCheckSum(char *string)
{
  int XOR = 0;
  for (int i = 0; i < strlen(string); i++)
  {
    XOR = XOR ^ string[i];
  }
  return XOR;
}
is it correct?
I'm wondering this because by printing Serial.print(et_prepareMessage()); the result I can not see the hex string but some strange character.
Thank you
9  Using Arduino / Networking, Protocols, and Devices / Re: ic card reader and serial port on: March 08, 2013, 04:30:57 am
During last days I focused a bit my target, I need to read a smartcard based on ISO-7816 with that ic card reader. I googled a bit around but nothing clear, at least for me, could someone point me in the right direction?

Basically I should insert the card in the reader, send the reset command via arduino and read a specified memory section.

Is there any library to accomplish this?
Thank you
10  Using Arduino / Networking, Protocols, and Devices / Re: ic card reader and serial port on: March 04, 2013, 09:15:00 am
could you share some links?
11  Using Arduino / Networking, Protocols, and Devices / Re: ic card reader and serial port on: March 04, 2013, 08:25:44 am
If I'm not wrong the ic card reader has a RS-232 out with TTL level. Is it correct?
If it'is which is the best strategy to connect it to arduino?

As PaulS told I can not talk with the card reader and pc at the same time, but i need to print somewhere the data in order to verify the correct communication...how to achieve it?
Thank you
12  Using Arduino / Networking, Protocols, and Devices / ic card reader and serial port on: March 04, 2013, 03:28:03 am
Hi, I'm trying to read serial data from an ic card reader, as you can see here (last page)
http://speedy.sh/sSebC/CRT-188-Specification.pdf
it should be a TTL serial device so I wired directly into pin 0 (rx) and 1 (tx) of my arduino uno and with this code i suppose to read the serial data coming from the card reader
Code:
int incomingByte = 0;   

void setup() {
        Serial.begin(9600);   
}

void loop() {

        // send data only when you receive data:
        if (Serial.available() > 0) {
                // read the incoming byte:
                incomingByte = Serial.read();

                // say what you got:
                Serial.print("I received: ");
                Serial.println(incomingByte);
        }
}
but nothing goes through the serial, any hint? How can i debug it?
Thank you
13  Using Arduino / Networking, Protocols, and Devices / read rs232 from external device on: February 25, 2013, 05:28:49 am
Hi, I need to read some data from an external device that has a rs232 port.
I'm using Arduino Uno.
In order to accomplish this, I can use the pin 0(RX) and pin 1(TX) or I have to buy an rs232 shield?
Thank you
14  Topics / Home Automation and Networked Objects / Re: DomoticHome [Arduino - Android - WebApp] on: May 09, 2011, 07:51:49 am
right now just wiznet  is supported if someone want to translate the code for other shield i'll be happy to integrate it.
15  International / Generale / Re: Assorbimento Corrente on: March 28, 2011, 05:01:23 am
il ragionamento non fa una piega, un'osservazione, dato che l'intensità del campo magnetico è legata al numero delle spire e alla corrente che circola nel cavo da misurare non si può sovrastimare il numero di spire in modo da avere una tensione ai capi del solenoide maggiore? In modo che vada bene per tutte le applicazioni. Al massimo nel codice di arduino si divede il valore letto per un coefficiente che aggiusta la misurazione (una sorta di trimmer virtuale)
Pages: [1] 2 3 ... 10