Radio Simulator
The emulator simulates the telephone and GPS radio hardware at the lowest level. The software stack that supports the radio is identical to that in a real device, allowing you to perform real tests with fake radio events with confidence that your application will behave the same on the device.
The luna-send Command
You can send radio events to the emulator by using the luna-send command from within a novaterm or ssh session. The URL parameter specifies the type of event, and a subsequent JSON object provides data for the event.
Syntax
luna-send -n 1 <URL> <JSON object>
Examples
The following are examples of the luna-send command-line tool:
-
Generate an incoming phone call:
luna-send -n 1 luna://com.palm.pmradiosimulator/set_incomingcall {\"number\":\"14086177431\"} -
Generate an incoming SMS:
luna-send -n 1 luna://com.palm.pmradiosimulator/set_incomingsms {\"number\":\"4086177431\",\" message\":\"'Virtura Reality'\"} -
Generate a GPS fix:
luna-send -n 1 luna://com.palm.pmradiosimulator/set_position {\"lat\":\"37.3\",\"long\":\"-122\"} -
Change the operator name (on the next power cycle):
luna-send -n 1 luna://com.palm.pmradiosimulator/set_operator {\"operator\":\"Sprint\"}
GPS AutoDrive
AutoDrive is a feature that allows you to simulate a GPS Route over any LBS application, such as Google Maps, on the HP webOS SDK. The GPS Route is contained in a .csv database file that can be generated in real-time—by using your Palm smartphones, for example.
Commands for GPS AutoDrive
-
Start AutoDriving
Starts up auto-driving based on the .csv route provided. If none is provided, Virtura loads the file
"/var/lib/til/AutoDrive_DefaultRoute.csv".luna-send -n 1 luna://com.palm.pmradiosimulator/autodrive/start {} -
Stop AutoDrive Mode
Stops the autodrive and puts the default fix back at Palm Sunnyvale.
luna-send -n 1 luna://com.palm.pmradiosimulator/autodrive/stop {} -
Reverse AutoDrive
Reverses the direction of an ongoing drive. When the drive ends, it auto-reverses.
luna-send -n 1 luna://com.palm.pmradiosimulator/autodrive/reverse {} -
Pause AutoDrive
Pauses the drive and returns constant GPS fixes from the pause point.
luna-send -n 1 luna://com.palm.pmradiosimulator/autodrive/pause {} -
Resume AutoDrive
Resumes the drive from the pause point.
luna-send -n 1 luna://com.palm.pmradiosimulator/autodrive/resume {} -
Speed Up AutoDrive
Speeds up your drive by a factor of two, by skipping index points. Speeds up to four levels.
luna-send -n 1 luna://com.palm.pmradiosimulator/autodrive/speedup {} -
Slow Down AutoDrive
Rejoins the index points to slow the autodrive.
luna-send -n 1 luna://com.palm.pmradiosimulator/autodrive/slowdown {} -
Set your own GPS Route for Simulation
Uses a specified .csv file for AutoDrive. The file contains the satellite data received from GPS fixes that the device records. Each row is a single GPS fix. Each column stands for a particular GPS fix attribute. The first line is a header row.
At the end of every row is data from up to ten satellites. The length of the row varies depending on satellite availability. For more information about the format of the .csv file, see GPS CSV Route File on the Location Service page.
AutoDrive_DefaultRoute.csvis the default AutoDrive route pre-loaded on the emulator. You can create additional files by GPS logging on a real device, and then copying these files to the emulator for use with luna-send.luna-send -n 1 luna://com.palm.pmradiosimulator/autodrive/set_route \ {\"route\":\"/var/lib/MyGpsRoute.csv\"}