Configuring PCAN-GPRS Link to point to a server
-
- Posts: 5
- Joined: Mon 3. Jun 2013, 12:26
Configuring PCAN-GPRS Link to point to a server
Hi,
How can I setup the PCAN-GPRS Link so that it points to our own server?
I am using Keil uVision and the GPRS-Link_example code.
Many thanks,
Arthur
How can I setup the PCAN-GPRS Link so that it points to our own server?
I am using Keil uVision and the GPRS-Link_example code.
Many thanks,
Arthur
-
- Hardware Development
- Posts: 87
- Joined: Fri 10. Sep 2010, 13:11
Re: Configuring PCAN-GPRS Link to point to a server
Hello Arthur,
the easiest way to modify and save the server settings is to connect the GPRS-Links external UART to you PC and change the settings via commands.
Send a '?' followed by a carriage return to see the available command and then use mg commands to modify the settings. When all values are adept you can save them to the eeprom by using the 'rg' command.
After during initialization the GPRS-Link will read the configuation from the eeprom and store it in the structure "S_GPRS_COMM g_gprs_comm" (see config.c line 206 and 245).
If you'd like to store fixed data in the code you might also disable this automatic read procedures and adept the content of the structure manually.
Best Regards,
Stephan
the easiest way to modify and save the server settings is to connect the GPRS-Links external UART to you PC and change the settings via commands.
Send a '?' followed by a carriage return to see the available command and then use mg commands to modify the settings. When all values are adept you can save them to the eeprom by using the 'rg' command.
After during initialization the GPRS-Link will read the configuation from the eeprom and store it in the structure "S_GPRS_COMM g_gprs_comm" (see config.c line 206 and 245).
If you'd like to store fixed data in the code you might also disable this automatic read procedures and adept the content of the structure manually.
Best Regards,
Stephan
-
- Posts: 5
- Joined: Mon 3. Jun 2013, 12:26
Re: Configuring PCAN-GPRS Link to point to a server
Hi Stephan,
I've tried using windows hyperterminal to connect to the hardware via the serial port, I get the following readout.
PCAN>Firmware version 1.6.2
0
+WIND: 3
+WIND: 13
+CREG: 0
+WIND: 0
AT+WIMEI?
+WIMEI: xxxxxxxxxxxxxx
OK
When I send a ? followed by a carriage return I don't get a command list. I've tried various setting in hyperterminal and nothing seems to help. Am I doing something wrong?
thanks.
Arthur
I've tried using windows hyperterminal to connect to the hardware via the serial port, I get the following readout.
PCAN>Firmware version 1.6.2
0
+WIND: 3
+WIND: 13
+CREG: 0
+WIND: 0
AT+WIMEI?
+WIMEI: xxxxxxxxxxxxxx
OK
When I send a ? followed by a carriage return I don't get a command list. I've tried various setting in hyperterminal and nothing seems to help. Am I doing something wrong?
thanks.
Arthur
-
- Hardware Development
- Posts: 87
- Joined: Fri 10. Sep 2010, 13:11
Re: Configuring PCAN-GPRS Link to point to a server
Hi Arthur,
unfortunately I'm not familiar to windows hyperterminal so I can't provide you help with the settings. The baude rate settings seem to be ok (115,2k 8N1) cause you can see the right output. Some terminal programs have the possibility to define if a CR, an LF or a CRLF is sent when return is pressed. Please make sure the CR or CRFL is used.
If you are not using the default example software please also make sure that the debug_task is called cyclic. It handles the incoming commands.
Even if you sent only a CR the response “PCAN><\r><\n>” should be echoed.
Best Regards,
Stephan
unfortunately I'm not familiar to windows hyperterminal so I can't provide you help with the settings. The baude rate settings seem to be ok (115,2k 8N1) cause you can see the right output. Some terminal programs have the possibility to define if a CR, an LF or a CRLF is sent when return is pressed. Please make sure the CR or CRFL is used.
If you are not using the default example software please also make sure that the debug_task is called cyclic. It handles the incoming commands.
Even if you sent only a CR the response “PCAN><\r><\n>” should be echoed.
Best Regards,
Stephan
-
- Posts: 5
- Joined: Mon 3. Jun 2013, 12:26
Re: Configuring PCAN-GPRS Link to point to a server
Hi Stephan,
I've still not had any success. I've tried 2 other software on the "PCAN-GPRS_Link", CD HTerm and Tera Term. As before, I can receive data but when I send data to the hardware I don't get a response.
I have tried various versions of firmware too, including the one directly from "PCAN-GPRS_Link_ExampleProjekt_V1.6.2.zip". I also checked that debug_task() is being called and it is.
I've even tried another machine in case it's my port that is faulty.
Is there anything else I can do? I'm lost for ideas at the moment.
thanks.
Arthur
I've still not had any success. I've tried 2 other software on the "PCAN-GPRS_Link", CD HTerm and Tera Term. As before, I can receive data but when I send data to the hardware I don't get a response.
I have tried various versions of firmware too, including the one directly from "PCAN-GPRS_Link_ExampleProjekt_V1.6.2.zip". I also checked that debug_task() is being called and it is.
I've even tried another machine in case it's my port that is faulty.
Is there anything else I can do? I'm lost for ideas at the moment.
thanks.
Arthur
-
- Hardware Development
- Posts: 87
- Joined: Fri 10. Sep 2010, 13:11
Re: Configuring PCAN-GPRS Link to point to a server
Hi Arthur,
well since the external UART on the unit is used during its initial firmware flashing process the only thing I could imagine is a broken cable. May you please check if the all three pins on RS232 plug (Rx, Tx and GND) are connected to the right pins of the automotive connector (pins 22, 11, 2/15 see p. 10 of the manual).
Best Regards,
Stephan
well since the external UART on the unit is used during its initial firmware flashing process the only thing I could imagine is a broken cable. May you please check if the all three pins on RS232 plug (Rx, Tx and GND) are connected to the right pins of the automotive connector (pins 22, 11, 2/15 see p. 10 of the manual).
Best Regards,
Stephan
-
- Posts: 5
- Joined: Mon 3. Jun 2013, 12:26
Re: Configuring PCAN-GPRS Link to point to a server
Hi Stephan,
We tested out the cable by checking the 3 pins using a voltage meter. They are all working and are connected correctly. We also connected one end of the cable to a usb adapter with the other via serial as normal and ran two hyperterminals and we can send and receive on either side.
The PCAN-GPRS Link we bought also has a bluetooth expansion, we were wondering if this has affected the communication? In the UART.H file, it says that UART3 is used for Bluetooth as well as the serial port. We removed the expansion but it still didn't make a difference, however, is there something on the main board that is preventing it from receiving data via UART3 on serial, has it been configured for the bluetooth module?
Using the BT_Read() (BT_LOW.H) command we have been able to read data via hyperterminal to the PCAN GRPS Link (and then send back the data), I have also tried using the UART_read() command (not in the bluetooth environment) but not been successful.
Concerning the bluetooth example code, it doesn't accept commands either, I noticed debug_task and debug_init were commented, I uncommented these but it didn't work.
I was wondering if you be able to send me firmware known to accept commands via serial port, this would rule out the code being the problem if it still didn't work?
Thanks,
Arthur
We tested out the cable by checking the 3 pins using a voltage meter. They are all working and are connected correctly. We also connected one end of the cable to a usb adapter with the other via serial as normal and ran two hyperterminals and we can send and receive on either side.
The PCAN-GPRS Link we bought also has a bluetooth expansion, we were wondering if this has affected the communication? In the UART.H file, it says that UART3 is used for Bluetooth as well as the serial port. We removed the expansion but it still didn't make a difference, however, is there something on the main board that is preventing it from receiving data via UART3 on serial, has it been configured for the bluetooth module?
Using the BT_Read() (BT_LOW.H) command we have been able to read data via hyperterminal to the PCAN GRPS Link (and then send back the data), I have also tried using the UART_read() command (not in the bluetooth environment) but not been successful.
Concerning the bluetooth example code, it doesn't accept commands either, I noticed debug_task and debug_init were commented, I uncommented these but it didn't work.
I was wondering if you be able to send me firmware known to accept commands via serial port, this would rule out the code being the problem if it still didn't work?
Thanks,
Arthur
-
- Posts: 5
- Joined: Mon 3. Jun 2013, 12:26
Re: Configuring PCAN-GPRS Link to point to a server
Hi Stephan,
For clarity, the pins tested were,
2 --> 21
3 --> 22
5 --> 15
Where the left pin number is the 9pin DType serial port.
Kind regards,
Arthur
For clarity, the pins tested were,
2 --> 21
3 --> 22
5 --> 15
Where the left pin number is the 9pin DType serial port.
Kind regards,
Arthur
-
- Hardware Development
- Posts: 87
- Joined: Fri 10. Sep 2010, 13:11
Re: Configuring PCAN-GPRS Link to point to a server
Hi Arthur,
well, that changes everything. On GPRS Link units with Bluetooth extension the Rx side of the external UART is connected to the extension board but not longer to the automotive connector! So it is not available for useage. Therefor a resistor on the baseboard is soldered to other pads. It is not enough to remove the expansion.
You are right. Since all the debug_xxx() would need exclusive access to the same UART as the bluetooth related functions debug task can't be used on modules with bluetooth extension.
If you'd like to use the external UART instead please send me an e-mail containing the serial number of your unit so that I can send you a small explanation how to alter your hardware.
Best Regards,
Stephan
well, that changes everything. On GPRS Link units with Bluetooth extension the Rx side of the external UART is connected to the extension board but not longer to the automotive connector! So it is not available for useage. Therefor a resistor on the baseboard is soldered to other pads. It is not enough to remove the expansion.
You are right. Since all the debug_xxx() would need exclusive access to the same UART as the bluetooth related functions debug task can't be used on modules with bluetooth extension.
If you'd like to use the external UART instead please send me an e-mail containing the serial number of your unit so that I can send you a small explanation how to alter your hardware.
Best Regards,
Stephan