|
Open AT |
|
|
2 страниц
1 2 >
|
 |
Ответов
(1 - 18)
|
Apr 2 2008, 09:21
|
Участник

Группа: Новичок
Сообщений: 26
Регистрация: 19-03-08
Пользователь №: 36 045

|
Цитата(sobr @ Apr 1 2008, 13:42)  ЗАРАБОТАЛО!!!  Хм... Чето не могу найти как из программы обратиться к записной книжке сим карты, только ввод пин кода и чтение статуса карты... Мож кто знает? Значит их нет. Обмен через АТ команды. Это конечно напрягает. Но если бы они еще делали дублирование через OpenAT то размер операционки здорово увеличился.
|
|
|
|
|
Apr 2 2008, 10:30
|

Знающий
   
Группа: Свой
Сообщений: 926
Регистрация: 18-01-07
Пользователь №: 24 552

|
Есть два буффера: Код void * a; u16 b[160] Как мне b в a отправить?
|
|
|
|
|
Apr 2 2008, 13:38
|
Участник

Группа: Новичок
Сообщений: 26
Регистрация: 19-03-08
Пользователь №: 36 045

|
Цитата(sobr @ Apr 2 2008, 12:28)  Прикольно, а как же тогда обходиться без внешнего контроллера, как призывают приверженцы Wavecom`а? Мало курил документации, почитай про adl_atCmdCreate Цитата(sobr @ Apr 2 2008, 13:30)  Есть два буффера: Код void * a; u16 b[160] Как мне b в a отправить? БРррр. А в каком собственно контексте? ) void * a - разыменованный указатель. указатель на любимый размер памяти. Вещь воще то стремная. Используется для ленивых, например если функция имеет в параметре структуру void My_func(Tstruct *struct); То можно вызвать ее с разыенованием типа unsigned char tempBuf[13]; My_func((void*)tempBuf)
|
|
|
|
|
Apr 2 2008, 13:52
|

Знающий
   
Группа: Свой
Сообщений: 926
Регистрация: 18-01-07
Пользователь №: 24 552

|
Цитата(de__ @ Apr 2 2008, 20:38)  Мало курил документации, почитай про adl_atCmdCreate Согласен, мало, но курю не переставая... Цитата БРррр. А в каком собственно контексте? Осваивал этот пример... Код void*StreamBufferPlay;
adl_audioStreamPlay ( play_resource_Handle, ADL_AUDIO_PCM_MONO_8K_16B , appPlayLowIrqHandle, appPlayHighIrqHandle, StreamBufferPlay); В итоге сделал так: Код u16 StreamBufferPlay[160];
adl_audioStreamPlay ( play_resource_Handle, ADL_AUDIO_PCM_MONO_8K_16B , appPlayLowIrqHandle, appPlayHighIrqHandle, StreamBufferPlay);
|
|
|
|
|
Apr 2 2008, 14:31
|
Участник

Группа: Новичок
Сообщений: 26
Регистрация: 19-03-08
Пользователь №: 36 045

|
Имелось в виду что функция принимает параметр - указатель на void.
то есть чтобы не ругался компилятор нужно привести тип u16 StreamBufferPlay[160];
adl_audioStreamPlay ( play_resource_Handle, ADL_AUDIO_PCM_MONO_8K_16B , appPlayLowIrqHandle, appPlayHighIrqHandle, (void*)StreamBufferPlay);
или сразу попробовать void StreamBufferPlay[160];
adl_audioStreamPlay ( play_resource_Handle, ADL_AUDIO_PCM_MONO_8K_16B , appPlayLowIrqHandle, appPlayHighIrqHandle, StreamBufferPlay);
Сообщение отредактировал de__ - Apr 2 2008, 14:31
|
|
|
|
|
Apr 4 2008, 12:31
|
Участник

Группа: Новичок
Сообщений: 26
Регистрация: 19-03-08
Пользователь №: 36 045

|
По логике вещей такого быть не может. Если бы это был просто контроллер, то можно было указать линковщику подключить начиная с определенного адреса такой то файл. И в основной программе просто считывать память программ. Здесь же приложение и надо разбираться с форматом бинарника. Остается написать виндовую программку хавающую ваш файл и выплевывающая красивый исходник с константами ) Несколько лет назад баловался с набором разработчика WizNet. Там корейцы сделали программку которая берет html странички с картинками и выдает исходник.
|
|
|
|
|
Apr 5 2008, 13:37
|
Участник

Группа: Новичок
Сообщений: 26
Регистрация: 19-03-08
Пользователь №: 36 045

|
в моем q24plus, кажется, 768 кБ
|
|
|
|
|
Apr 10 2008, 13:10
|

Знающий
   
Группа: Свой
Сообщений: 926
Регистрация: 18-01-07
Пользователь №: 24 552

|
Не получается попасть в AudioHandler: Код #include "adl_global.h"
const u16 wm_apmCustomStackSize = 1024; s32 handle; s32 BufferSize; u16 BufPlay[160]; s32 appPlayLowIrqHandle = 0;
void AudioHandler( s32 audioHandle, adl_audioEvents_e Event ) //add events { //???????????????????????????????????????????????????????? adl_atSendResponse( ADL_AT_INT,"!!!\r\n" ); return; } bool appPlayLowIrqHandler( adl_irqID_e Source, adl_irqNotificationLevel_e NotificationLevel, adl_irqEventData_t *Data ) { if (/*Признак окончания трека*/) { adl_audioStop(handle); return 0; } else { *( ( adl_audioStream_t * )Data->SourceData )->BufferReady = TRUE; return 0; } }
void adl_main ( adl_InitType_e InitType ) { appPlayLowIrqHandle = adl_irqSubscribe ( appPlayLowIrqHandler, ADL_IRQ_NOTIFY_LOW_LEVEL, ADL_IRQ_PRIORITY_LOW_LEVEL, 1 ); handle=adl_audioSubscribe ( ADL_AUDIO_VOICE_CALL_TX , AudioHandler, ADL_AUDIO_RESOURCE_OPTION_FORBID_PREEMPTION ); adl_audioGetOption( handle,ADL_AUDIO_PCM_8K_16B_MONO_BUFFER_SIZE , &BufferSize ); adl_audioStreamPlay ( handle, ADL_AUDIO_PCM_MONO_8K_16B , appPlayLowIrqHandle, 0, BufPlay); } Если в BufPlay писать, то трек воспроизводиться до того момента пока признака окончания нет, но в AudioHandler не попадаю. Ткните носом плз...
|
|
|
|
|
Apr 10 2008, 13:27
|
Участник

Группа: Новичок
Сообщений: 26
Регистрация: 19-03-08
Пользователь №: 36 045

|
У меня модем проще, работы со звуком нет. а что за парметр adl_atSendResponse( ADL_AT_INT,"!!!\r\n" ); может быть ADL_PORT_UART1? А вы брейкпоинт на обработчик ставили?
|
|
|
|
|
Apr 11 2008, 02:40
|

Знающий
   
Группа: Свой
Сообщений: 926
Регистрация: 18-01-07
Пользователь №: 24 552

|
Цитата(de__ @ Apr 10 2008, 20:27)  У меня модем проще, работы со звуком нет. а что за парметр adl_atSendResponse( ADL_AT_INT,"!!!\r\n" ); может быть ADL_PORT_UART1? А вы брейкпоинт на обработчик ставили? Код This function sends the provided text to any external application connected to the required port, as a response, an unsolicited response or an intermediate response, according to the requested type. • Prototype s32 adl_atSendResponse (u16 Type, ascii * String ) • Parameters Type: This parameter is composed of the response type, and the destination port where to send the response. The type & destination combination has to be done with the following macro: ADL_AT_PORT_TYPE ( _port, _type ) The _port argument has to be a defined value of the adl_atPort_e type, and this required port has to be available (cf. the AT/FCM port Service); sending a response on an Open AT® the GSM or GPRS based port will have no effects). Note: With the ADL_AT_UNS type value, if the ADL_AT_PORT_TYPE macro is not used, the unsolicited response will be broadcasted on all currently opened ports. If the ADL_AT_PORT_TYPE macro is not used with the ADL_AT_RSP & ADL_AT_INT types, responses will be by default sent on the UART 1 port. If this port is not opened, responses will not be displayed. The _type argument has to be one of the values defined below: o ADL_AT_RSP: Terminal response (have to ends an incoming AT command). A destination port has to be specified. Sending such a response will flush all previously buffered unsolicited responses on the required port. o ADL_AT_INT: Intermediate response (text to display while an incoming AT command is running). A destination port has to be specified. Sending such a response will just display the required text, without flushing all previously buffered unsolicited responses on the required port. API AT Commands Service © Confidential Page: 50 / 365 This document is the sole and exclusive property of Wavecom. Not to be distributed or divulged without prior written agreement. WM_DEV_OAT_UGD_060 - 003 December 17, 2007 o ADL_AT_UNS: Unsolicited response (text to be displayed out of a currently running command process). For the required port (if any) or for each currently opened port (if the ADL_AT_PORT_TYPE macro is not used), if an AT command is currently running (ie. the command was sent by the external application, but this command answer has not be sent back yet), any unsolicited response will automatically be buffered, until a terminal response is sent on this port. String: The text to be sent. Please note that this is exactly the text string to be displayed on the required port (ie. all carriage return & line feed characters ("\r\n" in C language) have to be sent by the application itself). • Returned values o ADL_RET_ERR_SERVICE_LOCKED if the function was called from a low level interrupt handler (the function is forbidden in this context). o OK if the function is successfully executed.
|
|
|
|
2 чел. читают эту тему (гостей: 2, скрытых пользователей: 0)
Пользователей: 0
|
|
|