Read Bebop memory from SkyController 2


#1

Product: [SkyController2 + Bebop / SkyController2 + Bebop2]
SkyController2 version: [1.0.4] + Bebop version: [3.3.0]
SDK version: [3.11]
Use of libARController: [YES]
SDK platform: [iOS]
Reproductible with the official app: [NO]

I’m using in iOS the SDCardModule.m/h class in order to read from Bebop’s memory.
I use it with success connecting my phone directly to Bebop and also through SkyController 1.
I can’t read Bebop’s memory through SkyController 2.
Can you help me, perhaps modifying that class in order to work also with SkyController 2?
Thank you!


#2

Hi,

Are you creating the ftp managers like it is done in the SkyController 2 part of the sample?

If yes, could you try to do it with the unmodified sample and tell us if it is working?

Regards,
Djavan


#3

Thank you Djavan!
I will try! Thank you!


#4

I’ve just checked! It was my problem!
I use a single class for Bebop, SkyController 1 and 2.
I fixed with this in function createSDCardModule:

- (void)createSDCardModule {
    eARUTILS_ERROR ftpError = ARUTILS_OK;
    ARUTILS_Manager_t *ftpListManager = NULL;
    ARUTILS_Manager_t *ftpQueueManager = NULL;
    NSString *ip = nil;
    
    if (self.product == ARDISCOVERY_PRODUCT_SKYCONTROLLER_2)
    {
        ftpListManager = ARUTILS_Manager_New(&ftpError);
        if(ftpError == ARUTILS_OK) {
            ftpQueueManager = ARUTILS_Manager_New(&ftpError);
        }
        
        if(ftpError == ARUTILS_OK) {
            ftpError = ARUTILS_Manager_InitWifiFtpOverMux(ftpListManager, NULL, FTP_PORT, ((ARUSBService*)_service.service).usbMux, ARUTILS_FTP_ANONYMOUS, "");
        }
        
        if(ftpError == ARUTILS_OK) {
            ftpError = ARUTILS_Manager_InitWifiFtpOverMux(ftpQueueManager, NULL, FTP_PORT, ((ARUSBService*)_service.service).usbMux, ARUTILS_FTP_ANONYMOUS, "");
        }
    }
    else
    {
        ip = [[ARDiscovery sharedInstance] convertNSNetServiceToIp:_service];
        
        ftpListManager = ARUTILS_Manager_New(&ftpError);
        if(ftpError == ARUTILS_OK) {
            ftpQueueManager = ARUTILS_Manager_New(&ftpError);
        }
        
        if (ip) {
            if(ftpError == ARUTILS_OK) {
                ftpError = ARUTILS_Manager_InitWifiFtp(ftpListManager, [ip UTF8String], FTP_PORT, ARUTILS_FTP_ANONYMOUS, "");
            }
            
            if(ftpError == ARUTILS_OK) {
                ftpError = ARUTILS_Manager_InitWifiFtp(ftpQueueManager, [ip UTF8String], FTP_PORT, ARUTILS_FTP_ANONYMOUS, "");
            }
        }
    }
    
    _sdCardModule = [[SDCardModule alloc] initWithFtpListManager:ftpListManager andFtpQueueManager:ftpQueueManager];
    _sdCardModule.delegate = self;
}

I hope that could be useful for others developer!


#5

Spoiler alert: this will be way easier in the next sdk release :wink:


#6

Thank you for the spoiler Djavan!
Can we hope this month about the release date?