Radio Simulator
On the Emulator, you can simulate 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 tests with fake radio events and data and be confident your app will behave the exact same way on the device.
Using luna-send to Generate Radio Events
From a device shell on the Emulator, you can use the luna-send utility to call radio simulator service (com.palm.pmradiosimulator) methods on the device bus to generate radio events. The luna-send URL parameter specifies the service method, and a subsequent JSON object provides event data.
Examples
- 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 (Location Based Service) application, such as Google Maps, on the HP webOS SDK. The GPS Route is contained in a .csv database file that you can generate in real-time— using a HP webOS smartphone, 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 HP 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\"}