Commit Graph

1127 Commits

Author SHA1 Message Date
Matteo Cypriani 5fb93d9dd3 [Listener] Get MAC and IP, then launch threads
Operation order is better that way, because autocalibrate_hello() needs
to know MAC and IP addresses of the AP.
2011-03-16 14:52:57 +01:00
Matteo Cypriani c17af1cf95 [Client] Add Makefile_atheros
And tweak Makefile.
2011-03-16 14:52:57 +01:00
Matteo Cypriani 6cbbcc957b [Listener] Update configuration display
Configuration display when not using libconfuse was outdated.
2011-03-16 14:52:57 +01:00
Matteo Cypriani 737630b8c9 [Listener] Add option -V
The new option -V displays the compilation-time options. In the future,
it should display the version number.

When the user calls the program either with -h or the new option -V, we
do not try any more to open and parse the configuration file (which was
useless since -h, and now -V, exit the program).
2011-03-16 14:52:57 +01:00
Matteo Cypriani 3c0f74fcb3 [Listener] Fix strict-aliasing rule warning 2011-03-16 14:52:57 +01:00
Matteo Cypriani ed7828a339 [Listener] Fix OWLPSFLAGS in Makefiles
Makefiles declared an OWLPSFLAGS variable for compilation-time option,
but did not include it in the compilation command. This is now fixed.
2011-03-16 14:52:57 +01:00
Matteo Cypriani 10e3bb7ab0 [Listener] Fix compilation without pthreads 2011-03-16 14:52:57 +01:00
Matteo Cypriani 58568e276a [i-c] Fix Atheros Makefiles
Add Makefile_atheros for libowlps-client.
Fix Makefile_atheros for listener.
2011-03-16 14:52:57 +01:00
Matteo Cypriani f804855309 [Aggregator] Send order to APs
Add options -C and -K.

Rename default autocalibration values in aggregator and listener.
2011-03-16 14:52:56 +01:00
Matteo Cypriani f35170173a [Aggregator] Standardise function's head comments 2011-03-16 14:52:56 +01:00
Matteo Cypriani 074cd5a27a [Aggregator] Handle AP IP address (from Hello) 2011-03-16 14:52:56 +01:00
Matteo Cypriani fe0ea4bcdc [i-c] Update Makefile
Add libowlps-client building and update old code.
2011-03-16 14:52:56 +01:00
Matteo Cypriani eff2455897 [Listener] Send IP in Hello messages 2011-03-16 14:52:56 +01:00
Matteo Cypriani 4b2fbf3188 [Aggregator] Refactoring 2011-03-16 14:52:56 +01:00
Matteo Cypriani d51f136d70 [Listener] Send & receive autocalibration requests 2011-03-16 14:52:56 +01:00
Matteo Cypriani 729c20c8ff [Aggregator] Receive hello messages from listener 2011-03-16 14:52:56 +01:00
Matteo Cypriani c583e0bb54 [Listener] Prepare autocalibration
Send hello messages to the aggregator.
2011-03-16 14:52:56 +01:00
Matteo Cypriani 790c9bdaf7 [Aggregator] Handle AP list 2011-03-16 14:52:56 +01:00
Matteo Cypriani 2d447298d9 [Aggregator] Rewrite free_couple_list() 2011-03-16 14:52:56 +01:00
Matteo Cypriani 2c4b182aa7 [Aggregator] Delete 'couples' argument
The couple list 'couples' is a global variable, so it is useless to pass
it as an argument to the functions.
2011-03-16 14:52:56 +01:00
Matteo Cypriani 96fb99c951 [lib] Some translation & minor things 2011-03-16 14:52:56 +01:00
Matteo Cypriani ac6998d798 [Client] Rename packet variables 2011-03-16 14:52:55 +01:00
Matteo Cypriani dcdab12c27 [lib-client] Fix interface, rename variables
Parameter 'iface' of the function owlps_create_socket_to_aggregator()
can now be NULL.

