Jump to content


GCS Udp - wifi module


  • Please log in to reply
3 replies to this topic

#1 metRo_

metRo_

    Key Member

  • Members
  • PipPipPip
  • 450 posts
  • LocationAmarante (Porto)
  • Country: flag of Portugal Portugal


Posted 24 November 2011 - 11:43 PM

I'm using RN-174 to get the telemetry data via WiFi.


The WiFi module(act as access point) connected to CC have the IP 169.254.1.1 and listen for UDP connections in PORT 2000. The PC, connected to wifi module, have the IP 169.254.1.2.

Cheking the connection with wireshark and get the following bytes from PC to wifi module:
3c 22 1d 00 e4 46 c3 b6 01 00 00 f0 42 00 00 00 00 ad 01 00 00 00 00 00 00 60 03 00 00 15

Checking wiki(need to update it) and 0x3c is the sync value, 22 OBJ_ACK v2, 1d 00 ( i think that is 00 1d) = 29 size of the payload without the checksum... so from the pc to wifi module (connect to CC via serial) the data is ok.

From the module to PC i just receive:
40 ff 00

Disconnect the CC tx pin in the module and stop to receive data from the module in PC so i suppose that 40 ff 00 comes from CC.

Printscreen of configuration in GSC:
Posted Image

Printscreen of comunication in wireshark:
   -wifi module to PC
Posted Image

   -GCS to wifi module
Posted Image

Any suggestion of the problem?

PS: next use my Open Logic Sniffer to guarantee that CC is receiving the correct data.
Feel free to correct my english, you can post or pm me, thanks :)

#2 Andrew

Andrew

    Core Developer

  • Members
  • PipPipPip
  • 123 posts
  • Country: flag of United States United States

Posted 25 November 2011 - 02:30 AM

Have you plugged the cc in via USB and confirmed it is good?

It is worth checking the telemetry serial baud rate configured on the cc whilst you have the USB connected.

I believe it defaults to 57600 and Your previous post indicated you had the wifi module set to 9600.



#3 metRo_

metRo_

    Key Member

  • Members
  • PipPipPip
  • 450 posts
  • LocationAmarante (Porto)
  • Country: flag of Portugal Portugal


Posted 25 November 2011 - 09:34 AM

View PostAndrew, on 25 November 2011 - 02:30 AM, said:

Have you plugged the cc in via USB and confirmed it is good?

It is worth checking the telemetry serial baud rate configured on the cc whilst you have the USB connected.

I believe it defaults to 57600 and Your previous post indicated you had the wifi module set to 9600.

The CC is working via USB.
I configured CC telemetry port to 9600 baud rate, i'll reset the CC and set the wifi module baud rate the same as CC default.
Feel free to correct my english, you can post or pm me, thanks :)

#4 metRo_

metRo_

    Key Member

  • Members
  • PipPipPip
  • 450 posts
  • LocationAmarante (Porto)
  • Country: flag of Portugal Portugal


Posted 25 November 2011 - 10:26 PM

Set the module to 57600 and in wireshark can see some messages from CC:


Example:
GCS -> Wifimodule = 3c 22 1d 00 e4 46 c3 b6 01 00 00 b4 42 00 00 00 00 1a 03 00 00 05 00 00 00 3a 06 00 00 4e

wifimodule -> GCS = 3c 23 08 00 e4 46 c3 b6 1b
wifimodule -> GCS = 3c 22 1d 00 e8 b7 75 3f 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 6a

But looking at wireshark and the destination port of packet send by module is different from the the source port of packets send by GCS :s I already know this issue but didn't remember, will try edit GCS to bind a port.
Feel free to correct my english, you can post or pm me, thanks :)