Use variable name 'packet' instead of 'buf'.
2011-03-16 14:52:55 +01:00
Matteo Cypriani 2150dc1cde [Listener] Use lib-client to create output socket 2011-03-16 14:52:55 +01:00
Matteo Cypriani d6a75a10fc [Listener] Use global variables for the socket
+ Do not use sub-function got-packet() anymore in function capture():
read_packet() is called directly.
2011-03-16 14:52:20 +01:00
Matteo Cypriani 45258e9f4c [Client] Create libowlps-client from owlps-client
Move code related to sending requests into the new library
libowlps-client. This library will also be used by the listener to send
autocalibration requests.
Currently, it is statically linked because a dynamic linking should be
useless (because client and listener aren't normally on the same
machine).
2011-03-16 14:52:20 +01:00
Matteo Cypriani ec566286b4 [Client] Fix usage printing
Print default values for delay and number of packets.
2011-03-16 14:51:18 +01:00
Matteo Cypriani f8f6e51dd6 [Client] Refactor code 2011-03-16 14:51:18 +01:00
Matteo Cypriani 6ce8d695b0 [Client] Add -h option 2011-03-16 14:51:18 +01:00
Matteo Cypriani e992159810 [Client] Refactor argument parsing code 2011-03-16 14:51:18 +01:00
Matteo Cypriani 3e80537c73 [Client] Translation of comments, 72 col. 2011-03-16 14:51:18 +01:00
Matteo Cypriani a0be0f5bef [Listener] Refactor configuration code 2011-03-16 14:51:17 +01:00
Matteo Cypriani 7aa0b65f72 [Listener] Add -h option 2011-03-16 14:51:17 +01:00
Matteo Cypriani 5eb11af87f [Listener] Translation of comments, 72 col. 2011-03-16 14:51:17 +01:00
Matteo Cypriani 7f262a8573 [Aggregator] Handle confuse errors as in listener 2011-03-16 14:51:17 +01:00
Matteo Cypriani 4117e8dc14 [Aggregator] Add -h option 2011-03-16 14:51:17 +01:00
Matteo Cypriani 417452a7ad [Aggregator] Translation of comments, 72 col. 2011-03-16 14:51:17 +01:00
Matteo Cypriani 1863bd9e9f [Aggregator] Code refactoring (conf parsing, loop) 2011-03-16 14:51:17 +01:00
Matteo Cypriani a955467c83 [Aggregator] Revert DB-related code
Revert database-related code introduced in
  b7823a52 Reconstitution du dépôt, étape 5 (et dernière)
2011-03-16 14:51:17 +01:00
Matteo Cypriani 4473b0dd3a [lib] Fix makefiles: generate symlink libowlps.so
Symbolic link libowlps.so is required to dynamically compile, if
"-lowlps" is used instead of "../../libowlps/libowlps.so.1.0" (which is
now the case in the listener's makefiles, and will be soon for the
others too).
2011-03-16 14:51:17 +01:00
Matteo Cypriani 12cf7e7cda [Listener] Use compiler option -D
Fix Makefiles to use -D to activate the use of pthreads and libconfuse.
Comment out #defines in owlps-listener.h.

Fix lib order (needed for the static target).
2011-03-16 14:51:17 +01:00
Matteo Cypriani bd789cd4a1 [Listener] Fix compilation on Atheros
Makefile_atheros:
- Add target 'static' to compile fully statically. (Note: does not
  work in the OpenWRT 8.09 cross-compilation suite, since it does not
  provide libiw.a)
- Add target 'semistatic', that compiles with static libowlps and
  dynamic libiw and libpcap.

Fix (mostly) endianess issues:
- le32toh() is defined only in glibc >= 2.9, so owlps-listener did not
  compile with older glibc or other libc (such as uClibc that we use to
  cross-compile to OpenWRT).
  We now define le32toh() manually, if needed.
- Additionally, the PLATFORM_ATHEROS define is removed. We should now
  test the value of __BYTE_ORDER if needed.
2011-03-16 14:51:16 +01:00
Matteo Cypriani b35a0e1e7c [Listener] Endianess (finish) 2011-03-16 14:51:16 +01:00
Matteo Cypriani 257837962e Makefile Atheros (listener & libowlps)
Last (uncommited) changes in the SVN repo (2/2):
- Add/modify Makefile_atheros for libowlps and owlps-listener.
2011-03-16 14:51:16 +01:00
Matteo Cypriani f8ff9f6794 [Listener] Endianess (beginning)
Last (uncommited) changes in the SVN repo (1/2):
- Endianess in owlps-listener : use of le32toh().
         /!\ *Not* sure it works ! /!\
2011-03-16 14:50:41 +01:00
Matteo Cypriani 1fb6e39d27 [Positioning] Handle AP reading from a CSV file
Add class AccessPointsReaderCSV and make InputDataReader to use it.

Stock: Add function find_create_ap(const AccessPoint&).
2011-03-16 14:36:24 +01:00
Matteo Cypriani 29ce5a51af [Positioning] Stock: reorganise with Doxygen groups 2011-03-16 14:36:24 +01:00
Matteo Cypriani 6f0c0af5be [Positioning] PosUtil::wifi_channel_to_hz(): throw exception
posexcept: Add exception bad_channel.

PosUtil::wifi_channel_to_hz() now throw bad_channel if the argument is
not a valid channel nor a 802.11 frequency value in Hz.
2011-03-16 14:36:24 +01:00
Matteo Cypriani 338e4f7dcd [Positioning] Code cleaning around CSV data reading
CSVFileReader: Add function read_point3d().

Point3D: Add function set_coordinates(float[3]).

posexcept: Rename malformed_topology -> malformed_input_data.

TopologyReaderCSV:
- Use CSVFileReader::read_point3d() instead of the custom read_point().
- Rename occurrences of malformed_topology.
2011-03-16 14:36:24 +01:00
Matteo Cypriani 2347657d08 [Positioning] Clean config files
Delete access_points.cfg and accesspoints.cfg.
Delete owlps-positioning.conf, add owlps-positioning.cfg.
minips.cfg becomes minipc.csv.
2011-03-16 14:36:24 +01:00